[bug] Can't disable admin port

Hi. Having a strange situation where Openfire won’t accept -1 for the admin console port. I was just upgrading openfire and I compiled fresh from GIT. Used to work, now it doesn’t. I’ve tried “0” and leaving the property out but in those cases it defaults to 9091 and active. My OS is x86_64 GNU/Linux

(upgraded from svn20130916 aka 3.8.2)

This is the message I get:

Openfire 3.10.0 Alpha [Jul 30, 2014 11:10:42 AM]

Warning: admin console not started due to configuration settings.

Here’s what’s in my config:

-1

43210

I also get this in the error log:

2014.07.30 12:10:42 org.jivesoftware.openfire.container.AdminConsolePlugin -

java.lang.NullPointerException

at org.eclipse.jetty.server.HttpConfiguration.(HttpConfiguration.java:77)

at org.jivesoftware.openfire.container.AdminConsolePlugin.startup(AdminConsolePlug in.java:168)

at org.jivesoftware.openfire.container.AdminConsolePlugin.initializePlugin(AdminCo nsolePlugin.java:239)

at org.jivesoftware.openfire.container.PluginManager.loadPlugin(PluginManager.java :481)

at org.jivesoftware.openfire.container.PluginManager.access$300(PluginManager.java :80)

at org.jivesoftware.openfire.container.PluginManager$PluginMonitor.run(PluginManag er.java:1072)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)

at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301 (ScheduledThreadPoolExecutor.java:178)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Schedu ledThreadPoolExecutor.java:293)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

at java.lang.Thread.run(Thread.java:722)

I looked in AdminConsolePlugin.java and don’t see how it’s possible.

Thanks,

Sean

Oops I left out an important detail… If I configure a port for it I do get my https admin console working as well.

I took another look at this and found the bug. I am using the latest GIT master clone.

Line 168 passes httpConfig as a configuration to copy from but since the http port is disabled this variable is null.

HttpConfiguration httpsConfig = new HttpConfiguration(httpConfig);

I replaced that line with these two:

HttpConfiguration httpsConfig = new HttpConfiguration();

httpsConfig.setSendServerVersion( false );

‘send server version’ is the only thing that would appear to be missed if you don’t copy from the http configuration.

Please feel free to send a pull request on this matter.

I assume you mean somehow publish my changes? I don’t really know much about git.

Creating a pull request may help. You want to create a branch on your forked repo and then commit your change to that branch and push the branch up to your github fork. Github website will then give you an easy UI to make the pull request.

Ok I created a pull request “fix enabling https admin port without http enabled #126

Git doesn’t like my browser and it was an insane hassle for a simple 2 line edit but I got it done.