5

I`m just installed a Glassfish 4.1 on Ubuntu 14.04 and trying to ping DerbyPool but it fails with java.net.ConnectException.

Ping Connection Pool failed for DerbyPool. Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused. Please check the server.log for more details.

server.log:

[2015-01-02T20:51:12.361+0200] [glassfish 4.1] [WARNING] [test.connection.pool.failed] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service] [tid: _ThreadID=42 _ThreadName=admin-listener(4)] [timeMillis: 1420224672361] [levelValue: 900] [[ RAR8054: Exception while creating an unpooled [test] connection for pool [ DerbyPool ], Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused.]]

[2015-01-02T20:51:12.366+0200] [glassfish 4.1] [SEVERE] [] [org.glassfish.admingui] [tid: _ThreadID=40 _ThreadName=admin-listener(2)] [timeMillis: 1420224672366] [levelValue: 1000] [[ RestResponse.getResponse() gives FAILURE. endpoint = 'http://localhost:4848/management/domain/resources/ping-connection-pool.json'; attrs = '{id=DerbyPool}']]

The same problem is occurring on another computer with Glassfish 4.1 and Ubuntu 14.04 installed on it.

user3601262
  • 651
  • 1
  • 7
  • 22

1 Answers1

15

I guess you didn't start the Derby server.

To start it, go to the command line and navigate to a folder where you can run asadmin (probably something like /glassfish/bin) and run the following:

asadmin start-database

Then try pinging again.

unwichtich
  • 13,712
  • 4
  • 53
  • 66
  • Hey, I get error ```RAR5117 : Failed to obtain/create connection from connection pool [ DerbyPool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused (Connection refused).]]``` alot and my production CPU goes high. I am not using this derby pool but still get this error sometimes. How to solve? – Asgar Apr 07 '23 at 05:12