Erlang/OTP Forums

Author Message

<  Yaws mailing list  ~  yaws 1.88 heart restarts problem

dvader
Posted: Mon May 03, 2010 4:46 pm Reply with quote
Joined: 17 Dec 2007 Posts: 9
Hi!
It seems, that yaws 1.88 do not restarts. And that could be a stability
problem.

What I am doing:

Starting yaws, the command line is:
yaws --daemon --heart --heart-restart=0,0

Next I kill beam process.
kill <beam process ID>

But that kills the heart process, instead of beam process restarting.
Result is yaws death. I tried different --heart-restart=C,T, but yaws
never restarts. I remeber, that old version restarted well. How to force
restarts of new yaws? Or I'm doing something wrong?

Andrew



------------------------------------------------------------------------------
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist
View user's profile Send private message
Guest
Posted: Mon May 03, 2010 7:12 pm Reply with quote
Guest
On Mon, May 3, 2010 at 12:46 PM, Andrew <buricchio@gmail.com> wrote:
> Hi!
> It seems, that yaws 1.88 do not restarts. And that could be a stability
> problem.
>
> What I am doing:
>
> Starting yaws, the command line is:
>
Guest
Posted: Mon May 03, 2010 10:11 pm Reply with quote
Guest
On 05/03/2010 09:12 PM, Steve Vinoski wrote:
> On Mon, May 3, 2010 at 12:46 PM, Andrew<buricchio@gmail.com> wrote:
>> Hi!
>> It seems, that yaws 1.88 do not restarts. And that could be a stability
>> problem.
>>
>> What I am doing:
>>
>> Starting yaws, the command line is:
>> yaws --daemon --heart --heart-restart=0,0
>>
>> Next I kill beam process.
>> kill<beam process ID>
>>
>> But that kills the heart process, instead of beam process restarting.
>> Result is yaws death. I tried different --heart-restart=C,T, but yaws
>> never restarts. I remeber, that old version restarted well. How to force
>> restarts of new yaws? Or I'm doing something wrong?
>
> Works for me on OS X. What platform are you on?


Works perfect for me too, Ubuntu Lucid Lynx.

/klacke

------------------------------------------------------------------------------
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist
dvader
Posted: Tue May 04, 2010 8:59 am Reply with quote
Joined: 17 Dec 2007 Posts: 9
Thanks all for reply!

The problem relates to additional parameter --erlarg .
(I thought it is irrelevant, but I was wrong).
Without --erlarg its works perfectly. But yaws does not restart with
--erlarg

this does not work:
yaws --daemon --heart --heart-restart=0,0 --erlarg "-env SOME_PATH
/home/user1"

and this works perfect:
yaws --daemon --heart --heart-restart=0,0

Sorry, I gave incomplete information before.

Andrew

------------------------------------------------------------------------------
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist
View user's profile Send private message
Guest
Posted: Thu May 06, 2010 9:04 pm Reply with quote
Guest
On 05/04/2010 10:58 AM, Andrew wrote:
> Thanks all for reply!
>
> The problem relates to additional parameter --erlarg .
> (I thought it is irrelevant, but I was wrong).
> Without --erlarg its works perfectly. But yaws does not restart with
> --erlarg
>
> this does not work:
> yaws --daemon --heart --heart-restart=0,0 --erlarg "-env SOME_PATH
> /home/user1"
>
> and this works perfect:
> yaws --daemon --heart --heart-restart=0,0
>

Ok, clearly a bug, we'll look into it.

Thanks for reporting,



/klacke

------------------------------------------------------------------------------

_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist
Guest
Posted: Sat May 08, 2010 8:43 pm Reply with quote
Guest
On 05/06/2010 11:03 PM, Claes Wikstrom wrote:
> On 05/04/2010 10:58 AM, Andrew wrote:
>> Thanks all for reply!
>>
>> The problem relates to additional parameter --erlarg .
>> (I thought it is irrelevant, but I was wrong).
>> Without --erlarg its works perfectly. But yaws does not restart with
>> --erlarg
>>
>> this does not work:
>> yaws --daemon --heart --heart-restart=0,0 --erlarg "-env SOME_PATH
>> /home/user1"
>>
>> and this works perfect:
>> yaws --daemon --heart --heart-restart=0,0
>>
>
> Ok, clearly a bug, we'll look into it.
>

Did a bit of debugging here, first off a trick that some of you
may need in future debugging sessions, I added:


exec 3>&1 4>&2 >$HOME/tmp/cap.$$ 2>&1

To the top of the yaws script, thus redirecting script output from
within the script itself

It turns out that the quotes are dropped on the second invocation, thus

yaws --daemon --heart --heart-restart=0,0 --erlarg "-env SOME_PATH /home/user1"

becomes,

yaws --daemon --heart --heart-restart=0,0 --erlarg -env SOME_PATH /home/user1

making yaws reject the command line.

I see no real good way out of this, maybe some clever /bin/sh wizard on
the list knows better. I'm dropping this, you'll have to solve this some other
way.

Sorry,

/klacke

------------------------------------------------------------------------------

