Open-AudIT

What's on your network?
It is currently Tue Apr 24, 2018 1:18 am

All times are UTC + 10 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Tue Jun 07, 2011 11:35 pm 
Offline
Newbie

Joined: Tue Jun 07, 2011 6:06 pm
Posts: 24
Hi,

After successfully installing Beta 1.1 on an OpenSuSE 11 box with MySQL 5.0.5, Apache 2 and PHP 5.2.12 I'm getting the following error when auditing any machine on my network:

Code:
A Database Error Occurred

Error Number: 1452

Cannot add or update a child row: a foreign key constraint fails (`OAv2/sys_hw_partition`, CONSTRAINT `sys_hw_partition_hard_drive_index` FOREIGN KEY (`hard_drive_index`) REFERENCES `sys_hw_hard_drive` (`hard_drive_index`))

INSERT INTO sys_hw_partition ( system_id, hard_drive_index, partition_mount_type, partition_mount_point, partition_name, partition_size, partition_free_space, partition_used_space, partition_format, partition_caption, partition_device_id, partition_disk_index, partition_bootable, partition_type, partition_quotas_supported, partition_quotas_enabled, partition_serial, timestamp, first_timestamp ) VALUES ( '2', '', 'mount point', '\\\\?\\Volume{2c964749-9014-11df-98af-806e6f6e6963}\\', 'RECOVERY', '949', '722', '227', 'NTFS', '\\\\?\\Volume{2c964749-9014-11df-98af-806e6f6e6963}\\', '', '', '', 'volume', '', '', '-2039350317', '2011-06-07 09:49:25', '2011-06-07 09:49:25')


Bug or something wrong with my DB config?

Cheers,
Gareth

_________________
Auditing 5 companies, 10 sites, 13 servers & 300 workstations.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 08, 2011 9:18 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1944
Location: Brisbane, Australia
I think this is related to the UTF8 issue we discussed in email.
Try the fix I sent you.
If it works, I'll incorporate it into the released code...

As an aside - there seem's to be an underlying issue with UTF8.
I shall be looking closely at this.

_________________
Support and Development hours available from Opmantek.
Please consider a purchase to help make Open-AudIT better for everyone.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 08, 2011 6:32 pm 
Offline
Newbie

Joined: Tue Jun 07, 2011 6:06 pm
Posts: 24
Mark,

The code you emailed over resolves the illegal character issues, but I'm still seeing the MySQL error. The script partially submits the system.

I tried using a fresh DB with the same issues. Fails both uploading via the script and directly pasting the XML in to Add System.

I have emailed across one of the XML outputs causing issues. Not sure I want to post the full output on a public forum due to the info included.

HTH,
Gareth

_________________
Auditing 5 companies, 10 sites, 13 servers & 300 workstations.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 08, 2011 7:27 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1944
Location: Brisbane, Australia
OK great - will check my email.
Yep - don't ever post the full output of an audit script in public.
You can always send it to me though - I'm trustworthy :D
Seriously though - what am I gonna do, steal your CD Keys? Believe me, my current DB contains ~6,000 systems. If I want a CD Key, all I have to do is copy & paste ! Besides that fact, I use Linux at home so I don't really have much use for Windows keys (or keys for any Windows software).

I also happen to believe that people have a right to charge and restrict use on software they create in any way they please. I also have a right to choose not to use it (and give the software I create away).

Oh crap - apologies. [/rant]

Now the actual debugging stuff... There is a bit to get right here, but if you can do it, it should very much point us as to what's going wrong.

Can you check the file code_igniter\system\application\config\fireignition.pnp
Set the variable within to TRUE.
Now comes the difficult bit.....
Grab the Firefox extension FireBug.
Once that has been installed, get the extension FirePHP.
Now, restart Firefox and as you browse, click the "cockroach" icon in the bottom toolbar (the FireBug icon).
This should open up the Firebug console.
The FirePHP extension is used to echo from PHP into this window.
It's great for seeing what's going on inside the app.
You should see all SQL statement's that are run by OAv2 echo'd into FirePHP.
Try pasting the XML script output in to the "Admin -> Systems -> Add a System" page.
Hopefully you'll see where in the processing of the system is has an issue.
That should point us to the incorrect XML or the failing SQL statement.

