I am trying to configure my Openfire Server with an instance of MS SQL Server 2008.
I must admit that while I have used Sql Server extensively I have been successfully in using it in spite of myself as I am certainly not an expert (bottom line, you should not assume that I already made any obvious configurations). I also apologize in advance if there is anything so obviously wrong that this is a waste of time question.
My Basic SQL Information/Configuration
- Server name: PALBU\PALBUSQL
- Authentication: Sql Server Authentication
- Login: sa
- Password: mypassword
(the database I am trying to use it named ‘openfire’)
Here is my Openfire Settings
Admin Console Port: 9090
Secure Admin Console Port: 9091
I selected ‘Standard Database Connection’ under 'Database Settings’Database Settings - Standard Connection
Database Driver Presets: Microsoft SQLServer
JDBC Driver Class: net.sourceforge.jtds.jdbc.Driver
Database URL: jdbc:jtds:sqlserver://PALBU/opemfire;appName=jive
Minimum Connections: 5
Maximum Connections: 25
Connection Timeout: 1.0 Days
When I try to connect I get an error message 'A connection to the database could not be made You may view the error message error.log’Here is the Output from the error.log file
2011.07.12 11:10:43 Prototype java.sql.SQLException: Network error IOException: Connection refused: connect at net.sourceforge.jtds.jdbc.ConnectionJDBC2.(ConnectionJDBC2.java:385) at net.sourceforge.jtds.jdbc.ConnectionJDBC3.(ConnectionJDBC3.java:50) at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:182) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at org.logicalcobwebs.proxool.DefaultConnectionBuilder.buildConnection(DefaultConn ectionBuilder.java:39) at org.logicalcobwebs.proxool.Prototyper.buildConnection(Prototyper.java:159) at org.logicalcobwebs.proxool.Prototyper.sweep(Prototyper.java:102) at org.logicalcobwebs.proxool.PrototyperThread.run(PrototyperThread.java:44) Caused by: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:3 04) at net.sourceforge.jtds.jdbc.SharedSocket.(SharedSocket.java:255) at net.sourceforge.jtds.jdbc.ConnectionJDBC2.(ConnectionJDBC2.java:310) … 8 more
Some Additiona Information that may be useful.
SQL is configured to ‘Accept remote connections to this server’ and the port number in use is the default. There is a firewall in use but Openfire and SQL are on the same machine right now and the firewall has been disabled.
I tried Telneting to localhost at port 1443 using PuTTy but no connection was able to be made. In fact PuTTy just closed. (Not sure if this was the right way to check using Telnet I just don’t know any better not that experienced with server issues)
Also I completed the steps in the Openfire Database Installtion Guide as follows.
- Create a new database using Enterprise Manager if you do not already have a database you want to use. You may wish to name the database “openfire”.
- Create a user to access the database if you do not already have one you’d like to use. Consider making the default database for the user be the one you created in step 1.
- Open the Query Analyser and connect to the server.
- Select the database you want to use for Openfire from the DB drop down (the one you created in step 1 if you’re using a new database).
- Open the openfire_sqlserver.sql file.
- Press F5 to run the script. The script will run and create the necessary tables.
- Proceed to the Openfire setup tool and use the appropriate JDBC settings when prompted.
If anyone could help explain what I might be doing wrong it would be greatly appreciated.