powered by Jive Software

Openfire 3.3.2 MySQL Install Problems

Hey All,

Trying to install Openfire on my gentoo box. I started by emerging 3.3.1 and could not get Openfire to communicate with my MySQL 5 server at all. I get this message durring startup and no output in the log files at all:

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.

After triple checking th database, user, and password I was still getting the same issue. I then umnerged 3.3.1 and manualy installed 3.3.2 from th website. Again I am having the same issues and can not get OF to communicate with the MySQL server. I have tried using localhost, 127.0.0.1, the box domain and the external IP…all of which should be valid to connect to the DB.

System Info:

Gentoo 2007.0 up to date

MySQL 5.0.38

jdbc-mysql 3.1.13

Any help would be greatly appreciated.

Thanks in advance,

Ryan

Sorry…forgot to add this to the system info:

Java 1.6.0 (JDK)

Well, I have managed to get some output in th log files now.

Here is the error.log output

http://pastebin.com/m5cbce639

Hi Ryan, welcome to Igniterealtime community B-).

A Connection refused error is more likely a TCP/IP connection error rather than mysql authentication error. Can you try telneting to your mysql (default port: 3306) and see if you get the same error. If your openfire and mysql server are in the same server the command would be something like:

telnet localhost 3306

If the telnet is successful, does your mysql.user table contains rows defining that your openfire user could connect from ‘localhost’ and ‘127.0.0.1’? If they’re not there, you need to insert them and restart mysql or rehash the permission.

I have tried with the mysql permissions set to localhost, 127.0.0.1, or any…and no go. I have checked the MySQL server logs and it seems that OpenFire is not even making it to the server at all. I see no records of it trying to access the server what so ever.

Is your mysql running on a different server than openfire? If so, perhaps there’s a firewall in the mysql server.

You shouln’t be getting the error if both of them run on the same server.

Nope…both on the same machine…and I have tested the user/pass/database with a php script run as the Openfire user…and the MySQL server is fine.

Can you copy and paste your conf/openfire.xml here?

Edit your MySQL configuration file (my.cnf) and comment out “skip-networking”. Restart MySQL and you can connect through TCP/IP on the default port.

By default most MySQL installations allow only connections through a socket.

I am using the standard config file out of the box to get things up and running. My MySQL server is configured to allow TCP/IP connectivity. I have quite a few local and remote sites using the DB server.

<?xml version=“1.0” encoding=“UTF-8”?>

<!–

This file stores bootstrap properties needed by Openfire.

Property names must be in the format: “prop.name.is.blah=value”

That will be stored as:

<prop>

<name>

<is>

<blah>value</blah>

</is>

</name>

</prop>

Most properties are stored in the Openfire database. A

property viewer and editor is included in the admin console.

–>

<!-- root element, all properties must be under this element -->

<jive>

<adminConsole>

<!-- Disable either port by setting the value to -1 -->

<port>9095</port>

<securePort>9096</securePort>

</adminConsole>

<admin>

<!-- Use this section to define users that will have admin privileges. Below,

you will find two ways to specify which users are admins. Admins will

have access to the admin console (only local users) and may have also access

to other functionalities like ad-hoc commands. -->

<!-- By default, only the user with the username “admin” can login

to the admin console. Alternatively, you can specify a comma-delimitted

list usernames that should be authorized to login to the admin console

by setting the <authorizedUsernames> field below. -->

<!-- <authorizedUsernames></authorizedUsernames> -->

<!-- Comma-delimitted list of bare JIDs. The JIDs may belong to local

or remote users. -->

<!-- <authorizedJIDs></authorizedJIDs> -->

</admin> <!-- Use this section to define users that will have admin privileges. Below,

you will find two ways to specify which users are admins. Admins will

have access to the admin console (only local users) and may have also access

to other functionalities like ad-hoc commands. -->

<!-- By default, only the user with the username “admin” can login

to the admin console. Alternatively, you can specify a comma-delimitted

list usernames that should be authorized to login to the admin console

by setting the <authorizedUsernames> field below. -->

<!-- <authorizedUsernames></authorizedUsernames> -->

<!-- Comma-delimitted list of bare JIDs. The JIDs may belong to local

or remote users. -->

<!-- <authorizedJIDs></authorizedJIDs> -->

</admin>

<locale>en</locale>

<!-- Network settings. By default, Openfire will bind to all network interfaces.

Alternatively, you can specify a specific network interfaces that the server

will listen on. For example, 127.0.0.1. This setting is generally only useful

on multi-homed servers. -->

<!-- <network>

<interface></interface>

</network> -->

<connectionProvider>

<className>org.jivesoftware.database.DefaultConnectionProvider</classNa me>

</connectionProvider>

<database>

<defaultProvider>

<driver>com.mysql.jdbc.Driver</driver>

<serverURL>jdbc:mysql://127.0.0.1:3306//gvacim</serverURL>

<username>gvacim</username>

<password>*********</password>

<minConnections>5</minConnections>

<maxConnections>15</maxConnections>

<connectionTimeout>1.0</connectionTimeout>

</defaultProvider>

</database>

</jive>

What do you get when remove one of the front slash in the file so that it becomes:

<serverURL>jdbc:mysql://127.0.0.1:3306/gvacim</serverURL>