运行 opentaps 时无法从池中获取新连接

Unable to acquire a new connection from the pool while running opentaps

我正在尝试在 Ubuntu 14.04 服务器和 MySQL 5.5.43 上安装 opentaps。我正在使用从 windows 到 ubuntu 服务器的 Putty 到 RDC,并进行所有必需的更改。

我已成功安装 MySQL、创建数据库 "opentaps"、创建用户 "opentaps" 和密码 "opentaps"、授予用户权限。

我已经按照以下说明更改了文件 framework/entity/config/entityengine.xml: http://www.opentaps.org/docs/index.php/Using_opentaps_ERP_%2B_CRM_with_MySQL

在我运行"ant run-install"之后,我得到了这个错误:

[java] ---- exception report ----------------------------------------------------------
     [java] Failure in findListIteratorByCondition operation for entity [DynamicView]: org.ofbiz.entity.GenericDataSourceException: Unable to esablish a connection with the database. (Unable to acquire a new connection from the pool). Rolling back transaction.
     [java] Exception: org.ofbiz.entity.GenericDataSourceException
     [java] Message: Unable to esablish a connection with the database. (Unable to acquire a new connection from the pool)
     [java] ---- cause ---------------------------------------------------------------------
     [java] Exception: java.sql.SQLException
     [java] Message: Unable to acquire a new connection from the pool
     [java] ---- cause ---------------------------------------------------------------------
     [java] Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException
     [java] Message: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
     [java] ---- cause ---------------------------------------------------------------------
     [java] Exception: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException
     [java] Message: Communications link failure
     [java]
     [java] The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
     [java] ---- cause ---------------------------------------------------------------------
     [java] Exception: java.net.ConnectException
     [java] Message: Connection refused

请帮帮我。 谢谢

我找到了我面临的问题的解决方案。

发生这种情况是因为我在 Ubuntu 服务器上安装了 opentaps,并且我在“entityengine.xml”配置文件。而它需要使用正在进行安装的服务器的 IP 地址。如:

jdbc-uri="jdbc:mysql://Server IP/opentaps?autoReconnect=true&useOldAliasMetadataBehavior=true"

还需要给MySQL用户授予服务器IP地址的权限。如:

授予 opentaps.* 的所有权限给 'opentaps'@'服务器 IP' 由 'opentaps-password' 标识并带有授权选项;

谢谢。