_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist
Guest
Posted: Sat May 08, 2010 9:18 pm Reply with quote
Guest
On Sat, May 8, 2010 at 4:42 PM, Claes Wikstrom <klacke@tail-f.com> wrote:
> On 05/06/2010 11:03 PM, Claes Wikstrom wrote:
>> On 05/04/2010 10:58 AM, Andrew wrote:
>>> Thanks all for reply!
>>>
>>> The problem relates to additional parameter --erlarg .
>>> (I thought it is irrelevant, but I was wrong).
>>> Without --erlarg its works perfectly. But yaws does not restart with
>>> --erlarg
>>>
>>> this does not work:
>>> yaws --daemon --heart --heart-restart=0,0 --erlarg "-env SOME_PATH
>>> /home/user1"
>>>
>>> and this works perfect:
>>> yaws --daemon --heart --heart-restart=0,0
>>>
>>
>> Ok, clearly a bug, we'll look into it.
>>
>
> Did a bit of debugging here, first off a trick that some of you
> may need in future debugging sessions, I added:
>
>
> exec 3>&1 4>&2 >$HOME/tmp/cap.$$ 2>&1
>
> To the top of the yaws script, thus redirecting script output from
> within the script itself
>
> It turns out that the quotes are dropped on the second invocation, thus
>
> yaws --daemon --heart --heart-restart=0,0 --erlarg "-env SOME_PATH /home/user1"
>
> becomes,
>
> yaws --daemon --heart --heart-restart=0,0 --erlarg -env SOME_PATH /home/user1
>
> making yaws reject the command line.
>
> I see no real good way out of this, maybe some clever /bin/sh wizard on
> the list knows better. I'm dropping this, you'll have to solve this some other
> way.

This is good debug info, so I'll try to pick up the debugging from here.

--steve

------------------------------------------------------------------------------

_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist
dvader
Posted: Sun May 09, 2010 9:02 pm Reply with quote
Joined: 17 Dec 2007 Posts: 9
It works very well!
View user's profile Send private message
Guest
Posted: Sun May 09, 2010 9:15 pm Reply with quote
Guest
On 05/08/2010 11:17 PM, Steve Vinoski wrote:
>
>
> This is good debug info, so I'll try to pick up the debugging from here.
>

But it's not really a yaws issue any longer, it's erl -heart and quoted args
that don't work too well together. Solving it is hard/impossible at least
with the same set of flags.


/klacke

------------------------------------------------------------------------------

_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist
Guest
Posted: Sun May 09, 2010 9:17 pm Reply with quote
Guest
On 05/09/2010 11:01 PM, Andrew Yanovsky wrote:
> It works very well!
> Andrew.
>

Well what do you know, that's just what I called for, a /bin/sh
wizard. Hats off!

/klacke

------------------------------------------------------------------------------

_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist
dvader
Posted: Sun May 09, 2010 9:40 pm Reply with quote
Joined: 17 Dec 2007 Posts: 9
I see, he is! Hats off to Steve Vinoski!
View user's profile Send private message
Guest
Posted: Sun May 09, 2010 10:08 pm Reply with quote
Guest
OK, thanks for checking it; I've now pushed it up to github. This
solution will work for the case you provided, which is very very much
the normal case, but if anyone ever wanted to pass something like

--erlargs "-env NAME O'Keeffe"

where the name or value contains a single quote, it will still fail.
This case and the case where either name or value contains a double
quote are also fixable, but I figured they'd be so rare they're not
worth cluttering the code to handle them.

--steve

On Sun, May 9, 2010 at 5:40 PM, Andrew Yanovsky <buricchio@gmail.com> wrote:
> I see, he is! Hats off to Steve Vinoski!
>
>>
>> Well what do you know, that's just what I called for, a /bin/sh
>> wizard. Hats off!
>>
>> /klacke
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> Erlyaws-list mailing list
>> Erlyaws-list@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/erlyaws-list
>
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> Erlyaws-list mailing list
> Erlyaws-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/erlyaws-list
>
>

------------------------------------------------------------------------------

_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist
Guest
Posted: Sun May 09, 2010 10:55 pm Reply with quote
Guest
2010/5/10 Steve Vinoski <vinoski@ieee.org (vinoski@ieee.org)>
Quote:
OK, thanks for checking it; I've now pushed it up to github. This
solution will work for the case you provided, which is very very much
the normal case, but if anyone ever wanted to pass something like

--erlargs "-env NAME O'Keeffe"

where the name or value contains a single quote, it will still fail.
This case and the case where either name or value contains a double
quote are also fixable, but I figured they'd be so rare they're not
worth cluttering the code to handle them.

--steve


On Sun, May 9, 2010 at 5:40 PM, Andrew Yanovsky <buricchio@gmail.com (buricchio@gmail.com)> wrote:
> I see, he is! Hats off to Steve Vinoski!
>
>>
>> Well what do you know, that's just what I called for, a /bin/sh
>> wizard. Hats off!
>>
>> /klacke
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> Erlyaws-list mailing list
>> Erlyaws-list@lists.sourceforge.net (erlyaws-list@lists.sourceforge.net)
>> https://lists.sourceforge.net/lists/listinfo/erlyaws-list
>
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> Erlyaws-list mailing list
> Erlyaws-list@lists.sourceforge.net (erlyaws-list@lists.sourceforge.net)
> https://lists.sourceforge.net/lists/listinfo/erlyaws-list
>
>

------------------------------------------------------------------------------

_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net (erlyaws-list@lists.sourceforge.net)
https://lists.sourceforge.net/lists/listinfo/erlyaws-list



wouldn't
Guest
Posted: Mon May 10, 2010 3:29 am Reply with quote
Guest
On Sun, May 9, 2010 at 6:55 PM, Daniel Fahlke <flyingmana@googlemail.com> wrote:
>
> wouldn't
Guest
Posted: Mon May 10, 2010 7:46 am Reply with quote
Guest
2010/5/10 Steve Vinoski <vinoski@ieee.org (vinoski@ieee.org)>
Quote:
On Sun, May 9, 2010 at 6:55 PM, Daniel Fahlke <flyingmana@googlemail.com (flyingmana@googlemail.com)> wrote:
>
> wouldn't

Display posts from previous:  

All times are GMT
Page 1 of 2
Goto page 1, 2  Next
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum