Hello,
I'm not an expert, but I have seen this error on my server (still not-working server) when I tried to import an OCS file twice.
In tha case, I had the following error in apache log (but PerlSetEnv OCS_OPT_DBI_PRINT_ERROR 1 is set in my z-ocsinventory-server.conf).
DBD::mysql::db do failed: Duplicate entry '4' for key 'PRIMARY' at /usr/local/share/perl/5.14.2/Apache/Ocsinventory/Server/System.pm line 200.
Regards,
Bexounet