Return-Path: X-Original-To: apmail-ofbiz-user-archive@www.apache.org Delivered-To: apmail-ofbiz-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7818017903 for ; Mon, 13 Apr 2015 21:04:04 +0000 (UTC) Received: (qmail 36873 invoked by uid 500); 13 Apr 2015 21:03:54 -0000 Delivered-To: apmail-ofbiz-user-archive@ofbiz.apache.org Received: (qmail 36843 invoked by uid 500); 13 Apr 2015 21:03:54 -0000 Mailing-List: contact user-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ofbiz.apache.org Delivered-To: mailing list user@ofbiz.apache.org Received: (qmail 36831 invoked by uid 99); 13 Apr 2015 21:03:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Apr 2015 21:03:54 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rip057@gmail.com designates 209.85.223.179 as permitted sender) Received: from [209.85.223.179] (HELO mail-ie0-f179.google.com) (209.85.223.179) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Apr 2015 21:03:28 +0000 Received: by iebmp1 with SMTP id mp1so75979599ieb.0 for ; Mon, 13 Apr 2015 14:02:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=Vw91utP3hbTHbNuhv8txNo4dmsxKKKu+Em/0bQE6l2w=; b=0q9w6PRmeAyW3+UtED0n2XQsmEOSqandhp9TS5VhGPugQKHXme7emFLE8v4VUCvJ/K ogmO8WbH8us34tAuOrFzkhvikthfifO4UIQCDxr4OujCLj3LYYGkdaZFILk1lfELquFk 5Lu+tweLDuAu6DxToCXjD9uUAZIkTEMXVWTsytDyNij3iC5PnPEPmD6m/VVTqqTRNFNv JNy8i/pnwqAa5FEopaze6Xh0eeEr7ztvpoV7D7WsLL9AT3+YGkq64nuQk4D5csyrvrcK R8fimElv1z+iM2ZUlmEuhUiDOLaIfVdvMc3syO6v/OwGlT70PrQqjzn2vJJqdRs+D8f8 r7KQ== X-Received: by 10.107.6.220 with SMTP id f89mr23996844ioi.78.1428958961608; Mon, 13 Apr 2015 14:02:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.174.138 with HTTP; Mon, 13 Apr 2015 14:02:20 -0700 (PDT) In-Reply-To: References: <552BB723.1010402@les7arts.com> <552BE608.2020107@artifact-software.com> <552C07BC.7010206@artifact-software.com> From: Chris Clark Date: Mon, 13 Apr 2015 16:02:20 -0500 Message-ID: Subject: Re: systemd.service startup service script file? To: user@ofbiz.apache.org Content-Type: multipart/alternative; boundary=001a113f93104e2ee90513a16f10 X-Virus-Checked: Checked by ClamAV on apache.org --001a113f93104e2ee90513a16f10 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable ok actually i had fixed that little touch up you did but the end result was this... same ofbiz.service file pointing to a ofbizd script residing in the ofbiz home directory ( I dont think its placement matters) I still had all the class not found errors so I ran this from the ofbiz home directory giving me all folders with classes inside of them ll -Rl | grep -B10 "\.class" | grep "\/" | sed 's/://g' i then placed all those directories within a classpath.txt file : delimited and my script looks like this ---------------------------------------------------------------------------= ----------------------------------------------- #!/bin/bash #shell script for ofbiz daemon #ofbizd export JAVA_HOME=3D/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.i386 export CLASSPATH=3D/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.i386 export PATH=3D/bin:/usr/bin:/sbin:/usr/sbin:$PATH export JAVA_BINARY=3D/usr/bin/java export JAVA=3D$JAVA_BINARY export OFBIZ_HOME=3D/ofbiz/ofbiz.13.07 export OFBIZ_LOG=3D$OFBIZ_HOME/runtime/logs/console.log export OFBIZ_OUT=3D/tmp/OfbizOut export JAVA_VMOPTIONS=3D"-Xms768M -Duser.language=3Den" export JAVA_ARGS=3D"-jar $OFBIZ_HOME/ofbiz.jar" export OFBIZ_USER=3Drip057 read CLASSPATH < /ofbiz/ofbiz.13.07/classpath.txt cd $OFBIZ_HOME && $JAVA_BINARY $VMARGS $JAVA_ARGS $OFBIZ_CLASS >$OFBIZ_OUT 2>>$OFBIZ_LOG & ---------------------------------------------------------------------------= ----------------------------------------------- now everything works great... that is the login screen works great, we'll see after i apply my automated pricing daemon incorporated through load-file if there are any other issues thanks to all of you for all the help i thought i was never going to figure this out... someone should update the services page probably Chris On Mon, Apr 13, 2015 at 3:45 PM, Mike wrote: > I don't think you want to specify the CLASSPATH. This is calculated by > java. You also had some syntax errors. > > Try: > > #!/bin/bash > #shell script for ofbiz daemon > #ofbizd > > export JAVA_HOME=3D/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.i386 > export PATH=3D/bin:/usr/bin:/sbin:/usr/sbin:$PATH > export JAVA_BINARY=3D/usr/bin/java > export JAVA=3D$JAVA_BINARY > export OFBIZ_HOME=3D/ofbiz/ofbiz.13.07 > export OFBIZ_LOG=3D$OFBIZ_HOME/runtime/logs/console.log > export OFBIZ_OUT=3D/tmp/OfbizOut > export JAVA_VMOPTIONS=3D"-Xms768M -Duser.language=3Den" > export JAVA_ARGS=3D"-jar ofbiz.jar" > > cd $OFBIZ_HOME && $JAVA_BINARY $JAVA_ARGS $JAVA_VMOPTIONS > $OFBIZ_OUT 2= > > $OFBIZ_LOG & > > > On Mon, Apr 13, 2015 at 12:19 PM, Chris Clark wrote: > > > ok so i did this, made a script file per Mike's suggestion > > the script file is here > > > > > > > > > -------------------------------------------------------------------------= ------------------------------------------------ > > [root@localhost system]# cat /ofbiz/ofbiz.13.07/ofbizd > > #!/bin/bash > > #shell script for ofbiz daemon > > #ofbizd > > > > export JAVA_HOME=3D/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.i3= 86 > > export CLASSPATH=3D/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.i3= 86 > > export PATH=3D/bin:/usr/bin:/sbin:/usr/sbin:$PATH > > export JAVA_BINARY=3D/usr/bin/java > > export JAVA=3D$JAVA_BINARY > > export OFBIZ_HOME=3D/ofbiz/ofbiz.13.07 > > export OFBIZ_LOG=3D$OFBIZ_HOME/runtime/logs/console.log > > export OFBIZ_OUT=3D/tmp/OfbizOut > > export JAVA_VMOPTIONS=3D"-Xms768M -Duser.language=3Den" > > export JAVA_ARGS=3D"-jar ${OFBIZ_HOME}/ofbiz.jar" > > > > cd $OFBIZ_HOME && $JAVA_BINARY $VMARGS $JAVA_ARGS >$OFBIZ_OUT > 2>>$OFBIZ_LOG > > > > > > > -------------------------------------------------------------------------= ------------------------------------------------ > > > > now i already showed my .service file.. i only change the Execstart to > > point to the ofbizd, it still times out the same way > > > > this is what the console.log shows so you maybe right Ron with the Clas= s > > pointer, so if you could help me point it to the classes i would > appreciate > > it > > > > > > > -------------------------------------------------------------------------= ------------------------------------------------ > > Exception in thread "main" org.ofbiz.base.start.StartupException: > > org.ofbiz.base.container.ContainerLoader > > at org.ofbiz.base.start.Start.initStartLoaders(Start.java:276) > > at org.ofbiz.base.start.Start.init(Start.java:241) > > at org.ofbiz.base.start.Start.main(Start.java:127) > > Caused by: java.lang.ClassNotFoundException: > > org.ofbiz.base.container.ContainerLoader > > at java.net.URLClassLoader$1.run(URLClassLoader.java:366) > > at java.net.URLClassLoader$1.run(URLClassLoader.java:355) > > at java.security.AccessController.doPrivileged(Native Method) > > at java.net.URLClassLoader.findClass(URLClassLoader.java:354) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:425) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:358) > > at org.ofbiz.base.start.Start.initStartLoaders(Start.java:271) > > ... 2 more > > > > > -------------------------------------------------------------------------= ------------------------------------------------ > > > > > > Chris > > > > On Mon, Apr 13, 2015 at 1:15 PM, Ron Wheeler < > > rwheeler@artifact-software.com > > > wrote: > > > > > You might check "journalctl -n 50" to see if there is more info in th= e > > > journal. > > > > > > It looks like it is having trouble starting up. > > > I would set JAVA_HOME since it is highly unlikely that anyone would > have > > > set it to > > > "/ofbiz/ofbiz.13.07java" which appears to be where you are expecting > java > > > to be. > > > > > > The init script should give a hint about the need for a -cp in the ja= va > > > command. > > > > > > Ron > > > > > > > > > > > > On 13/04/2015 2:03 PM, Chris Clark wrote: > > > > > >> posted the output of systemctl in a previous email any help as to ho= w > to > > >> direct the class path in the java executable... like i said this is= a > > >> whole "nother language" > > >> > > >> Chris > > >> > > >> On Mon, Apr 13, 2015 at 12:00 PM, Mike wrote: > > >> > > >> You need to create a REAL script that fires up ofbiz, setting > > JAVA_HOME, > > >>> etc, Then change the above "ExecStart" to that script. > > >>> > > >>> On Mon, Apr 13, 2015 at 9:53 AM, Chris Clark > wrote: > > >>> > > >>> 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 fr= om > > 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=3DOfBIZ Daemon > > >>>> After=3Dnetwork.target > > >>>> [Service] > > >>>> Type=3Dforking > > >>>> ExecStart=3D/ofbiz/ofbiz.13.07/java -Xms768M -jar > > >>>> /ofbiz/ofbiz.13.07/ofbiz.jar > > >>>> [Install] > > >>>> WantedBy=3Dmulti-user.target > > >>>> > > >>>> > > >>>> > > >>>> ------------------------------------------------------------ > > >>> ---------------------------------------------------- > > >>> > > >>>> yes i have tried just putting /ofbiz/ofbiz.13.07/ant start it drop= s > > 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; disable= d) > > >>>> Active: failed (Result: exit-code) since Mon 2015-04-13 12:46:= 14 > > >>>> EDT; > > >>>> > > >>> 4s > > >>> > > >>>> ago > > >>>> Process: 1247 ExecStart=3D/ofbiz/ofbiz.13.07/java -Xms768M -jar > > >>>> /ofbiz/ofbiz.13.07/ofbiz.jar (code=3Dexited, status=3D143) > > >>>> > > >>>> 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=3Dexited status=3D143 > > >>>> 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.servi= ce > > >>>> 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 > > 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 > > >>>>> > > >>>> 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 t= he > > >>>>>> > > >>>>> 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 fr= om > > >>>>>> > > >>>>> 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=3Den > /ofbiz/log/messag= es > > >>>>>> 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 < > > >>>>>> rwheeler@artifact-software.com> 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=3De= n > > > >>>>>>>> /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=3Den > /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 > > >>>>>>>> > > >>>>>>> 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 i= n > > 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 th= is > > >>>>>>>>> > > >>>>>>>> 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 < > > >>>>>>>>> jacques.le.roux@les7arts.com> 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 =C3=A9crit : > > >>>>>>>>>> > > >>>>>>>>>> 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: rwheeler@artifact-software.com > > >>>>>>> skype: ronaldmwheeler > > >>>>>>> phone: 866-970-2435, ext 102 > > >>>>>>> > > >>>>>>> > > >>>>>>> > > > > > > -- > > > Ron Wheeler > > > President > > > Artifact Software Inc > > > email: rwheeler@artifact-software.com > > > skype: ronaldmwheeler > > > phone: 866-970-2435, ext 102 > > > > > > > > > --001a113f93104e2ee90513a16f10--