Installing openfire 3.6.0a on centos system

I am trying to install 3.6.0a on centos 5 using mysql database. at the setup stage on Database Settings it says “A connection to the database could not be made. View the error message by opening the “/logs/error.log” log file, then go back to fix the problem.” check log files don’t make sense but it says connectionn refused.

I have java 6 and mysql 5 installed.

I change the [hostname] to actual server hostname and [database] to openfire’s database. Added “?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8” at the end of Database URL for mysql DB.

please help. tried everything. went through forum. got our system admin to try. stumped.

Did you install the OPF databases?

what is OPF databases?

you’ll need to install the databases, see .html

can’t see database list.

Setup Instructions

  1. Make sure that you are using MySQL 4.1.18 or later (5.x recommended) ¹.
  2. Create a database for the Openfire tables:
    mysqladmin create [databaseName]
    (note: “databaseName” can be something like ‘openfire’)
  3. Import the schema file from the **resources/database** directory of the installation folder:
    Unix/Linux: cat openfire_mysql.sql | mysql [databaseName];
    Windows: type openfire_mysql.sql | mysql [databaseName];

See step 3. The database stuff comes with the installation. You’ll need to navigate on your local file system to find the file, ‘openfire_mysql.sql’.

OPF database installed by using command cat. I even changed file permissions for openfire.xml to writable for setup. still providing the same error.

we have plesk installed on the same server. plesk comes with java 1.4. we’ve installed java 1.6. still confirming if there are 2 javas or 1.

can you connect to the mysql opf db from the command line?

typically opf installs it’s own run time java see /opt/openfire/jre

I change the [hostname] to actual server hostname and [database] to openfire’s database. Added “?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8” at the end of Database URL for mysql DB.

Why do you add this at the end of the Database URL? I would advise against doing that. The JDBC connect string needs to be of the simple form.

DB Connection URL: jdbc:mysql://[hostname]:3306/[database]

This is probably the issue at this point.

the command line for ODF worked. We are trying everything. I think we are going to start a new installation. How do you uninstall openfire? Start from stratch. We’ve installed openfire before through elastix. it was 3.5.1 version and it was very easy to setup.

No. it did not work. double check actual server name. they did this “enabled networking for the mysql service, it think this was the issue”. none of it worked.

I can not know what the database problem is based on this information. What would help is to read (and post here) what is in the log files during restart of OPF (e.g. /etc/init.d/openfire restart). Specifically from /opt/openfire/logs/error.log. Info.log and debug.log may also have useful data. Clearly you could uninstall, and reinstall. But if that does not resolve the issues, what will you do then? It seems you have a complicated enviornment, e.g. plesk and elastix which may intefere with proper OPF functioning, thus it may be useful to look into those log files as well to see if there is anything useful to know.

Command line tools like “netstat -l”, will tell you if mysql service is running on the host. Modifying /etc/init.d/openfire shell script and adding ‘-x’ to the shebang may help you trace the issue as well. There are many debugging techniques you could use, including modifying the java startup command. But you’ve got to be willing to explore these areas as well in order to succeed.

Note I was assuming that the mysql instance is running on the same host as OPF, if not, you’ll need to check firewall rules and issues.

Are you using the correct login and password credentials?

it was jdbc:mysql://localhost:3306/[database]

[database] is the actual database name. also it might have been enable network for mysql service.

it is working now. thank you for your quick response and valuable input.