Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Derby Pool ping fails with java.net.ConnectException in Glassfish

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.

like image 505
user3601262 Avatar asked Jan 02 '15 19:01

user3601262


1 Answers

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.

like image 140
unwichtich Avatar answered Nov 19 '22 04:11

unwichtich