Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

java

ofbiz

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

[email protected] [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
[email protected] [erp]#
like image 264
apf Avatar asked Nov 26 '25 14:11

apf


1 Answers

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

like image 152
Bilgin Ibryam Avatar answered Nov 28 '25 03:11

Bilgin Ibryam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!