Thursday, December 27, 2012

Installing OpenFire on a Mac OSX 10.6 Snow Leopard



Installed OpenFire is a real time collaboration (RTC) server on Mac OS X 10.6 Snow Leopard


Create a new user for OpenFire database, instead of using root in mySQL database on Mac OS X 10.6 Snow Leopard.

Download the tar.gz and unzip the latest JDBC driver for mySQL from http://www.mysql.com/downloads/connector/j/

To Installation JDBC driver in Mac OSX 10.6 Snow Leopard:
Copy the file mysql-connector-java-5.1.22-bin.jar to the directory /Library/Java/Extensions/


Login to mysql (if you don't have set a password for database-root account yet, forgot about the "-p" parameter)

shell> mysql -p -u root

create a new database 'openfire':
mysql> CREATE DATABASE openfire;

create a new user 'openfirexxx':
mysql> CREATE USER 'openfirexxx'@'localhost' IDENTIFIED BY 'your-new-password';

Remove permissions if users already exists:
mysql> REVOKE ALL ON *.* FROM openfire;
ERROR 1141 (42000): There is no such gran defined for user 'openfirexxx' on host '%' | this is a good error

Give user 'openfirexxx' only rights for table 'openfire' and important using any IP connection ->@'%'
mysql> GRANT ALL PRIVILGES ON openfire.* TO openfirexxx @'%' WITH GRANT OPTION; 

logout
mysql> exit

import OpenFire mySQL database schema on Mac OS X:
shell> cat /usr/local/openfire/resources/database/openfire_mysql.sql | /usr/local/mysql/bin/mysql -p openfire;

Following  OpenFire installation screens and when you get to page localhost:9090/setup/setup-profile-settings.jsp
I got the following error:

HTTP ERROR 500

Problem accessing /setup/setup-profile-settings.jsp. Reason:

java.lang.NullPointerException
 at org.jivesoftware.openfire.admin.setup.setup_002dprofile_002dsettings_jsp._jspService(setup_002dprofile_002dsettings_jsp.java:80)

Trying the following fix: 

On ANY Mac w/ a 64-bit processor, you need to go into Applications --> Utilities --> Java Preferences and once you open the utility console you need to move the 32-bit version to the top of the priority list.

Reboot your machine! This solved the above error.

The errors continued.....

Could not find error.log, warn.log, etc and and Java Error on port 5229 - 

List of All ports on Mac
http://support.apple.com/kb/TS1629

Port 5229 is free?

So I just created the the logs required error.log, warn.log, info.log and debug.log and change permissions for this file to be writable by current user. 

Changed permission on 
/usr/local/openfire/bin/extra/openfire-launchd-wrapper.sh  to start and stop correctly from non-root account.

One last gotcha, log-in using admin instead of the your email id for admin user!!!!! 

Success ! Server is now working! 

Command line start / stopping of OpenFire

To start service:
sudo launchctl load /Library/LaunchDaemons/org.jivesoftware.openfire.plist


To stop service:
sudo launchctl unload /Library/LaunchDaemons/org.jivesoftware.openfire.plist


Spark Issues
Spark on top of this and make sure to install the plugin for "Search" on the server so you can find other users! http://community.igniterealtime.org/thread/47523


Firewall Ports for IM Client (using Spark) check your firewall: 
1) admin console that runs on port 9090
2) openfire im client must reach im traffic on port 5222
3) port 7777, for file transfers; these are the defaults.
re : http://www.openlogic.com/wazi/bid/188135/Instant-Messaging-in-the-Enterprise-with-Openfire










No comments:

Post a Comment