Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Thu Mar 28, 2024 6:57 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
PostPosted: Tue Oct 11, 2016 1:33 am 
Offline
Newbie

Joined: Sat Jun 04, 2016 3:26 am
Posts: 9
Hello - I originally created [url=http://www.open-audit.org/phpBB3/viewtopic.php?f=20&t=6551]THIS THREAD[/url]when 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:

[quote]...
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:

[quote]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('172.33.17.18') = 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.

Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 11, 2016 1:47 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
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.

[code]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))";[/code]


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 11, 2016 2:51 am 
Offline
Newbie

Joined: Sat Jun 04, 2016 3:26 am
Posts: 9
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!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group