Uninett / nav

Network Administration Visualized
GNU General Public License v3.0
180 stars 37 forks source link

getDeviceData PSQLException: Bad value for type int : 1061227117860 #1259

Closed jmbredal closed 7 years ago

jmbredal commented 7 years ago

Hi, I installed a fresh 3.4.4 on debian etch and imported my devices etc. from an older instance via bulkimport. getDeviceData does not work

when I imported the devices I got lines like this in /var/lib/nav/getDeviceData.log

Nov 19 17:01:09 2008 unibim-lo-0.ub.p.unibas.ch_02 ModuleMonHandler-3-RUN Caught exception, should not happen: no.ntnu.nav.getDeviceData.dataplugins.Arp.ArpHandler Nov 19 17:01:09 2008 unibik-lo-0.urz.p.unibas.ch_06 QUERY_NETBOX_T06-3-RUN Caught exception, should not happen: no.ntnu.nav.getDeviceData.dataplugins.Arp.ArpHandler Nov 19 17:01:09 2008 uniba0-lo-0.physik.p.unibas.ch_00 QUERY_NETBOX_T00-3-RUN Caught exception, should not happen: no.ntnu.nav.getDeviceData.dataplugins.Arp.ArpHandler [...] Nov 19 18:13:23 2008 cat-dsl-test.urz.p.unibas.ch_12 QUERY_NETBOX_T12-3-RUN Caught exception, should not happen: no.ntnu.nav.getDeviceData.dataplugins.Arp.ArpHandler Nov 19 19:04:21 2008 getDeviceData EVENTQ_MONITOR_TASK-3-RUN SQLException when fetching from eventq: Bad value for type int : 1061227117860 [...]

/var/lib/nav/log/getDeviceData-stderr.log fills up with this:

org.postgresql.util.PSQLException: Bad value for type int : 1061227117860 at org.postgresql.jdbc2.AbstractJdbc2ResultSet.toInt(AbstractJdbc2ResultSet.java:2507) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getInt(AbstractJdbc2ResultSet.java:1994) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getInt(AbstractJdbc2ResultSet.java:2208) at no.ntnu.nav.event.Event.eventFactory(Event.java:159) at no.ntnu.nav.event.EventQMonitorTask.run(EventQ.java:262) at java.util.Timer$Scheduler.run(libgcj.so.70) at java.lang.Thread.run(libgcj.so.70)

any help welcome.

regards harald

Update: our sysops installed a 64bit kernel - maybe nav is not running on 64bit-OS?


Imported from Launchpad using lp2gh.

jmbredal commented 7 years ago

(by mbrekkevold) Following the history of this bug is kind of difficult when you keep adding your updates to the description instead of posting comments.

I interpret your "update 4" as "the issue has been resolved". Is this correct?

jmbredal commented 7 years ago

(by harald-volz) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Hi Morten, Sorry, but I have not seen the comments link.

The first issue with the bad value for the integer is not resolved, I assume it was related to our 64bit OS - which seems not to be fully supported. As I reinstalled the whole system on 32bit Debian I have a workaround - the problem did not appear in this installation.

The main JAVA-Problem is solved by the environment changes. The SQL-Errors seem to be partly solved - see bug 301564

With kind regards Harald Volz

Morten Brekkevold schrieb:

Following the history of this bug is kind of difficult when you keep adding your updates to the description instead of posting comments.

I interpret your "update 4" as "the issue has been resolved". Is this correct?

** Changed in: nav Status: New => Incomplete



Harald Volz


-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux)

iQEVAwUBSSqXDHA8wWGHC+viAQKbVAgAhcg75VybjsDHTQ/NNmpySFzY2JJxZmPo fm1KU6POgkXcfTKEEO62y7XLS8WD0YkKWWHiJNqggIET4y76rj2yj0aHFNLh0J0/ hUYTDnTnv9IDkRnfbq52VDcoDbqe1KQp+wXlsJQ6vpWxkGj6ZVG7W3ce8b3E4Ish u7pMn8kcZcJ2eptpj6oniV8zhAu7k3sZguyhrgU/Ca3ASDSx/0JWlBtd+/d8eEpJ WIXDEFDciA5IzECwacHNk/gekJqESuvEHuOpH7dEBfIn1U8mR9Ttswb7Wbcyb22v QaChXVlQDIGU5/eYO84rBQExwpW17kQj4jjCmdNHnzbTSjrm2jWHSg== =CjZ6 -----END PGP SIGNATURE-----

jmbredal commented 7 years ago

(by mbrekkevold) Harald,

your environment changes won't help for cronjobs. Your most basic problem seems to be that you are running on the wrong JVM; NAV requires Java 1.5, and recommends Sun's JVM. You seem to be on Debian, and the problem is most likely that you have several java installations. You should update your alternatives configuration to make sure Sun's JVM is the default provider of all things Java:

Run "update-alternatives --config java" as root, and select Sun's JVM. Do the same for the javac command: "update-alternatives --config javac". Then restart NAV.

If you still have problems after that, please report back. Until that happens, I'm leaving this report as Incomplete.

jmbredal commented 7 years ago

(by harald-volz) Hi Morten, I even had the classpath in the global profile and the crontab-file. But your solution fixed the problems with those exceptions. No more Exceptions now. As I have written, the other problem org.postgresql.util.PSQLException: Bad value for type int : 1061227117860 might be related to 64bit-Linux. After we changed to 32bit it never occured.

Thanks for your help Harald

jmbredal commented 7 years ago

(by mbrekkevold) Ok, looks like there might be a problem with Java/PostgreSQL on 64-bit platforms, I'll look into this later.

I've updated the bug description to only include the core of the bug report, which is bad int values, possibly related to using a 64-bit platform.

jmbredal commented 7 years ago

(by mbrekkevold) We've yet to be able to reproduce this, and gDD is obsoleted in the upcoming NAV 3.6. This won't be fixed.