编程语言
首页 > 编程语言> > 启动Apache OFBiz时出错:“java.net.BindException:Address in in use”

启动Apache OFBiz时出错:“java.net.BindException:Address in in use”

作者:互联网

在LAMP服务器上运行“ant start”命令时出现以下错误.使用默认的derby数据库时它工作得很好但是我必须在以下文件中更改HTTP和HTTPS端口(它们正在使用中):
框架/碱/配置/的ofbiz-containers.xml
框架/ webapps /目录的config / urlproperties

所以现在我正在尝试使用PostgreSQL我在尝试启动Ofbiz时遇到以下错误.
我最好的猜测是我还必须更改PostgreSQL JDBC连接器的端口?我在哪里可以做到,或者我错过了什么?

// START TERMINAL OUTPUT

root@server.domain.com [erp]# ./ant start
Buildfile: /home/username/public_html/erp/build.xml

start:
     [java] Start.java using configuration file org/ofbiz/base/start/start.properties
     [java] Set OFBIZ_HOME to - /home/username/public_html/erp
     [java] Exception in thread "main" org.ofbiz.base.start.StartupException: Couldn't create server socket(/127.0.0.1:10523)
     [java]     at org.ofbiz.base.start.Start$AdminPortThread.<init>(Start.java:405)
     [java]     at org.ofbiz.base.start.Start.createListenerThread(Start.java:163)
     [java]     at org.ofbiz.base.start.Start.init(Start.java:222)
     [java]     at org.ofbiz.base.start.Start.main(Start.java:131)
     [java] Caused by: java.net.BindException: Address already in use
     [java]     at java.net.PlainSocketImpl.socketBind(Native Method)
     [java]     at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)
     [java]     at java.net.ServerSocket.bind(ServerSocket.java:376)
     [java]     at java.net.ServerSocket.<init>(ServerSocket.java:237)
     [java]     at org.ofbiz.base.start.Start$AdminPortThread.<init>(Start.java:403)
     [java]     ... 3 more
     [java] Java Result: 1

BUILD SUCCESSFUL
Total time: 2 seconds
root@server.domain.com [erp]#

解决方法:

您更改的文件仅适用于嵌入式tomcat实例,错误告诉您所选的新端口由另一个进程使用.

如果要更改数据库端口号,可以在此文件中执行:framework / entity / config / entityengine.xml

标签:java,ofbiz
来源: https://codeday.me/bug/20190831/1773063.html