Book Image

Apache OfBiz Cookbook

Book Image

Apache OfBiz Cookbook

Overview of this book

Apache Open For Business (OFBiz) is an enterprise resource planning (ERP) system that provides a common data model and an extensive set of business processes. But without proper guidance on developing performance-critical applications, it is easy to make the wrong design and technology decisions. The power and promise of Apache OFBiz is comprehensively revealed in a collection of self-contained, quick, practical recipes in this Cookbook. This book covers a range of topics from initial system setup to web application and HTML page creation, Java development, and data maintenance tasks. Focusing on a series of the most commonly performed OFBiz tasks, it provides clear, cogent, and easy-to-follow instructions designed to make the most of your OFBiz experience. Let this book be your guide to enhancing your OFBiz productivity by saving you valuable time. Written specifically to give clear and straightforward answers to the most commonly asked OFBiz questions, this compendium of OFBiz recipes will show you everything you need to know to get things done in OFBiz. Whether you are new to OFBiz or an old pro, you are sure to find many useful hints and handy tips here. Topics range from getting started to configuration and system setup, security and database management through the final stages of developing and testing new OFBiz applications.
Table of Contents (15 chapters)
Apache OFBiz Cookbook
Credits
About the Author
About the Reviewers
Preface

Fixing IP port collision errors


One of the most common OFBiz startup errors involves IP port collisions. OFBiz requires several Internet Protocol (IP) ports to run. All OFBiz downloads have these ports set to default values so that you may start up OFBiz without further configuration.

Occasionally, these default values are in conflict with IP ports used by other software already running on your system. If OFBiz cannot acquire the ports it needs to run, it will immediately shutdown and you will receive an error similar to the following on the command line (from which you started OFBiz):

(main) [ Http11Protocol.java:178:ERROR]
Error initializing endpoint java.net.BindException: Address already in use: 8080

Getting ready

To remedy IP port conflicts, you may either turn off the software using the ports OFBiz needs or you can change the OFBiz configuration so that it uses ports not used by other software.

How to do it...

To change the OFBiz IP port configuration, perform the following:

  1. 1. Determine the port(s) that is/are in conflict by observing the console or command line window. Alternatively, you may view the primary OFBiz log file located in ~/runtime/logs/ofbiz.log

  2. 2. Locate the OFBiz configuration file where the port is set.

  3. 3. Edit the OFBiz configuration by changing the port number to a non-conflicting value.

  4. 4. Restart OFBiz.

How it works...

For example, to fix collisions on port 8080, the IP port that OFBiz listens on for HTTP requests, navigate to the ofbiz-containers.xml file as shown in the following figure and change the value for port 8080 to another port not in use.

Note

Note: Setting the HTTP port to a value between 1-1024 may require operating system administrative privileges in order to start up OFBiz. This is a constraint placed on these ports outside the control of OFBiz.

There's more...

The following is a list of IP port configuration file locators for reference:

Port #

Configuration file location relative to install directory

Port usage note

8080

~framework/base/config/ofbiz-containers.xml

Tomcat HTTP listener

 

~framework/webapp/config/url.properties

Internal HTTP port *

8443

~framework/base/config/ofbiz-containers.xml

Tomcat HTTPS listener

 

~framework/webapp/config/url.properties

Internal HTTPS port *

8009

~framework/base/config/ofbiz-containers.xml

AJP connector

9990

~framework/base/config/ofbiz-containers.xml

BeanShell remote telnet port

9991

~framework/base/config/ofbiz-containers.xml

Second, required telnet port

1099

~framework/base/config/rmi-containers.xml

JNDI/RMI dispatcher

10523

~startofbiz.sh ~startofbiz.bat ~startofbizNoLog.bat ~stopofbiz.sh

Admin port to start/stop OFBiz

389

~framework/base/config/jndiLdap.properties

LDAP port**

* Internal ports are used by OFBiz to translate HTTP port references internal to the framework. For example, OFBiz automatically translates between HTTP and HTTPS if a user requests an Application running on a secure port, but the user enters the wrong protocol and/or port number; OFBiz knows based on these settings how to correct the URL request.

** This port is not checked at OFBiz start-up.