Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Error 500 on import #1595

Open
Parnoud opened this issue Mar 4, 2024 · 6 comments
Open

[BUG] Error 500 on import #1595

Parnoud opened this issue Mar 4, 2024 · 6 comments

Comments

@Parnoud
Copy link

Parnoud commented Mar 4, 2024

OCS Inventory version
Version : 2.12.0
Client : 2.10.1.0

Describe the bug
I have 9000 host who update my OCS, some time few clients who get error in OCSinventory.log :
ERROR *** AGENT => Failed to send Inventory <HTTP Status Code #500>

Serveur side i get :
Activity.log
Mon Mar 4 15:44:22 2024;12420;311;XX-2023-10-06-14-34-54;XX;OCS-NG_WINDOWS_AGENT_v2.10.1.0;session;started
Mon Mar 4 15:44:59 2024;12413;319;XX-2023-10-06-14-34-54;XX;OCS-NG_WINDOWS_AGENT_v2.10.1.0;session;found
Mon Mar 4 15:44:59 2024;12413;104;XX-2023-10-06-14-34-54;XX;OCS-NG_WINDOWS_AGENT_v2.10.1.0;inventory;incoming
Mon Mar 4 15:44:59 2024;12413;515;XX-2023-10-06-14-34-54;XX;OCS-NG_WINDOWS_AGENT_v2.10.1.0;end;error

Nothing in error.log

i try to set OCS_OPT_DBI_PRINT_ERROR to 1 but i get nothing ?

I try to do a local export from a client (XML + OCS file) with ocsinventory-injector.pl i get ERROR: 500 Internal Server Error

i try with 0 plugin client side, same issue.

Where i can find more log for debug this issue ? what does ocsinventory-log.pl do ? does is print more log than the others ?

i try to look if /usr/local/share/perl/5.32.1/Apache/Ocsinventory.pm is the good one :
$Apache::Ocsinventory::VERSION = '2.12.0';
$Apache::Ocsinventory::MAJOR_VERSION = '2';
$Apache::Ocsinventory::MINOR_VERSION = '12';
$Apache::Ocsinventory::BUILD_VERSION = '850';
$XML::Simple::PREFERRED_PARSER = 'XML::Parser';

Expected behavior
No error for inventory import

@gillesdubois
Copy link
Member

Hi,

Just to be sure, did you restart the apache service after changing the setting ?

Regards,
Gilles DUBOIS.

@Parnoud
Copy link
Author

Parnoud commented Mar 5, 2024

Yes, I already try this.

@daniellybto
Copy link

Same problem here.

I tried restarting apache2 - it didn't solve the problem;
I tried restarting my server where OCS Inventory is installed - it didn't help;
I also tried restarting the machine where the OCS Agent is installed - it didn't help;

@gillesdubois
Copy link
Member

Hi,

Without logs from OCS_OPT_DBI_PRINT_ERROR won't be able to help much more.
If this setting doesn't work could you try to enable general query logs from mysql ? That way you'll see all queries that goes trought the SQL server before returning the 500.

500 errors on the agent are most of the time related to a datamodel mismatch.

Regards,
Gilles DUBOIS.

@daniellybto
Copy link

Hello everyone, sorry for the delay and thanks for the DBI_PRINT_ERROR tip.

After that I realized that I had left the wrong server configuration, which was causing the error. So, I made the correction and everything worked correctly, at least for me.

Thank you ^^

@asferreira
Copy link

I'm facing the same problem here on a fresh installation using the same server and client versions as reported by @Parnoud.
No errors on error.log and OCS_OPT_DBI_PRINT_ERROR didn´t change anything.

Checking the mysql's log files I come to conclusion that the 500 errors are indeed caused by model mismatch. What I can't understand is why it is happening and why OCS_OPT_DBI_PRINT_ERROR does not report any error.

Regards,

Anderson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants