Bin/openfire vs. bin/openfire.sh (prebuilt vs source)

there seems to be a discrepency in the available version of openfire (3.3.2)

when downloaded from here: http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3_3_2.t ar.gz the archive contains a “bin/openfire” script for starting/stopping openfire (via bin/extra/openfired)

but when you download the source from here: http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_src_3_3 _2.tar.gz and build using ant, the target directory contains a “bin/openfire.sh” instead. the code looks identical, except of course for whatever reason this version doesn’t act the same when controlled via bin/extra/openfired correctly (Linux) when stopping, it looks as thought it tries to start again. (lots of “port already in use errors”)

Could somebody shed some light on this for me?

thanks.

This could be the same problem I ran into - you’d need install4j. My thread with an answer:

http://www.igniterealtime.org/community/message/155273

openfire_?.tar.gz is an installer media that is supposed to work out of the box. openfire_src_?.tar.gz is for development and not really meant to be executed via bin/extra/openfired. You execute dist.bin ant task in openfire_src_?.tar.gz to build openfire_?.tar.gz.

@Op3racional

Install4j is necessary to build installer ant task (meant for windows), but not needed if you just want to generate tar.gz.

thanks, but one more question.

after executing “ant dist.bin -buildfile build.xml” it successfully built. in target there is an “openfire” and a “release” directory. i assume that the “release” directory is what should be used.

but in “release/openfire/bin” the file is still “openfire.sh” instead of “openfire”. (i also checked the generated openfire_3_3_2.tar.gz, and it also contains openfire.sh)

why is it different from the public tar.gz file offered?

when trying out the built distribution, i get errors when trying to stop the server. after the errors print, the server is still running. is this a bug or am i doing something wrong?

$ sudo ./openfired status

openfire is not running

$ sudo ./openfired start

.$ …

Openfire 3.3.2

Admin console listening at http://localhost:9090

$ sudo ./openfired stop

$ Error creating server socket

java.net.BindException: Address already in use

at java.net.PlainSocketImpl.socketBind(Native Method)

at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)

at java.net.ServerSocket.bind(ServerSocket.java:319)

at java.net.ServerSocket.(XMPPServer.java:148)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor AccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:494)

at java.lang.Class.newInstance0(Class.java:350)

at java.lang.Class.newInstance(Class.java:303)

at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:93)

at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:49)

Openfire 3.3.2

Could not start admin conosle server

java.net.BindException: Address already in use

at sun.nio.ch.Net.bind(Native Method)

at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)

at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)

at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:1 98)

at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:251)

at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.jav a:233)

at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)

at org.mortbay.jetty.Server.doStart(Server.java:221)

at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)

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

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

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

at org.jivesoftware.openfire.container.PluginManager.access$200(PluginManager.java :46)

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

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

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

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

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101 (ScheduledThreadPoolExecutor.java:65)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodi c(ScheduledThreadPoolExecutor.java:142)

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

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java: 650)

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

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

Admin console listening at http://localhost:9090