Skip to main content
Known Participant
May 22, 2009
Question

Error Message in CF Admin CF 8 on Mac OS 10.5.7

  • May 22, 2009
  • 1 reply
  • 1247 views

For some reason my connections to my local database don't work anymore. I keep getting this error message in CF admin when I verify my connection, any help would be appreciated.

Mac OS 10.5.7 2.4 Ghz 4 GB RAM
CF 8
MySQL 4/5

Connection verification failed for data source: nsgeuLocal
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.ConnectException MESSAGE: Connection refused STACKTRACE: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432) at java.net.Socket.connect(Socket.java:520) at java.net.Socket.connect(Socket.java:470) at java.net.Socket.(Socket.java:367) at java.net.Socket.(Socket.java:209) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:173) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:267) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2739) at com.mysql.jdbc.Connection.(Connection.java:1553) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266) at coldfusion.server.j2ee.sql.pool.JDBCPool.createPhysicalConnection(JDBCPool.java:589) at coldfusion.server.j2ee.sql.pool.ConnectionRunner$RunnableConnection.run(ConnectionRunner.java:67) at java.lang.Thread.run(Thread.java:613) ** END NESTED EXCEPTION ** Last packet sent to the server was 0 ms ago.
The root cause was that: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.ConnectException MESSAGE: Connection refused STACKTRACE: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432) at java.net.Socket.connect(Socket.java:520) at java.net.Socket.connect(Socket.java:470) at java.net.Socket.(Socket.java:367) at java.net.Socket.(Socket.java:209) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:173) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:267) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2739) at com.mysql.jdbc.Connection.(Connection.java:1553) at com.mysql.jdbc.NonReg...

This topic has been closed for replies.

1 reply

September 8, 2009

I just had this happen to me, but I fixed it. I am also using CF8 and MySQL 5 on my Mac (Leopard) for development purposes.  I had edited my hosts file and like a dummy I moved "127.0.0.1 localhost" from where is should be near the top down to the middle with my other mappings.

I discovered this as the problem when I changed CF admin to use "127.0.0.1" instead of "localhost" and it verified the connection okay.  Obviously I want to make sure "localhost" is working properly too for this and many other reasons.

Here's how I fixed it:

1) Fixed my hosts file to have this at the top:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##

#I had mistakenly commented the next line out:
127.0.0.1        localhost
255.255.255.255  broadcasthost
::1              localhost
fe80::1%lo0      localhost

2) Removed the entry for "localhost" I had put with my long list of domains for testing lower in the file.

3) Flushed my cache via the terminal:

dscacheutil -flushcache

4) Stopped and started the Coldfusion server.  It actually encountered a problem and shutdown "ungracefully". No problems as I simply started it again and all is good.

I hope this solution saves someone some time.  It pays to double-check your hosts file for errors, as well as your httpd-vhosts.conf file when serving locally.  This is handy for testing that file and Apache in general:

apachectl configtest