-----Original Message----- From: Morten Vold [mailto:morten.vold@ntnu.no] Sent: Wednesday, December 14, 2005 11:08 To: Perica Veljanovski Cc: nav-users@itea.ntnu.no Subject: Re: [Nav-users] missing FROM-clause entry for table netboxcategory
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 09/12/2005 14:32, Perica Veljanovski uttered:
ProgrammingError: ERROR: missing FROM-clause entry for table "netboxcategory"
[...]
The same error appears when I try to edit ip devices. I did a select
- query to manage.netbox and my device is there! Netboxcategory is
empty, so I gather that the problem lies there but don't know what should be in it? Is this because I missed a step or maybe because I started to seed with a new device type.
Looks like a bug in editdb. I tried to grok the code quickly (it's not pretty ;) ), and my first impression is that your analysis is correct; that "Add IP Device" might crash if there are no registered netbox categories.
Netbox categories are just a way to do site-specific categorization of devices. Example categories from our own installation are "Web", "Unix", "Windows", "LDAP" and soforth (we use them to categorize servers).
I'll try to give the bug a closer look, but did you solve this problem on your installation?
Also I've read the mailing lists archive and see that you've reported a "unexpected EOF on client connection" error from postgresql, which I also have! I didn't find a reference on how to confront this problem though? I haven't got to that point yet, but it would be nice to have some input.
Sorry, but you'll have to live with this "problem" a bit longer. This error is logged by PostgreSQL because of some clients that don't properly close their database connections, they just sever them. Apparently some of the NAV processes don't behave properly in this respect. It's on the TODO-list to investigate which of them are the naughty ones, but rest assured that the only actual problem in this is that your PostgreSQL logs grow larger.
Note: my /alertprofiles/ doesn't work at all :) when I click it from /toolbox/ I get a blank screen.
Sounds like a PHP problem, but it looks like your fellow FreeBSD users are helping you with this :)
Morten Vold, ITEA, NTNU
A: Because it messes up the order in which people normally read text. Q: Why is it such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDn+76XxIl0kpcOkQRAlZNAKCebhr/8+FHW2mLdDQMCQm1Y+FuzACgx5S+ HOVwxf+mE28hzVqR3Rr1XcY= =LUC1 -----END PGP SIGNATURE-----
Thank you!!! This makes since :)
So, today I had some time, gave the problem a go, and this is what I've come up with:
IP Devices->Add doesn't populate the netboxcategory table, it doesn't even let you choose from subcat table in the web form!
Netboxcategory has 2 fkey's, netboxid = netbox.netboxid and category = subcat.subcatid. I tried populating netboxcategory myself, but the problem persists! I think the problem is in the IP Devices->Edit query, the error again: --- ProgrammingError: ERROR: missing FROM-clause entry for table "netboxcategory"
SELECT netboxid,netboxcategory.category FROM netbox WHERE netboxcategory.netboxid=netboxid --- Now I have no experience with postgressql, but have about 5 years of mysql experience, and this query doesn't make much since to me. There is no reference to netboxcategory in the FROM clause, but the SELECT uses it!? Maybe I'm wrong. Also, I think that the idea of add ip devices is to first populate netbox and then call edit (or part from it) to populate netboxcategory and probably other tables. And this is where the module crashes. But don't take my word for it, because I haven't used NAV before, nor have I examined the code!!!
Hope this helps.
On the other subject: A BIG thanks to my fellow FreeBSD users :P All NAV modules work now! Alert Profiles still has some errors (I assume they are trivial, haven't had time to check), and Cricket still doesn't display files from /images and doesn't read the .css so it looks kinda grouse :) Apart from that, I have a working NAV >:)
Morten, I have a favor to ask. Since I have a deadline until Monday to get NAV running (or we will use cacti+kannel), could you look into my ip devices->edit problem. I'm more of a Perl guy, so Python is new to me.
Thanks all! Perica Veljanovski