I did not delete that user, but in the form, I specified a number for
the identifier that didn't exist in the database. I had, for some
reason, assumed that the identifier was same as the number listed with
the category name, which is not the case.
That explains that part of the error.
I still don't understand why I add nodes, and the form says "Added
Record" yet the node is not in the database. I just tried to add a mac
address, and in the packetfence.log, I get:
Jan 18 09:24:10 pfcmd(0) INFO: pfcmd calling node_add for
00:50:56:85:00:11 (main::command_param)
Jan 18 09:24:10 pfcmd(0) WARN: database query failed with: Cannot add or
update a child row: a foreign key constraint fails (`pf/node`,
CONSTRAINT `0_57` FOREIGN KEY (`pid`) REFERENCES `person` (`pid`) ON
DELETE CASCADE ON UPDATE CASCADE). (errno: 1452), will try again
(pf::db::db_query_execute)
Jan 18 09:24:10 pfcmd(0) WARN: database query failed with: Cannot add or
update a child row: a foreign key constraint fails (`pf/node`,
CONSTRAINT `0_57` FOREIGN KEY (`pid`) REFERENCES `person` (`pid`) ON
DELETE CASCADE ON UPDATE CASCADE). (errno: 1452), will try again
(pf::db::db_query_execute)
Jan 18 09:24:10 pfcmd(0) WARN: database query failed with: Cannot add or
update a child row: a foreign key constraint fails (`pf/node`,
CONSTRAINT `0_57` FOREIGN KEY (`pid`) REFERENCES `person` (`pid`) ON
DELETE CASCADE ON UPDATE CASCADE). (errno: 1452), will try again
(pf::db::db_query_execute)
Jan 18 09:24:10 pfcmd(0) ERROR: Database issue: We tried 3 times to
serve query node_add_sql called from pf::node::node_add and we failed.
Is the database running? (pf::db::db_query_execute)
Last night I increased the MySQL settings as outlined in the
administration document, despite not seeing any reason to do so given
that the system load doesn't show any issues. This does not appear to
have fixed the issue.
For the node add that I did, I didn't specify an identifier, I again
assumed that the software inserts the default identifier (of 1) if no
identifier is specified. I did another test and specified an identifier
of 1 and the node did get entered and there was no database related
error in the packetfence.log.
When I then do a lookup for the node that was just confirmed as added to
the database, I get an error:
Error: Problems executing 'PFCMD lookup node 00:50:56:85:00:11'
/usr/local/pf/lib/pf/lookup/node.pm line 115 (#1)
No errors in any of the logs on this, other than this in the
admin_debug_log:
Jan 18 09:37:46 [debug] Looking up permission-level for user admin with
role admin.
Jan 18 09:38:44 [debug] Looking up permission-level for user admin with
role admin.
Jan 18 09:38:47 [debug] Looking up permission-level for user admin with
role admin.
Jan 18 09:38:49 [debug] I ran command: 'ARGS=lookup node
00:50:56:85:00:11' /usr/local/pf/bin/pfcmd
Returned:
Array
(
[0] => Use of uninitialized value in concatenation (.) or string at
[1] => /usr/local/pf/lib/pf/lookup/node.pm line 115 (#1)
[2] => (W uninitialized) An undefined value was used as if it
were already
[3] => defined. It was interpreted as a "" or a 0, but maybe it
was a mistake.
[4] => To suppress this warning assign a defined value to your
variables.
[5] =>
[6] => To help you figure out what was undefined, perl tells you
what operation
[7] => you used the undefined value in. Note, however, that
perl optimizes your
[8] => program and the operation displayed in the warning may
not necessarily
[9] => appear literally in your program. For example, "that
$foo" is
[10] => usually optimized into "that " . $foo, and the warning
will refer to
[11] => the concatenation (.) operator, even though there is no
. in your
[12] => program.
[13] =>
[14] => MAC Address : 00:50:56:85:00:11
[15] => IP Address : Unknown
[16] => IP Info : No IP information available
[17] => DHCP Info : Last DHCP request at 0000-00-00 00:00:00
[18] => Owner : unregistered
[19] => Category : Infrastructure
[20] => Status : registered
[21] => MAC Vendor : VMware, Inc.
[22] => Location : port (vlan ) on switch
[23] => Connection type: UNKNOWN
[24] => Last activity : currently active
)
From: Francois Gaudreault [mailto:[email protected]]
Sent: Tuesday, January 18, 2011 8:32 AM
To: [email protected]
Cc: Ritter, Nicholas
Subject: Re: [Packetfence-users] PF v2.0 problems
Hi Nicholas,
Did you delete the person with the PID 1 from the database? This is the
default user that packetfence uses to add a node to the database, and
should NOT be deleted.
This error is triggered because you are trying to add a node with a PID
that doesn't exists in the person table.
On 11-01-17 10:30 PM, Ritter, Nicholas wrote:
Is anyone playing around with (either in production or in testing)
PacketFence v2? I am having all sorts of errors with it. I am running
PacketFence v2 on CentOS v5.5 x86_64, although I tried the ZEN version
as well and encountered many of the same problems. Most recently, I had
errors where adding a node didn't give an error (via the web browser)
but the node was not inserted into the database either.
I do have database errors in the packetfence log:
Jan 17 21:00:22 pfcmd(0) WARN: database query failed with: Cannot add or
update a child row: a foreign key constraint fails (`pf/node`,
CONSTRAINT `0_57` FOREIGN KEY (`pid`) REFERENCES `person` (`pid`) ON
DELETE CASCADE ON UPDATE CASCADE). (errno: 1452), will try again
(pf::db::db_query_execute)
Jan 17 21:00:22 pfcmd(0) WARN: database query failed with: Cannot add or
update a child row: a foreign key constraint fails (`pf/node`,
CONSTRAINT `0_57` FOREIGN KEY (`pid`) REFERENCES `person` (`pid`) ON
DELETE CASCADE ON UPDATE CASCADE). (errno: 1452), will try again
(pf::db::db_query_execute)
Jan 17 21:00:22 pfcmd(0) WARN: database query failed with: Cannot add or
update a child row: a foreign key constraint fails (`pf/node`,
CONSTRAINT `0_57` FOREIGN KEY (`pid`) REFERENCES `person` (`pid`) ON
DELETE CASCADE ON UPDATE CASCADE). (errno: 1452), will try again
(pf::db::db_query_execute)
Jan 17 21:00:22 pfcmd(0) ERROR: Database issue: We tried 3 times to
serve query node_add_sql called from pf::node::node_add and we failed.
Is the database running? (pf::db::db_query_execute)
Jan 17 21:09:15 pfcmd(0) INFO: pfcmd calling node_add for
00:50:56:85:00:11 (main::command_param)
Jan 17 21:09:15 pfcmd(0) WARN: database query failed with: Cannot add or
update a child row: a foreign key constraint fails (`pf/node`,
CONSTRAINT `0_57` FOREIGN KEY (`pid`) REFERENCES `person` (`pid`) ON
DELETE CASCADE ON UPDATE CASCADE). (errno: 1452), will try again
(pf::db::db_query_execute)
Jan 17 21:09:15 pfcmd(0) WARN: database query failed with: Cannot add or
update a child row: a foreign key constraint fails (`pf/node`,
CONSTRAINT `0_57` FOREIGN KEY (`pid`) REFERENCES `person` (`pid`) ON
DELETE CASCADE ON UPDATE CASCADE). (errno: 1452), will try again
(pf::db::db_query_execute)
Jan 17 21:09:15 pfcmd(0) WARN: database query failed with: Cannot add or
update a child row: a foreign key constraint fails (`pf/node`,
CONSTRAINT `0_57` FOREIGN KEY (`pid`) REFERENCES `person` (`pid`) ON
DELETE CASCADE ON UPDATE CASCADE). (errno: 1452), will try again
(pf::db::db_query_execute)
Jan 17 21:09:15 pfcmd(0) ERROR: Database issue: We tried 3 times to
serve query node_add_sql called from pf::node::node_add and we failed.
Is the database running? (pf::db::db_query_execute)
I tested the mysql username/password for packetfence as configured by
the installer.pl script, and it works. Is there a way to put packetfence
into a higher debug mode so that I can better figure out where the
problem is?
I checked the mysql server processes, and I see the pf user connected
to it several times, so I am pretty sure it is not a
username/password/privilege issue.
On a related note, PacketFence is inserting nodes (as unreg) that it is
seeing via dhcp listening. Any help figuring this out would be
appreciated.
------------------------------------------------------------------------
------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Packetfence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users
--
Francois Gaudreault, ing. jr
[email protected] :: +1.514.447.4918 (x130) :: www.inverse.ca
Inverse inc. :: Leaders behind SOGo (www.sogo.nu) and PacketFence
(www.packetfence.org)
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Packetfence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users