I'm running Zabbix 1.9.6 (compiled on my own) on RHEL5. My setup is that I have a main Zabbix server (16 CPU, 64GB RAM) that runs just fine. Along with that I have an active Zabbix proxy server (2CPU, 6GB RAM) that is having issues with its SQLite3 database.
I have a discovery rule for the proxy that is having issues inserting data into the SQLite database. Every time the proxy tries to write to the database the following error shows up in the logs:
[Z3005] query failed:  proxy_dhistory.dcheckid may not be NULL [insert into proxy_dhistory (clock,druleid,type,ip,dns,status) values (1316636599,2,-1,'ip.add.xxx.xxx','server.fqdn.com',1)]
I have tried recompiling to account for any oddities that could've showed up, but it didn't make any difference.
Now here's the real kicker: I have this exact same setup in another environment. That other environment works great without any problems. In fact, the scripts I use to do all the compilation/configuring/install were used in both environments. I have compared the configuration in the non-working environment to the working environment and both are identical (with the exception of server names of course).
I have already verified that permissions on the file system were correct for the zabbix user to be able to write to the database. Everything checks out there.