You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Alexander Uvarov <al...@gmail.com> on 2013/11/22 15:45:06 UTC

Debian init script stop/restart does not work

Debian init script does not work as expected in stop/restart cases. It successfully executes, but process still alive and database still respond. Anyone with same problems?

Using 1.4, 1.5 built by hands.

Re: Debian init script stop/restart does not work

Posted by Robert Newson <rn...@apache.org>.
Thanks!

On 22 November 2013 15:42, Mike Marino <mm...@gmail.com> wrote:
> Ok, so this is for couchdb 1.3.0 (downloaded tar.gz).  The changes I
> made (please ignore my misspelling of shepherd :-) ) are here:
>
> https://gist.github.com/mgmarino/7601778
>
> To summarize, I essentially track the pid of the shepherd program,
> which would otherwise respawn couchdb, and kill this program also
> during a shutdown.  This certainly doesn't address any larger issues
> of the complication of the start / stop, but perhaps it will at least
> be informative.  I also haven't checked to see if anything changed
> between 1.3 and 1.4/1.5, so I hope it's still relevant.
>
> hth,
> Mike
>
>
> On Fri, Nov 22, 2013 at 3:57 PM, Robert Newson <rn...@apache.org> wrote:
>> That would be great!
>>
>> On 22 November 2013 14:55, Mike Marino <mm...@gmail.com> wrote:
>>> I have definitely had a similar issue, and had to fix the script
>>> myself ( We use a CRUX distribution, so everything was built from
>>> scratch ).  If it would help, I could dig up how I fixed it on my
>>> system.
>>>
>>> On Fri, Nov 22, 2013 at 3:54 PM, Robert Newson <rn...@apache.org> wrote:
>>>> Yup, we know. The start/stop code is quite complicated (*too*
>>>> complicated) and seems to go wrong more and more.
>>>>
>>>> Jan and I are going to spend some time digging into it over the weekend.
>>>>
>>>> The main issue is that the pid in the pidfile is wrong (generally on
>>>> first start since boot) so stop fails. I've even seen it let two
>>>> couchdb's start at once.
>>>>
>>>> B.
>>>>
>>>>
>>>> On 22 November 2013 14:45, Alexander Uvarov <al...@gmail.com> wrote:
>>>>> Debian init script does not work as expected in stop/restart cases. It successfully executes, but process still alive and database still respond. Anyone with same problems?
>>>>>
>>>>> Using 1.4, 1.5 built by hands.

Re: Debian init script stop/restart does not work

Posted by Mike Marino <mm...@gmail.com>.
Ok, so this is for couchdb 1.3.0 (downloaded tar.gz).  The changes I
made (please ignore my misspelling of shepherd :-) ) are here:

https://gist.github.com/mgmarino/7601778

To summarize, I essentially track the pid of the shepherd program,
which would otherwise respawn couchdb, and kill this program also
during a shutdown.  This certainly doesn't address any larger issues
of the complication of the start / stop, but perhaps it will at least
be informative.  I also haven't checked to see if anything changed
between 1.3 and 1.4/1.5, so I hope it's still relevant.

hth,
Mike


On Fri, Nov 22, 2013 at 3:57 PM, Robert Newson <rn...@apache.org> wrote:
> That would be great!
>
> On 22 November 2013 14:55, Mike Marino <mm...@gmail.com> wrote:
>> I have definitely had a similar issue, and had to fix the script
>> myself ( We use a CRUX distribution, so everything was built from
>> scratch ).  If it would help, I could dig up how I fixed it on my
>> system.
>>
>> On Fri, Nov 22, 2013 at 3:54 PM, Robert Newson <rn...@apache.org> wrote:
>>> Yup, we know. The start/stop code is quite complicated (*too*
>>> complicated) and seems to go wrong more and more.
>>>
>>> Jan and I are going to spend some time digging into it over the weekend.
>>>
>>> The main issue is that the pid in the pidfile is wrong (generally on
>>> first start since boot) so stop fails. I've even seen it let two
>>> couchdb's start at once.
>>>
>>> B.
>>>
>>>
>>> On 22 November 2013 14:45, Alexander Uvarov <al...@gmail.com> wrote:
>>>> Debian init script does not work as expected in stop/restart cases. It successfully executes, but process still alive and database still respond. Anyone with same problems?
>>>>
>>>> Using 1.4, 1.5 built by hands.

Re: Debian init script stop/restart does not work

Posted by Robert Newson <rn...@apache.org>.
That would be great!

On 22 November 2013 14:55, Mike Marino <mm...@gmail.com> wrote:
> I have definitely had a similar issue, and had to fix the script
> myself ( We use a CRUX distribution, so everything was built from
> scratch ).  If it would help, I could dig up how I fixed it on my
> system.
>
> On Fri, Nov 22, 2013 at 3:54 PM, Robert Newson <rn...@apache.org> wrote:
>> Yup, we know. The start/stop code is quite complicated (*too*
>> complicated) and seems to go wrong more and more.
>>
>> Jan and I are going to spend some time digging into it over the weekend.
>>
>> The main issue is that the pid in the pidfile is wrong (generally on
>> first start since boot) so stop fails. I've even seen it let two
>> couchdb's start at once.
>>
>> B.
>>
>>
>> On 22 November 2013 14:45, Alexander Uvarov <al...@gmail.com> wrote:
>>> Debian init script does not work as expected in stop/restart cases. It successfully executes, but process still alive and database still respond. Anyone with same problems?
>>>
>>> Using 1.4, 1.5 built by hands.

Re: Debian init script stop/restart does not work

Posted by Mike Marino <mm...@gmail.com>.
I have definitely had a similar issue, and had to fix the script
myself ( We use a CRUX distribution, so everything was built from
scratch ).  If it would help, I could dig up how I fixed it on my
system.

On Fri, Nov 22, 2013 at 3:54 PM, Robert Newson <rn...@apache.org> wrote:
> Yup, we know. The start/stop code is quite complicated (*too*
> complicated) and seems to go wrong more and more.
>
> Jan and I are going to spend some time digging into it over the weekend.
>
> The main issue is that the pid in the pidfile is wrong (generally on
> first start since boot) so stop fails. I've even seen it let two
> couchdb's start at once.
>
> B.
>
>
> On 22 November 2013 14:45, Alexander Uvarov <al...@gmail.com> wrote:
>> Debian init script does not work as expected in stop/restart cases. It successfully executes, but process still alive and database still respond. Anyone with same problems?
>>
>> Using 1.4, 1.5 built by hands.

Re: Debian init script stop/restart does not work

Posted by Robert Newson <rn...@apache.org>.
Yup, we know. The start/stop code is quite complicated (*too*
complicated) and seems to go wrong more and more.

Jan and I are going to spend some time digging into it over the weekend.

The main issue is that the pid in the pidfile is wrong (generally on
first start since boot) so stop fails. I've even seen it let two
couchdb's start at once.

B.


On 22 November 2013 14:45, Alexander Uvarov <al...@gmail.com> wrote:
> Debian init script does not work as expected in stop/restart cases. It successfully executes, but process still alive and database still respond. Anyone with same problems?
>
> Using 1.4, 1.5 built by hands.