powered by Jive Software

Cannot start Openfire server after upgrading to Snow Leopard

Trying to start the openfire server after upgrading to Snow Leopard. System preferences changes to 32-bit mode. However when i click on the start server button I get a popup that says simply “Error! Could not start Openfire server.” Any Ideas?

This what i have in console… Continues to repeat like it says every 10 seconds!

8/30/09 10:45:44 AM com.apple.launchd[1] (org.jivesoftware.openfire[36916]) getpwnam(“openfire”) failed

8/30/09 10:45:44 AM com.apple.launchd[1] (org.jivesoftware.openfire[36916]) Exited with exit code: 1

8/30/09 10:45:44 AM com.apple.launchd[1] (org.jivesoftware.openfire) Throttling respawn: Will start in 10 seconds

8/30/09 10:45:54 AM com.apple.launchd[1] (org.jivesoftware.openfire[36917]) getpwnam(“openfire”) failed

8/30/09 10:45:54 AM com.apple.launchd[1] (org.jivesoftware.openfire[36917]) Exited with exit code: 1

8/30/09 10:45:54 AM com.apple.launchd[1] (org.jivesoftware.openfire) Throttling respawn: Will start in 10 seconds

8/30/09 10:46:04 AM com.apple.launchd[1] (org.jivesoftware.openfire[36918]) getpwnam(“openfire”) failed

8/30/09 10:46:04 AM com.apple.launchd[1] (org.jivesoftware.openfire[36918]) Exited with exit code: 1

8/30/09 10:46:04 AM com.apple.launchd[1] (org.jivesoftware.openfire) Throttling respawn: Will start in 10 seconds

8/30/09 10:46:14 AM com.apple.launchd[1] (org.jivesoftware.openfire[36919]) getpwnam(“openfire”) failed

8/30/09 10:46:14 AM com.apple.launchd[1] (org.jivesoftware.openfire[36919]) Exited with exit code: 1

8/30/09 10:46:14 AM com.apple.launchd[1] (org.jivesoftware.openfire) Throttling respawn: Will start in 10 seconds

8/30/09 10:46:24 AM com.apple.launchd[1] (org.jivesoftware.openfire[36920]) getpwnam(“openfire”) failed

8/30/09 10:46:24 AM com.apple.launchd[1] (org.jivesoftware.openfire[36920]) Exited with exit code: 1

8/30/09 10:46:24 AM com.apple.launchd[1] (org.jivesoftware.openfire) Throttling respawn: Will start in 10 seconds

8/30/09 10:46:34 AM com.apple.launchd[1] (org.jivesoftware.openfire[36921]) getpwnam(“openfire”) failed

8/30/09 10:46:34 AM com.apple.launchd[1] (org.jivesoftware.openfire[36921]) Exited with exit code: 1

8/30/09 10:46:34 AM com.apple.launchd[1] (org.jivesoftware.openfire) Throttling respawn: Will start in 10 seconds

8/30/09 10:46:40 AM GrowlHelperApp[180] *** attempt to pop an unknown autorelease pool (0x807600)

8/30/09 10:46:44 AM com.apple.launchd[1] (org.jivesoftware.openfire[36922]) getpwnam(“openfire”) failed

8/30/09 10:46:44 AM com.apple.launchd[1] (org.jivesoftware.openfire[36922]) Exited with exit code: 1

8/30/09 10:46:44 AM com.apple.launchd[1] (org.jivesoftware.openfire) Throttling respawn: Will start in 10 seconds

Are you using Openfire with the internal jre package? Then probably it doesnt work because it is 32-bit jre and SL needs 64-bit. You can try installing 64-bit Java JRE in SL and delete /openfire/jre folder if you have such.

I’m not sure how to figure out which instance of JRE is being used by openfire. If it is running on the SL JRE then I’m assuming it is 64 bit. There is no JRE directory under /usr/local/openfire. There is only this file ./resources/nativeAuth/osx-ppc/libshaj.jnilib that is mac related (you probably already know that). Thoughts? Any other ideas?
Thanks.

Well. It was a wild guess about java, maybe this is not the case. I dont use Macs, so i dont know about their specifics. As i look closer at logs, probably it is launcher, which is crashing. Do you have a launcher in OS X to run Openfire (an app with Start, Stop, Admin Console buttons) like we have in Windows? Maybe it is possible to run Openfire without it. Somewhere in the /openfire/bin there should be openfire.sh or some similar script to launch it.

So it was the launcher that was the issue. I did start the server running openfire.sh under “/usr/local/openfire/bin”. So now the the question is how to fix the launcher issue? I need to figure out what script the launcher deamon is running. I am going to look around. Please let me know if you have any ideas. Thanks for your help.

Hi, I would guess a look on build/osx/openfirePrefPane/openfirePrefPane.m maybe help, but I’m no Mac user too, sorry.

So i looked around and found that “launchd” (see my first post above) i.e. mac os’ launch daemon uses files in /Library/LaunchDaemons/ on mac os x startup.

I found the file org.jivesoftware.openfire.plist under /Library/LaunchDaemons/, which is a plist (xml) file

The plist file runs the shell script file /usr/local/openfire/bin/extra/openfire-launchd-wrapper.sh.

