java - Derby Pool ping 在 Glassfish 中因 java.net.ConnectException 而失败

标签 java jakarta-ee glassfish ubuntu-14.04

我刚刚在 Ubuntu 14.04 上安装了 Glassfish 4.1 并尝试对 DerbyPool 执行 ping 操作,但它因 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.

服务器日志:

[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}']]

在另一台安装了 Glassfish 4.1 和 Ubuntu 14.04 的计算机上出现了同样的问题。

最佳答案

我猜你没有启动 Derby 服务器。

要启动它,请转到命令行并导航到可以运行 asadmin 的文件夹(可能类似于 /glassfish/bin)并运行以下命令:

asadmin start-database

然后再次尝试 ping。

关于java - Derby Pool ping 在 Glassfish 中因 java.net.ConnectException 而失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27747479/

相关文章:

java - 是否有任何基于现代 Java EE 堆栈(Spring/EJB、JPA)的 CRM?

java - 在具有最低特殊字符要求的 Java 中生成安全随 secret 码

jakarta-ee - 子容器在启动期间失败

java - 如何将 'sub-rows' 插入 Wicket 数据表

java - 有状态 session bean,返回对象

java - 带有 JMS 队列的同步消费者

jsf - 为什么我在 Tomcat 上运行时在我的 jsf 页面中看到 #{UserBean.userName} 但它在 Glassfish 上运行良好

java - Web 客户端应用程序收到 "unable to find valid certification path to requested target"

java - Spring 数据休息: Null Pointer If-Modified-Since Header Present and Resource Not Auditable