RE: solaris, deploy, account environment
RE: solaris, deploy, account environment
- Subject: RE: solaris, deploy, account environment
- From: "Pierre Bernard" <email@hidden>
- Date: Fri, 16 May 2003 09:25:36 +0200
- Thread-topic: solaris, deploy, account environment
Here is the script in /etc/rc3.de that works for us on Solaris 8:
/etc/rc3.d> more S78WOServices
#!/bin/sh
WOSERVICES_OWNER=wo_user
su - $WOSERVICES_OWNER -c "/opt/Apple/Library/WebObjects/Executables/WOServices $1"
exit 0
This should produce two processes owned by that user: javawoservices & WOTaskd
wo_user 3998 3993 0 mai 11 ? 1:24 /usr/bin/../java/bin/../bin/sparc/native_threads/java -DWORootDirectory=/opt/Ap
wo_user 3993 1 0 mai 11 ? 0:00 /bin/sh ./javawoservice.sh -appPath /opt/Apple/Library/WebObjects/JavaApplicati
Environemnt variables defined in the .profile for the WO user are taken into account.
FWIW, the default shell for that user is /usr/bin/ksh .
P.S: Sorry, I can't cross-post to email@hidden as I am not subscribed there with this email address.
Pierre.
-----Original Message-----
From: Jonathan Rochkind [mailto:email@hidden]
Sent: Thursday, May 15, 2003 5:57 PM
To: email@hidden; email@hidden
Subject: Re: solaris, deploy, account environment
This is a good last resort, thanks. But I'd rather not do it that way,
because ideally this code will work on a variety of machines, different
platforms and different setups, as long as the underlying utility is
present and configured properly. (It happens to be ImageMagick in this case).
Here's the weird thing... I log into the 'webob' account. I manually start an app instance. This app instance can use Runtime.exec to call the
external utility, and it works fine. Apparently the LD_LIBRARY_PATH is set properly.
Now I start an instance of the exact same code from Monitor.... it doess't work. And the error stream reveals an 'ld' error that tells me it couldn't
find a particular .so library, which seems to indicate that the
LD_LIBRARY_PATH is NOT set properly. WoTaskd is running as this same user, 'webob', and instances started from Monitor, examined by 'ps' are indeed running as this user. Why do instances started by Monitor not have the
proper LD_LIBRARY_PATH? Anyone have any ideas of where to look? I'd really like to get this solved this way.
--Jonathan
At 04:29 PM 5/14/2003 -0700, you wrote:
>There's an overload of Runtime.exec() that let's you explicitly pass the >environment that the child should have as a string array... That's usually
>simpler (and safer) than trying to frob the parent app server's environment.
>
>-- Kaelin
>
>On Wednesday, May 14, 2003, at 03:02 PM, Jonathan Rochkind wrote:
>
>>So, my WO app deployed on Solaris uses Runtime.exec to execute an
>>external process. No problem here.
>>
>>But for this particular external process to work, the LD_LIBRARY_PATH
>>environmental variable must be set properly. My WO apps are running as a >>particular account, 'webob'. When I log into the webob account, the
>>LD_LIBRARY_PATH is set fine (I set it in the .profile). I can execute
>>the process no problem.
>>
>>But the deployed through monitor app which also runs as 'webob'---it
>>can't execute the process, and when I look at the error output, it says >>it can't find a particular .so library, which to me indicates that the >>LD_LIBRARY_PATH isn't set properly in the environment that's running my >>WO app. But it's set and exported in the .profile! And it works fine
>>when I actually log in to the 'webob' account.
>>
>>Any ideas? How do I go about investigating and fixing this?
>>
>>--Jonathan
>>
>>_______________________________________________
>>WebObjects-dev mailing list
>>email@hidden
>>http://www.omnigroup.com/mailman/listinfo/webobjects-dev
>
>_______________________________________________
>WebObjects-dev mailing list
>email@hidden
>http://www.omnigroup.com/mailman/listinfo/webobjects-dev
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
**********************************************************************
This email and any files transmitted with it are intended solely for
the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the sender
of this message. (email@hidden)
This email message has been checked for the presence of computer
viruses; however this protection does not ensure this message is
virus free.
Banque centrale du Luxembourg; Tel ++352-4774-1; http://www.bcl.lu
**********************************************************************
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.