简体   繁体   中英

Error when starting Apache OFBiz: “java.net.BindException: Address already in use”

I get the following error when running the "ant start" command on my LAMP server. It worked just fine when using the default derby database BUT I did have to change the HTTP and HTTPS ports (they were in use) in the following files: framework/base/config/ofbiz-containers.xml framework/webapps/config/urlproperties

So now that I'm trying to use PostgreSQL I'm getting the following error when trying to start Ofbiz. My best guess is that I also have to change the port for the PostgreSQL JDBC connector too? Where can I do that, or what am I missing?

//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]#

The files you have changed are only for the embedded tomcat instance and the error is telling you that the new port you chose is used by another process.

If you want to change the database port number you can do it in this file: framework/entity/config/entityengine.xml

遵循“URL和端口设置”​​下的说明使用官方的Apache OFBiz技术生产设置指南最终更改我找到的每个引用这些端口的文件,并使其以这种方式工作。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM