Windows service not installed after updating from 4.3.0 to 4.3.1

When installing Openfire 4.3.1 over Openfire 4.3.0 the installer is not able to install service “Openfire” (error Could not install service “Openfire”).

System is Windows 7 Enterprise with Java 1.8.0_121, installer was run as administrator and did choose upgrade existing installation.
Result is the Openfire service that is still there (from the Openfire 4.3.0 ?) is disabled and I can not use this one to start Openfire. Of course I can start by hand, but that is not the real thing.

Did not yet test whether it solves itself after rebooting (machine is in use). I will add that information when I tested this.

I have upgraded from 4.3.0 to 4.3.1 and Windows service installed correctly. Also works. Windows 7 Pro x64, using bundled Java x64. Do you use x86 version without Java? Any logs in /openfire/logs/all.log? Btw, moving this to a separate topic.

My Java is x64, used Openfire installer is openfire_4_3_1_x64.exe (without jre).
I stopped the Openfire service of the old Openfire before running the installer.

My all.log is already rotated past the installation time so cannot see. Only thing I see in the error.log is this:

2019.01.25 08:41:28 org.jivesoftware.openfire.container.AdminConsolePlugin - Error stopping admin console server
java.lang.IllegalStateException: !STOPPED
	at org.eclipse.jetty.server.handler.HandlerWrapper.destroy(HandlerWrapper.java:147) ~[jetty-server-9.4.12.v20180830.jar:9.4.12.v20180830]
	at org.eclipse.jetty.webapp.WebAppContext.destroy(WebAppContext.java:593) ~[jetty-webapp-9.4.12.v20180830.jar:9.4.12.v20180830]
	at org.eclipse.jetty.server.handler.HandlerCollection.destroy(HandlerCollection.java:202) ~[jetty-server-9.4.12.v20180830.jar:9.4.12.v20180830]
	at org.jivesoftware.openfire.container.AdminConsolePlugin.shutdown(AdminConsolePlugin.java:228) [xmppserver-4.3.0.jar:4.3.0]
	at org.jivesoftware.openfire.container.AdminConsolePlugin.destroyPlugin(AdminConsolePlugin.java:246) [xmppserver-4.3.0.jar:4.3.0]
	at org.jivesoftware.openfire.container.PluginManager.shutdown(PluginManager.java:143) [xmppserver-4.3.0.jar:4.3.0]
	at org.jivesoftware.openfire.XMPPServer.shutdownServer(XMPPServer.java:1158) [xmppserver-4.3.0.jar:4.3.0]
	at org.jivesoftware.openfire.XMPPServer.access$800(XMPPServer.java:152) [xmppserver-4.3.0.jar:4.3.0]
	at org.jivesoftware.openfire.XMPPServer$ShutdownHookThread.run(XMPPServer.java:1094) [xmppserver-4.3.0.jar:4.3.0]

2019.01.25 08:57:13 org.jivesoftware.openfire.container.AdminConsolePlugin - Error stopping admin console server
java.lang.IllegalStateException: !STOPPED
	at org.eclipse.jetty.server.handler.HandlerWrapper.destroy(HandlerWrapper.java:147) ~[jetty-server-9.4.12.v20180830.jar:9.4.12.v20180830]
	at org.eclipse.jetty.webapp.WebAppContext.destroy(WebAppContext.java:593) ~[jetty-webapp-9.4.12.v20180830.jar:9.4.12.v20180830]
	at org.eclipse.jetty.server.handler.HandlerCollection.destroy(HandlerCollection.java:202) ~[jetty-server-9.4.12.v20180830.jar:9.4.12.v20180830]
	at org.jivesoftware.openfire.container.AdminConsolePlugin.shutdown(AdminConsolePlugin.java:228) [xmppserver-4.3.1.jar:4.3.1]
	at org.jivesoftware.openfire.container.AdminConsolePlugin.destroyPlugin(AdminConsolePlugin.java:246) [xmppserver-4.3.1.jar:4.3.1]
	at org.jivesoftware.openfire.container.PluginManager.shutdown(PluginManager.java:143) [xmppserver-4.3.1.jar:4.3.1]
	at org.jivesoftware.openfire.XMPPServer.shutdownServer(XMPPServer.java:1158) [xmppserver-4.3.1.jar:4.3.1]
	at org.jivesoftware.openfire.XMPPServer.access$800(XMPPServer.java:152) [xmppserver-4.3.1.jar:4.3.1]
	at org.jivesoftware.openfire.XMPPServer$ShutdownHookThread.run(XMPPServer.java:1094) [xmppserver-4.3.1.jar:4.3.1]
(Yes, this error is there for both openfire 4.3.0 and openfire 4.3.1, don't know whether it has something to do with my problem).

You can try stopping it again and the service (although it is not required, installed should stop it on itself). Wipe the logs. Try installing on top again. Then check the logs.

Stopped Openfire and cleaned log directory. Run installer again, still the same: error Could not install service “Openfire”. There is nothing in the log, in fact running the installer does not create any log (log directory still empty).
Running Openifre by hand works fine, no errors in logs.

Turned machine off during the weekend, booted today. The Openfire service is gone now. Run the installer again, now it is fine and correctly installs the Openfire service. Starts and runs without errors until now.

So, something was stuck in the system and didn’t release service file maybe. Restart fixed that “still in use” problem.

I think it was yes, seems solved now.

Maybe 1 thing to test: although I was using the 64 bits version already until the Opnfire 4.3.0 I still installed in the c:\Program Files (x86)\ folder (upgrading the old versions).
From Openfire 4.3.0 I installed in the C:\Program Files\ folder using the Upgrade Guide , following " Windows EXE (upgrading from x86 to x64 version)" used option 2.

The Openfire 4.3.1 version is now the first installer to update after “switchting” from the Program Files (x86) folder to the Program Files folder. Maybe thats why something got stuck with the service.
For now it is solved for me.

Maybe. Although the installer should uninstall old service, but maybe it was trying to uninstall using file from the old location (which doesn’t exist). But that doesn’t explain why it has removed the service after the reboot. Looks more likely that file was in use for some reason. As i reboot my PC daily, i haven’t run into such problem. Maybe that’s just a rare case and not many users will run into this.