# zope daemon keeps stopping

## woodstook

i would like to daemonise zope, but it keeps stopping:

 bin/zopectl start

daemon process started, pid=6857

# bin/zopectl status

daemon manager running; daemon process not running

[/code]

how do i keep the daemon process running?   :Sad: 

for testing purposes i can:

```
bin/zopectl fg
```

but of course i would like to daemonise zope.

----------

## --D_S--

Hi.

I've been playing with zope/plone and followed the instructions in the wiki. I used the zope-config and zprod-manager.

The only ones that I managed to get running are plone-2.0.5-r2 and zope-2.7.9. I wanted some features I saw in a video from plone and emerged plone-2.5.2 and zope-2.9.7 the instance is  sarted but I have no acces on 127.0.0.1:8080 and when I restart  the instance I get:

with zope-2.9.7 and plone-2.5.2

 */etc/ini.d/zope-plone2 restart wrote:*   

> 
> 
>  * Restarting Zope in /var/lib/zope/zope-plone2 ...
> 
>  * Stopping Zope in /var/lib/zope/zope-plone2 ...
> ...

 

Maybe it's the same error. I have also some Archetype-something erros with zprod-manager add.

Also, How can I delete the test instances I created?

Thanks.

----------

## lailoken

It seems the initial version of the Zope package had a bug:

http://mail.zope.org/pipermail/zope/2007-March/171095.html

This was 'quickly' fixed without a formal version bump and it seems the bugged version got into the portage.

I don't think this is a stable version, so problems like this are bound to happen and we have to live with it.

Unfortunately some versions of Plone require this version and we are stuck to using ~x86

I'm trying to find out the manual fix/patch for this, and will post it here once I find it... otherwise anyone else have the solution?

Regards,

Marius.

----------

## radek

Coorected zope ebuild were commited by mu on April 6th as described in /usr/portage/net-zope/zope/ChangeLog file:

```
*zope-2.8.9.1 (06 Apr 2007)                                                                                             

                                                                                                                        

  06 Apr 2007; Radoslaw Stachowiak <radek@gentoo.org> zope-2.8.9.ebuild,                                                

  +zope-2.8.9.1.ebuild, zope-2.9.7.ebuild, zope-2.10.3.ebuild:                                                          

  Fixes #171797                       
```

So, please emerge --sync again, and check if you get updated ChangeLog (which means also ebuild are updated) then delete /usr/portage/distfiles/[zZ]ope-*, reemerge zope, and (!!!) recreate zope instances. it should help.

in other cases please file a bug on bugzilla. As a only one active net-zope member I've very limited resources, so do not use forums, but I use bugzilla.

gope it helps, good luck!

----------

## lailoken

I did as you requested, and:

diff /tmp/Zope-2.9.7-final.tgz Zope-2.9.7-final.tgz

reveals that the version is identical.

Perhaps this portage fix was only applied for zope-2.8.9.1 and not the other affected versions?

Unfortunately I have to stick to zope-2.9.7 for my version of Plone...

----------

## lailoken

Cool, reported this bug here:

https://bugs.gentoo.org/show_bug.cgi?id=174218

Point your URL-munchers there for the latest greatest news...

----------

## lailoken

Well,

I'm fine with with running it as foreground for now until and don't care if the gentoo ebuild maintainers won't bother doing some work regarding this.

Seems like they can't be bothered to take it further themselves and expect me to jump through hoops.

I just don't care enough.

----------

## j-m

 *lailoken wrote:*   

> 
> 
> Seems like they can't be bothered to take it further themselves and expect me to jump through hoops.
> 
> I just don't care enough.

 

Yeah, we just don't care enough about crappy bug reports which don't provide any relevant information, sorry. Either learn to file useful bugs and provide the requested information, or don't waste your and our time at all.

Thanks.

----------

## --D_S--

Hi

works with zope-2.9.6 and plone-2.5.2

but now I have:

 *Quote:*   

> Site Error
> 
> An error was encountered while publishing this resource.
> 
> Error Type: NameError
> ...

 

the zope log:

 *Quote:*   

> ------
> 
> 2007-04-13T22:17:16 ERROR Zope.SiteErrorLog http://127.0.0.1:8080/manage_main
> 
> Traceback (innermost last):
> ...

 

also how can I delete all the zope instances I made for testing? can the folder and init scripts just be deleted or are there more files? and then delete the user and group created?

----------

## radek

To delete you can:

```

INSTANCE=name_of_instance

rm -rf /var/lib/zope/$INSTANCE

userdel -r $INSTANCE

rm -f /etc/init.d/$INSTANCE
```

it should work at least for sane instance names, but check it before execution  :Smile: 

----------

## Tae_kyon

Clean install of zope-2.9.7 done on April 18th, after having emerge --sync'd.

I have created my first zope instance, called zope-0

```
/etc/init.d/zope-0 start
```

fails to start the instance just as reported above.

If I go to /var/lib/zope/zope-0/bin and start zope with:

```
./runzope 
```

or with 

```
./zopectl fg
```

zope starts normally.

Whereas if I do:

```
./zopectl start 

daemon process started, pid=31846
```

... actually the daemon manager is not running, and I cannot browse to my zope instance

if I do: 

```
./zopectl 

program: /var/lib/zope/zope-0/bin/runzope

daemon manager not running

zopectl>
```

Inspection of zopectl reveals that it calls  /usr/lib/zope-2.9.7/Zope2/Startup/zopectl.py

So this would be a bug in zopectl.py or with some variable read into it... I'm sorry I can't give better data, but this is a first install of zope and anyone can replicate this. 

Ideally we would like our zope instance to start with the init script. Any suggestions as to how to debug this further?

----------

## thumper

ditto what Tae_kyon said.

George

----------

## Tae_kyon

Turns out it's a zope problem.

You can download the correct zope source from zope and redigest the ebuild. 

Else just fix the bug:

```
vi /usr/lib/zope-2.9.7/lib/python/App/ApplicationManager.py
```

Go to line:

```
 def manage_restart(self, URL1):

```

and change to:

```
 def manage_restart(self, URL1, REQUEST=None):

```

----------

## penumbra2000

 *Tae_kyon wrote:*   

> Turns out it's a zope problem.
> 
> You can download the correct zope source from zope and redigest the ebuild. 
> 
> Else just fix the bug:
> ...

 

Neato, it works.

How come this hasn't been patched in the Gentoo package?  If it's just a time issue I'd be happy to submit the patch.

----------