If you can manage that, copy the output of the FireBug console and email it to me.

I know this is a pain, but remote debugging (without a real connection like a VPN) is really painful !!!

The long and the short of it is that OAv2 beta 1.1 works for me on both Ubuntu 10.10 and Windows XP (using the same XAMPPLITE file I posted to Launchpad). We'll get this going....

_________________
Support and Development hours available from Opmantek.
Please consider a purchase to help make Open-AudIT better for everyone.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 08, 2011 7:33 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1944
Location: Brisbane, Australia
I just posted your emailed XML into my system here at home.
Worked fine.
That's probably not a good thing... I can't easily see what's wrong.
It's also good that the basic code does indeed work - it's most likely a setting on your system (the OAv2 Server itself).

_________________
Support and Development hours available from Opmantek.
Please consider a purchase to help make Open-AudIT better for everyone.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 08, 2011 8:30 pm 
Offline
Newbie

Joined: Tue Jun 07, 2011 6:06 pm
Posts: 24
I can see it being a server config issue to be fair.

Firebug outputs sent across.

_________________
Auditing 5 companies, 10 sites, 13 servers & 300 workstations.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 08, 2011 10:21 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1944
Location: Brisbane, Australia
FYI for others reading this.
We have been working on this via email (audit outputs involved).
Looks to be the "mount point" seciton of the audit script and the processing of the XML by OAv2 that is causing pain.
Quick and dirty workaround is to remove the entire "mount point" section in audit_windows.vbs - around line 1180 or so.
Shall update as we progress.

_________________
Support and Development hours available from Opmantek.
Please consider a purchase to help make Open-AudIT better for everyone.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 09, 2011 12:46 am 
Offline
Newbie

Joined: Tue Jun 07, 2011 6:06 pm
Posts: 24
This worked. Now successfully auditing.

Many Thanks Mark.

_________________
Auditing 5 companies, 10 sites, 13 servers & 300 workstations.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 09, 2011 8:57 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1944
Location: Brisbane, Australia
Just to prove this does actually work on my system...
Here's a screenshot of a Win7 system, correctly showing the discovered mount point (the hidden Win7 recovery partition).

Attachment:
mount_point.png
mount_point.png [ 39.5 KiB | Viewed 2773 times ]

_________________
Support and Development hours available from Opmantek.
Please consider a purchase to help make Open-AudIT better for everyone.


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 24, 2011 3:57 am 
Offline
Newbie

Joined: Thu Sep 22, 2011 5:20 am
Posts: 7
Hey,

I just tried to configure and install OAv2 Beta 2 for the first time and also have this same issue...

Code:
A Database Error Occurred
Error Number: 1452

Cannot add or update a child row: a foreign key constraint fails (`openauditv2`.`sys_hw_partition`, CONSTRAINT `sys_hw_partition_hard_drive_index` FOREIGN KEY (`hard_drive_index`) REFERENCES `sys_hw_hard_drive` (`hard_drive_index`))

INSERT INTO sys_hw_partition ( system_id, hard_drive_index, partition_mount_type, partition_mount_point, partition_name, partition_size, partition_free_space, partition_used_space, partition_format, partition_caption, partition_device_id, partition_disk_index, partition_bootable, partition_type, partition_quotas_supported, partition_quotas_enabled, partition_serial, timestamp, first_timestamp ) VALUES ( '1', '', 'mount point', '\\\\?\\Volume{cbb5753e-e4aa-11e0-8b39-806e6f6e6963}\\', 'System Reserved', '99', '71', '28', 'NTFS', '\\\\?\\Volume{cbb5753e-e4aa-11e0-8b39-806e6f6e6963}\\', '', '', '', 'volume', '', '', '-50718127', '2011-09-23 13:35:51', '2011-09-23 13:35:51')


I plan on trying with removal of the "mount point" section, but, as this was for Beta 1, I was wondering whether any progress has been made on this issue.
Thanks


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 26, 2011 11:47 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1944
Location: Brisbane, Australia
Maybe you should try Beta3 - just released!
https://launchpad.net/oav2/trunk/beta3

_________________
Support and Development hours available from Opmantek.
Please consider a purchase to help make Open-AudIT better for everyone.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 5 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