The shell script in turn runs the following command /usr/bin/java -server -jar “/usr/local/openfire/lib/startup.jar” -Dopenfire.lib.dir=/usr/local/openfire/lib

When I run the command I get this error…

Exception in thread “main” java.lang.NoClassDefFoundError: org/jivesoftware/util/Log

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

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

Caused by: java.lang.ClassNotFoundException: org.jivesoftware.util.Log

at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

at java.lang.ClassLoader.loadClass(ClassLoader.java:319)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)

at java.lang.ClassLoader.loadClass(ClassLoader.java:254)

at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)

… 2 more

Any ideas?

Funny enough running openfire.sh script under “/usr/local/openfire/bin” runs without a hitch. One thing I can do is replace the "/usr/bin/java -server -jar " command with “openfire.sh”. Anybody see an issue with that?

Speaking of /usr/local/openfire, anybody knows why the permissions are set to:

drwxr-x— 8 openfire 215 272 May 1 17:11 openfire

I had to sudo to chmod on the directory so I could cd to it.

BTW, I run into the same startup issue when I upgraded to Snow Leopard last Friday. It was a bummer.

Hm, I just reinstalled OpenFire, run the configuration and rebooted my Mac.

OpenFire starts and stops without a problem (for now) and I have access to admin console. The other change I made (after installing the server) is run sudo chmod a+rwx on /usr/local/openfire.

I don’t like a solution, which I don’t understand but I will take what I can for now.

Monika,

I was too lazy to want to do a complete re-install but now I guess I have to. thanks for figuring it out. I agree I don’t like solutions that don’t explain what fixed the problem but I guess we can’t complain if it works

Thanks

-Abhilash

This was not my first reintall after upgrading to Snow Leopard so I don’t know if it is going to work for everybody, but it’s worth a try.

I just completed the re-install and the re-boot and I’m back in business. Everything works as it should!!! Thanks to monika for figuring out the solution!

I strongly suspect the problem is with the preference-pane so reinstalling just that might also fix the problem. The Preference pane is located here >> /Library/PreferencePanes/Openfire.prefPane If somebody wants to give it a try and let everybody know, that would be great.

I am glad to hear it worked. I am not a Mac programmer and I know nada about preference panels so can’t help here.

(Hopefully it’s not bad form to post a follow-up question in an “answered” thread…)

All of the information in this thread has been extremely helpful in showing that Openfire will still run on my Snow Leopard install with a little help, but unfortunately I’ve not had the same luck as the posters here in getting it to run automatically by reinstalling it following Snow Leopard. It still refuses to start automatically and via the pref pane.

Anyone else having success or failure with Openfire on Snow Leopard? Any other tips you might suggest?

How did you uninstall openfire? Did you delete all 3 directories of openfire files?

That’s correct. You have to remove the directories (after stopping the server) manually.

Thanks, akaran and Monika for your replies.

Yes indeed, I did remove the directories. Specifically these:

/Library/LaunchDaemons/org.jivesoftware.openfire.plist

/usr/local/openfire

/Library/PreferencePanes/Openfire.prefpane

No luck.

It occurs to me that in the case of the first and third directories, I didn’t remove them, just cleaned out their contents. I can’t imagine that would make a difference, but perhaps I’ll try again and delete the directories too to see if that helps.

I meant to say the contents of directories 1 and 3. I would NOT delete those directories.

Hmmm… Let me walk you through my steps.

  1. Shutown iChat.

  2. Shutdown openfire (kill the process in terminal)

  3. Remove the openfire files.

sudo rm -rf /Library/PreferencePanes/Openfire.prefPane

sudo rm -rf /usr/local/openfire

sudo rm -rf /Library/LaunchDaemons/org.jivesoftware.openfire.plist

  1. Open “System Preferences” to ensure the Openfire pane is removed.

  2. Download and Install the latest version of openfire version 3.6.4 (looks like the database structure changed in version 3.6.0 so verify that you don’t have the old database structure). I did not have to touch my database so I guess my reinstall was easier.

  3. Go through the installation process

  4. Reopen “System Prefs” and ensure the Openfire pane exists and ensure that the Status indicates that the server is “Stopped”. Do NOT restart the server at this point. Ensure that the “Start Openfire When System Turns on” Check box is checked. Toggle it between ON and OFF to ensure no error message pops up.

  5. Reboot the machine.

  6. Reopen the “System Prefs” and ensure the Status indicates that the server is “Running”.

  7. Restart iChat.

I can confirm that the positive results I achieved with OpenFire on Snowl Leopard were with the latest version of the software, which is 3.6.4.

Monika

Thanks much for all the detail. My thought was not to delete those directories initially either; and after I posted my last reply I decided it was still my thought, so I didn’t do it.

My steps are basically the same as yours, although I didn’t try toggling the startup option before rebooting. I just went through everything again including that step, and indeed I get an error: “Could not toggle Openfire startup”.

I keep feeling like maybe it’s a permissions thing on /usr/local/openfire. I note Monika said she had to chmod the directory to get to it, and I see the same thing. As an admin account, I can’t browse it in the Finder nor via Terminal. I can’t sudo to it in Terminal either. To delete the directory, I had to enable root and use that (I couldn’t even sudo chmod the directory with my admin account to let me look at it – I’m blocked at /usr/local).