so this is where i am at... i created a sym link inside the ofbiz directory to the java executable thereby having the process ran from the ofbiz home directory
this i what my ofbiz.service file looks like... and yes they seem to usually be this simple, but can be as complicated as you want --------------------------------------------------------------------------------------------------------------- cat /lib/systemd/system/ofbiz.service [Unit] Description=OfBIZ Daemon After=network.target [Service] Type=forking ExecStart=/ofbiz/ofbiz.13.07/java -Xms768M -jar /ofbiz/ofbiz.13.07/ofbiz.jar [Install] WantedBy=multi-user.target ---------------------------------------------------------------------------------------------------------------- yes i have tried just putting /ofbiz/ofbiz.13.07/ant start it drops with a where is the build.xml error the above .service file hangs and timesout resulting in this ---------------------------------------------------------------------------------------------------------------- [root@localhost ~]# systemctl start ofbiz.service Job for ofbiz.service failed. See 'systemctl status ofbiz.service' and 'journalctl -xn' for details. [root@localhost ~]# systemctl status ofbiz.service -l ofbiz.service - OfBIZ Daemon Loaded: loaded (/usr/lib/systemd/system/ofbiz.service; disabled) Active: failed (Result: exit-code) since Mon 2015-04-13 12:46:14 EDT; 4s ago Process: 1247 ExecStart=/ofbiz/ofbiz.13.07/java -Xms768M -jar /ofbiz/ofbiz.13.07/ofbiz.jar (code=exited, status=143) Apr 13 12:44:44 localhost.localdomain java[1247]: at java.security.AccessController.doPrivileged(Native Method) Apr 13 12:44:44 localhost.localdomain java[1247]: at java.net.URLClassLoader.findClass(URLClassLoader.java:354) Apr 13 12:44:44 localhost.localdomain java[1247]: at java.lang.ClassLoader.loadClass(ClassLoader.java:425) Apr 13 12:44:44 localhost.localdomain java[1247]: at java.lang.ClassLoader.loadClass(ClassLoader.java:358) Apr 13 12:44:44 localhost.localdomain java[1247]: at org.ofbiz.base.start.Start.initStartLoaders(Start.java:271) Apr 13 12:44:44 localhost.localdomain java[1247]: ... 2 more Apr 13 12:46:11 localhost.localdomain systemd[1]: ofbiz.service operation timed out. Terminating. Apr 13 12:46:14 localhost.localdomain systemd[1]: ofbiz.service: control process exited, code=exited status=143 Apr 13 12:46:14 localhost.localdomain systemd[1]: Failed to start OfBIZ Daemon. Apr 13 12:46:14 localhost.localdomain systemd[1]: Unit ofbiz.service entered failed state. ---------------------------------------------------------------------------------------------------------------- just a little update... im putting this down for till after lunch sometime Chris On Mon, Apr 13, 2015 at 11:23 AM, Chris Clark <[email protected]> wrote: > ahhh i was forgetting the -jar ofbiz.jar in the command line execution > through the above mentioned command... > > i will post results > > > On Mon, Apr 13, 2015 at 11:11 AM, Chris Clark <[email protected]> wrote: > >> this is part and parcel of why systemd is now the standard... you dont >> have to define things like that in systemd services... because the services >> are executed with full access to system things like environment variables... >> >> i mean i can try to cut and copy all the enviornment variables from the >> rc.d or init.d script but im telling you they are not necessary... >> >> can i not just run the ofbiz from commandline execution of >> >> java -Xms768M -Xmx1024M -Duser.language=en > /ofbiz/log/messages >> 2>>/ofbiz/ofbiz.13.07/runtime/logs/console.log >> >> if that is the case then those environment variables are already defined >> in the system and dont need to be defined again >> >> chris >> >> On Mon, Apr 13, 2015 at 10:51 AM, Ron Wheeler < >> [email protected]> wrote: >> >>> >>> Have you defined JAVA_HOME to match where Java is found? >>> >>> Ron >>> >>> On 13/04/2015 11:04 AM, Chris Clark wrote: >>> >>>> maybe you can help me... the new architecture requires an absolute path >>>> for >>>> the executable which is fine, but the java command >>>> >>>> /ofbiz/ofbiz.13.07/java -Xms768M -Xmx1024M -Duser.language=en > >>>> /ofbiz/log/messages 2>>/ofbiz/ofbiz.13.07/runtime/logs/console.log >>>> >>>> wont work because the absolute path to java >>>> >>>> is /usr/bin/java or for me it is >>>> truly /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20. >>>> i386/bin/java >>>> >>>> so what do i have to add to >>>> >>>> /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.i386/bin/java >>>> -Xms768M -Xmx1024M -Duser.language=en > /ofbiz/log/messages >>>> 2>>/ofbiz/ofbiz.13.07/runtime/logs/console.log >>>> >>>> to have it run in the ofbiz directory of /ofbiz/ofbiz.13.07 >>>> >>>> java is like a third world language to me right now... im sure in a >>>> couple >>>> of months it will be like the back of my hand >>>> >>>> Chris >>>> >>>> On Mon, Apr 13, 2015 at 9:19 AM, Chris Clark <[email protected]> wrote: >>>> >>>> right but rc.d files are extinct everything uses what is called >>>>> systemd to >>>>> boot up services as daemons now >>>>> >>>>> http://www.tecmint.com/systemd-replaces-init-in-linux/ >>>>> >>>>> this is another "architecture" for the daemonization process, it does >>>>> not >>>>> rely on bash scripts with all kinds of various thing defined but >>>>> instead >>>>> relies on things that are called .service files that reside in the >>>>> /lib/systemd/system dir and control the daemonization process... I am >>>>> a red >>>>> hat man and this is the method they use, soon to be, if not already >>>>> now, >>>>> exclusively... Im sure out of the many many many people on this list >>>>> someone has made the switch, and I will go look in the install dir for >>>>> a >>>>> .service file... If i happen to get it, either from someone or >>>>> manufacture >>>>> it, can i upstream it? >>>>> >>>>> Chris >>>>> >>>>> On Mon, Apr 13, 2015 at 7:31 AM, Jacques Le Roux < >>>>> [email protected]> wrote: >>>>> >>>>> I guess you are referring to this page https://cwiki.apache.org/ >>>>>> confluence/display/OFBIZ/How+to+run+OFBiz+as+a+Service >>>>>> Look for rc.* files in your working copy >>>>>> >>>>>> HTH >>>>>> >>>>>> Jacques >>>>>> >>>>>> >>>>>> Le 13/04/2015 12:29, Chris Clark a écrit : >>>>>> >>>>>> does anyone have one of these... the wiki has a very much out dated >>>>>>> init.d >>>>>>> script and im trying to make my own but im having issues >>>>>>> >>>>>>> >>>>>>> >>> >>> -- >>> Ron Wheeler >>> President >>> Artifact Software Inc >>> email: [email protected] >>> skype: ronaldmwheeler >>> phone: 866-970-2435, ext 102 >>> >>> >> >
