Installing the Remote Poller on Windows using the .exe file doesn't register Windows Service successfully

Description

When going to the following URL:

http://onms-server:8980/opennms-remoting

The pages shows 3 ways to install the remote poller on Windows. The last one points to an EXE file that install the remote poller as a Windows Service.

Using the branch jira/NMS-6966, the remote poller works if it is installed through JNLP on Windows.

But, if I install the remote poller running the .exe file, I was able to install it and run it the first time, but after finishing the wizard, it seems it stops working (I cannot see the remote poller started on the OpenNMS server).

Environment

Windows 7 64 bits using Oracle Java 7u60

Acceptance / Success Criteria

None

blocks

Lucidchart Diagrams

Activity

Show:

Seth Leger November 2, 2014 at 9:28 AM

I've fixed the shutdown issue by adding a Stopped state to the PollerFrontEnd that fires PropertyChangeListener events that Main receives. Main then shuts down the context and calls System.exit(). Marking this issue as fixed.

commit 7c4958441839626982bdedb5e17b681332202015
commit 8045eed27ed20c6c3882d2541c72576402344bc8
commit 38fbcebed64ed08e1aefe13dcee3686386ee6283

Seth Leger October 29, 2014 at 2:26 PM

I traced the issue down to the fact that Windows 7 is not letting a Windows Service interact with the desktop so if the service tries to display an AWT dialog, the process seems to hang. I changed the way that the OpenNMS HTTP credentials are specified to prevent the AWT window from ever being displayed and now installing as a procrun service is working properly.

There is one remaining issue... shutting down the service is not working properly. The system is changing status to STOPPED but the Java process is not exiting properly. Trying to figure this issue out now.

Seth Leger October 27, 2014 at 4:13 PM

I've been working on this for a few days and just to comment, it appears that this problem is some sort of permissions issue. The EXE installer uses JNLP to download and locally cache the remote poller JAR files. It then runs the GUI mode remote poller so that the "location" can be set and stored.

All of this works fine. The next step is that the installer adds registry config to run the JNLP app with the commons-daemon procrun wrapper. This is not working. When running as a Windows service with procrun, the Java process starts and logs that it will be using the JNA ICMP code... and then hangs. I'm investigating this hang now.

The process behavior is the same if you try to launch the JNLP app from the desktop shortcut. However, if you right-click on the desktop icon and choose "Run as administrator" then everything works correctly. Something is hanging when admin permissions are not available.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

PagerDuty

Created October 15, 2014 at 3:45 PM
Updated November 2, 2014 at 9:28 AM
Resolved November 2, 2014 at 9:28 AM