Remote poller only finds location-def if run from GUI
Description
A site with a remote poller that was once working stopped for no apparent reason. It will now not connect unless it's run in GUI mode, complaining about not finding the location-def for the remote poller's location. However, running the remote poller in GUI mode connects fine.
A site with a remote poller that was once working stopped for no apparent reason. It will now not connect unless it's run in GUI mode, complaining about not finding the location-def for the remote poller's location. However, running the remote poller in GUI mode connects fine.
This command DOES work:
/usr/java/latest/bin/java -Xmx384m -Djava.rmi.activation.port=1099 -jar /opt/opennms/bin/remote-poller.jar --url=http://192.168.0.1/opennms-remoting --location=REMOTESITE --gui -n REMOTEUSER -p REMOTEPASS
While this command DOES NOT work:
/usr/java/latest/bin/java -Xmx384m -Djava.rmi.activation.port=1099 -jar /opt/opennms/bin/remote-poller.jar -Dpoller.logfile=/var/log/opennms-remote-poller.log -Djava.awt.headless=true --url=http://192.168.0.1/opennms-remoting --location=REMOTESITE -n REMOTEUSER -p REMOTEPASS
This error appears in the opennms-remote-poller.log:
Caused by: org.springframework.orm.ObjectRetrievalFailureException: Location monitor definition with the id 'REMOTESITE' not found
This issue could be related to bug #NMS-3928 - "Remote Poller REQUIRES the gui on first run": http://issues.opennms.org/browse/NMS-3928