[HELP] Unable to submit audit results
Page 1 of 1

Author:  bignick0 [ Tue Oct 11, 2016 1:33 am ]
Post subject:  [HELP] Unable to submit audit results

Hello - I originally created THIS THREADwhen I had a problem with the upgrade to 1.12.8. I see a lot of work has been done to figure out why a few different installs have failed in a similar way. Unfortunately I've been unable to work for the last month or so, and I missed a lot of the conversation. My apologies.

My current issue is, I believe, fallout from my failed install and restore from backup. I was able to recover all of the backed up files that the install created, as well as restore my database from backup in order to get open-audit functioning back at version 1.12.16; however I just noticed that I am receiving an error when trying to submit audit results via HTTP. The script produces this error:

Audit Generated in 26 seconds.
Submitting audit online
Error with http request(2). Audit not submitted.
Total Execution Time: 27 seconds.

When trying to go to the submission URL on the server, I get this error:

A Database Error Occurred

Error Number: 1305

FUNCTION openaudit.cidr_to_mask does not exist

/* M_oa_config::check_blessed */ SELECT COUNT(id) AS count FROM networks WHERE (-1 << (33 - INSTR(BIN(INET_ATON(cidr_to_mask(SUBSTR(name, LOCATE('/', name)+1)))), '0'))) & INET_ATON('') = INET_ATON(SUBSTR(name, 1, LOCATE('/', name)-1))

Filename: models/m_oa_config.php

Line Number: 431

I'm not clear on if this is an error with the database, or if there is something wrong with the open-audit site files. Can anyone please point me in a direction to resolve this?

Thanks for the assistance.

Author:  jpa [ Tue Oct 11, 2016 1:47 am ]
Post subject:  Re: [HELP] Unable to submit audit results

The cidr_to_mask function is created in the default MySQL database and not the OpenAudit database so it didn't get restored.

You'll need to recreate the function. This should do it.

mysql -u openaudit -popenauditpassword -e "CREATE FUNCTION cidr_to_mask (cidr INT(2)) RETURNS CHAR(15) DETERMINISTIC RETURN INET_NTOA(CONV(CONCAT(REPEAT(1,cidr),REPEAT(0,32-cidr)),2,10))";

Author:  bignick0 [ Tue Oct 11, 2016 2:51 am ]
Post subject:  Re: [HELP] Unable to submit audit results

Thanks so much. This was exactly the fix I needed. I DID need to drop in a -Dopenaudit into your posted command above, however.

Thanks again!

Page 1 of 1 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group