Services and -vm-display-null
Hi there, What are you using to monitor processes in headless images? I ask because the new way to start a headless image in linux is: pharo-vm/pharo -vm-display-null your.image âno-quit And it seems that it always quits For example supervisord* is really unhappy about this way to run a service. Itâs really unfortunate. This is a show stopper. Is there an OS signal being sent when you use -vm-display-null or the process stays normally up? There is no way to run a headless image like we used to? sebastian o/ *http://supervisord.org/
Hi, On 23 Jan 2014, at 16:14, Sebastian Sastre <sebastian@flowingconcept.com> wrote:
Hi there,
What are you using to monitor processes in headless images?
I ask because the new way to start a headless image in linux is:
pharo-vm/pharo -vm-display-null your.image âno-quit
And it seems that it always quits
I always start images with no preconfigured servers/services in them and then use an st script to start servers/services. Then you are using the STCommandLineHandler that does _not_ quit by default. Furthermore, I have a script to control image/vm start/stop/restart/pid which I use from /etc/init.d with monit using these last scripts. If you want, I can send you the code. You could try extracting it from http://stfx.eu/pharo-server/ but that page is old. HTH, Sven
For example supervisord* is really unhappy about this way to run a service.
Itâs really unfortunate. This is a show stopper.
Is there an OS signal being sent when you use -vm-display-null or the process stays normally up?
There is no way to run a headless image like we used to?
sebastian
o/
Thanks Sven bue I have no issues on Pharo 2 The problem is with Pharo 3 on the latest VM With services and all this I was referring not to things inside the image but in the OS (the headless image as service) Yes, having a init.d script to start the image is the goal Are you using your scrips on any Pharo 3? sebastian o/ On Jan 23, 2014, at 1:32 PM, Sven Van Caekenberghe <sven@stfx.eu> wrote:
Hi,
On 23 Jan 2014, at 16:14, Sebastian Sastre <sebastian@flowingconcept.com> wrote:
Hi there,
What are you using to monitor processes in headless images?
I ask because the new way to start a headless image in linux is:
pharo-vm/pharo -vm-display-null your.image âno-quit
And it seems that it always quits
I always start images with no preconfigured servers/services in them and then use an st script to start servers/services. Then you are using the STCommandLineHandler that does _not_ quit by default.
Furthermore, I have a script to control image/vm start/stop/restart/pid which I use from /etc/init.d with monit using these last scripts.
If you want, I can send you the code.
You could try extracting it from http://stfx.eu/pharo-server/ but that page is old.
HTH,
Sven
For example supervisord* is really unhappy about this way to run a service.
Itâs really unfortunate. This is a show stopper.
Is there an OS signal being sent when you use -vm-display-null or the process stays normally up?
There is no way to run a headless image like we used to?
sebastian
o/
well⦠you can always modify BasicCommandLineHandler to respond as you want: BasicCommandLineHandler>>handleArgument: aString "give priority to subcommands" self handleSubcommand == self ifFalse: [ ^ self ]. "check for default options" aString ifEmpty: [ ^ self default ]. aString = '--version' ifTrue: [ ^ self version ]. aString = '--help' ifTrue: [ ^ self help ]. aString = '--list' ifTrue: [ ^ self list ]. aString = '--copyright' ifTrue: [ ^ self copyright ]. aString = '--no-quit' ifTrue: [ ^ self noQuit ]. "none of the previous options matched hence we output an error message" self error. you can just remove the last line (âself error"). Is a hack⦠but Iâm kinda sure it will work :) Esteban On 23 Jan 2014, at 16:14, Sebastian Sastre <sebastian@flowingconcept.com> wrote:
Hi there,
What are you using to monitor processes in headless images?
I ask because the new way to start a headless image in linux is:
pharo-vm/pharo -vm-display-null your.image âno-quit
And it seems that it always quits
For example supervisord* is really unhappy about this way to run a service.
Itâs really unfortunate. This is a show stopper.
Is there an OS signal being sent when you use -vm-display-null or the process stays normally up?
There is no way to run a headless image like we used to?
sebastian
o/
in the logs it has an exit with code 1 and looking at the code I see that in #error so your guess might be right testing that in 3, 2, 1.. On Jan 23, 2014, at 3:25 PM, Esteban Lorenzano <estebanlm@gmail.com> wrote:
well⦠you can always modify BasicCommandLineHandler to respond as you want:
BasicCommandLineHandler>>handleArgument: aString
"give priority to subcommands" self handleSubcommand == self ifFalse: [ ^ self ].
"check for default options" aString ifEmpty: [ ^ self default ].
aString = '--version' ifTrue: [ ^ self version ].
aString = '--help' ifTrue: [ ^ self help ].
aString = '--list' ifTrue: [ ^ self list ].
aString = '--copyright' ifTrue: [ ^ self copyright ].
aString = '--no-quit' ifTrue: [ ^ self noQuit ].
"none of the previous options matched hence we output an error message" self error.
you can just remove the last line (âself error"). Is a hack⦠but Iâm kinda sure it will work :)
Esteban
On 23 Jan 2014, at 16:14, Sebastian Sastre <sebastian@flowingconcept.com> wrote:
Hi there,
What are you using to monitor processes in headless images?
I ask because the new way to start a headless image in linux is:
pharo-vm/pharo -vm-display-null your.image âno-quit
And it seems that it always quits
For example supervisord* is really unhappy about this way to run a service.
Itâs really unfortunate. This is a show stopper.
Is there an OS signal being sent when you use -vm-display-null or the process stays normally up?
There is no way to run a headless image like we used to?
sebastian
o/
participants (4)
-
btc@openinworld.com -
Esteban Lorenzano -
Sebastian Sastre -
Sven Van Caekenberghe