binding ofbiz ports 80|443, non root, without apache

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

binding ofbiz ports 80|443, non root, without apache

Whoa!
I am using ofbiz-rel9.04-current.zip.  This is a new install is on CentOS running as a non-root user.  Web services are direct from OFBiz, so no other front end web server.

I've searched quite a bit but found little on this subject.  Since I wasn't sure how to proceed, I configured against a separate instance of Tomcat 6.0.16 and added JSVC.  Once Tomcat looked good, I copied JSVC and supporting files to ofbiz home and changed port settings to 80|443.  

OFBiz/JSVC starts and seems to function just fine, but I'd like guidance on the proper way to start and stop the application with JSVC as I'm not sure the method used is correct.  I'll be happy to study docs related to OFBiz with JSVC if anyone can direct me to the links.  

I then copied jsvc, tools.jar, and commons-daemon.jar to ofbiz home.  Ports were changed to 80|443 in ./framework/webapp/config/url.properties, ./framework/base/config/ofbiz-containers.xml, and ./framework/service/config/serviceengine.xml.

startofbiz.sh was changed to:
  ./jsvc -pidfile ofbiz.pid -user someNonRootUser -debug -cp tools.jar:commons-daemon.jar:ofbiz.jar org.ofbiz.base.start.Start

If there is no documentation on this subject now, I'll be happy to add/submit the steps to the wiki once successfully implemented.

Cheers
David
Reply | Threaded
Open this post in threaded view
|

Re: binding ofbiz ports 80|443, non root, without apache

Whoa!
The site seems to be starting and stopping fine so far, so this may be how we implement in production.  The current start script uses this command:

  exec /pathTo/ofbiz/jsvc -pidfile ofbiz.pid -user someNonRootUser $VMARGS -cp tools.jar:commons-daemon.jar:ofbiz.jar org.ofbiz.base.start.Start >>$OFBIZ_LOG 2>>$OFBIZ_LOG&

To stop I'll cat ofbiz.pid as the nonRootUser and kill the pid.
Reply | Threaded
Open this post in threaded view
|

Re: binding ofbiz ports 80|443, non root, without apache

Whoa!
This is a little cleaner:

start script
/pathTo/ofbiz/jsvc -pidfile ofbiz.pid -user someNonRootUser $VMARGS -cp tools.jar:commons-daemon.jar:ofbiz.jar org.ofbiz.base.start.Start >>$OFBIZ_LOG 2>>$OFBIZ_LOG&

stop script
PID_FILE="/pathTo/ofbiz/ofbiz.pid"
/pathTo/ofbiz/jsvc -stop -pidfile $PID_FILE org.apache.catalina.startup.Bootstrap rc_status -v

add someNonRootUser to sudoers to run jsvc, and start|stop scripts.