Query failure after upgrade from 0.x to 1.x

The forum for help and support with FreeNATS as well as any useful hints and tips
paullanders
Posts: 92
Joined: Thu Sep 04, 2008 9:48 pm

Query failure after upgrade from 0.x to 1.x

Post by paullanders » Wed Sep 24, 2008 5:32 pm

Hi Dave.

After upgrading from 0.x to 1.x I have one failure for each node in the Event Viewer:

11:24:15 24/09/2008 Tester Stop 5 Tester 97149 Finished
11:24:15 24/09/2008 DB Query 2 Query Error: Unknown column 'nextrunx' in 'where clause' (1054)
11:24:15 24/09/2008 DB Query 2 Query Failed: SELECT * FROM fnnode WHERE nodeenabled=1 AND nodeid="ariel_lubbock" AND nextrunx<=1222273455
11:24:15 24/09/2008 Tester Start 5 Tester 97149 Started

Thanks!

Paul

dave
Site Admin
Posts: 260
Joined: Fri May 30, 2008 9:09 pm
Location: UK
Contact:

Re: Query failure after upgrade from 0.x to 1.x

Post by dave » Wed Sep 24, 2008 5:47 pm

Hi Paul,

How did you do the upgrade and did you make the schema changes? The upgrade script (or manual SQL import) should update the database with the required fields though I would have thought a lot more would break if you were on the old schema.

Cheers,

Dave.

dave
Site Admin
Posts: 260
Joined: Fri May 30, 2008 9:09 pm
Location: UK
Contact:

Re: Query failure after upgrade from 0.x to 1.x

Post by dave » Wed Sep 24, 2008 5:53 pm

Ok I've checked and nextrunx is in all the relevant SQL (the fresh and the update) of v1 releases ok.

If you've done a manual update of the files you will also need to update the database (http://www.purplepixie.org/freenats/wik ... ce_Install).

You can do this manually by forcing the schema.upgrade.sql and default.sql scripts (you have to force them as they will generate errors) or rename firstrun-.php to firstrun.php in the web directory and navigate to it (rename it back afterwards).

Hopefully this will resolve your issue!

Cheers,

Dave.

paullanders
Posts: 92
Joined: Thu Sep 04, 2008 9:48 pm

Re: Query failure after upgrade from 0.x to 1.x

Post by paullanders » Wed Sep 24, 2008 8:07 pm

Ah, so I have to <blush>read the instructions more carefully</blush> ;)

Thanks, Dave. It worked just fine after the database upgrade.

However, all of my previous TCP connect tests are now failing. I tried deleting and recreating them to no avail.

Thanks!

Paul

dave
Site Admin
Posts: 260
Joined: Fri May 30, 2008 9:09 pm
Location: UK
Contact:

Re: Query failure after upgrade from 0.x to 1.x

Post by dave » Wed Sep 24, 2008 8:24 pm

Hi Paul,

No problem - I've done it myself a fair few times :D

Are the TCP tests failing (red) or going untested (black)? The new version has modularised the TCP tests but they still seem to be working ok from here.

If from the shell (in server/bin) you do:

Code: Select all

php tester.php nodeid
Where the nodeid is one of the nodes with tcp tests failing, what output do you get?

Cheers,

Dave.

paullanders
Posts: 92
Joined: Thu Sep 04, 2008 9:48 pm

Re: Query failure after upgrade from 0.x to 1.x

Post by paullanders » Wed Sep 24, 2008 8:27 pm

Hi Dave. They're going red. Here's the output from a node named 'eff':

NATS Tester Script Starting: Node eff
Test ID: 100776 (Started at 14:26:01 24/09/2008)

Finished Tests... Finishing Off
Summary: Tester 100776 Highest Level -1, Alerts 0
NATS Stopped... Finished

dave
Site Admin
Posts: 260
Joined: Fri May 30, 2008 9:09 pm
Location: UK
Contact:

Re: Query failure after upgrade from 0.x to 1.x

Post by dave » Wed Sep 24, 2008 8:30 pm

Hi,

Ooops. That output is actually because the node is not yet due to run. Can you try this:

Create a new node with the hostname set to whatever and a single TCP port test
Set the node interval to 0

Run that from the command line - it should run pretty much every time. If it says there is one already running just wait a few seconds and then try again.

Cheers,

Dave.

paullanders
Posts: 92
Joined: Thu Sep 04, 2008 9:48 pm

Re: Query failure after upgrade from 0.x to 1.x

Post by paullanders » Wed Sep 24, 2008 9:02 pm

NATS Tester Script Starting: Node test_node
Test ID: 101479 (Started at 15:00:51 24/09/2008)

NodeID: test_node
Ping Test: Yes
Ping Returned: 0.0001
Ping Test: Passed
Doing Local Tests
Test: tcp (80)
Result: -1
Eval: 2
Recording Test
Nodeside Testing
Highest Alert Level: 2
Alert Count : 1
Alerts: iMac 80 failed,

Finished Tests... Finishing Off
Summary: Tester 101479 Highest Level 2, Alerts 1
NATS Stopped... Finished

dave
Site Admin
Posts: 260
Joined: Fri May 30, 2008 9:09 pm
Location: UK
Contact:

Re: Query failure after upgrade from 0.x to 1.x

Post by dave » Wed Sep 24, 2008 9:32 pm

Hi Paul,

Ummm... That is pretty weird. The TCP connect is pretty simple fsockopen stuff.

Ok...

- Can you telnet to port 80 on the remote node from the shell?

- If you go into Configuration - System Settings - System Information, do you see a TCP Connect and UDP Connect listed in the test modules?

- If you go into Configuration - System Settings - System Status Report, does everything light up green under the Environment list?

- If you add a complex DNS query test against some local nameserver (on the same test node) does this test pass? (unless you are already doing a complex DNS test elsewhere which is working in which case ignore)

Cheers,

Dave.

paullanders
Posts: 92
Joined: Thu Sep 04, 2008 9:48 pm

Re: Query failure after upgrade from 0.x to 1.x

Post by paullanders » Wed Sep 24, 2008 10:19 pm

Hi Dave.

Yes, I can telnet to port 80

Name Provides Revision Additional
TCP Connect tcp 1 FreeNATS TCP Tester
UDP Connect udp 1 FreeNATS UDP Tester

Environment:

IMAP - imap_open functions required
IMAP is not supported - don't configure IMAP tests or your environment will hang

Sockets - Ok
Streams - Ok
MySQL - Ok
Mail - Ok
PHP5 - Ok

I configured a complex DNS query and it worked :)

Update - maybe a clue: if I disable Simple Evaluation on a TCP test it begins functioning properly.

Post Reply