Zope broken - can't restart
I added a package to the Products directory today. When I tried to restart, I got a Proxy error and things went downhill quickly. We are using debian testing (running zope on port 9673) Zope 2.6.2 Starting it and restarting it give differing errors: collab:/var/log/zope/default# /etc/init.d/zope start Starting Zope instance default... failed: coercing to Unicode: need string or buffer, NoneType found Waiting instances in late: done. default: start: coercing to Unicode: need string or buffer, NoneType found collab:/var/log/zope/default# /etc/init.d/zope restart Restarting Zope instance default... failed: 'NoneType' object has no attribute 'rfind' Waiting instances in late: done. default: restart: 'NoneType' object has no attribute 'rfind' Does anyone know what "'NoneType' object has no attribute 'rfind'" means? How about "coercing to Unicode: need string or buffer, NoneType found"? Can anyone give me a clue as to how I can get zope running again? Thanks! dennis - have gudulka, will travel http://KafanaKlub.com
dennis@likebunnies.com (Dennis Godfrey) on 12/9/03 wrote:
Can anyone give me a clue as to how I can get zope running again? Thanks!
remove that product that you just installed? <--> george donnelly ~ http://www.zettai.net/ ~ "Quality Zope Hosting" Shared and Dedicated Zope Hosting ~ Zope Servers ~ Zope Websites Yahoo, AIM: zettainet ~ ICQ: 51907738 ~ Sales (USA): 1-866-967-3669
An update.
I added a package to the Products directory today. When I tried to restart
I removed the packages just in case. I discovered that one of our other engineers had commented out the pcgi stuff in /etc/zopectl/zopectlrc. He made it right again and I tried to start again. collab:/usr/lib/zope# /etc/init.d/zope start Starting Zope instance default... Waiting instances in late: default(0), done. I check /var/log/zope/default/Z2-detailed.og and see U 000000000 2003-12-09T16:01:56 System startup Yet, it just isn't running. 'ps ax' shows no process. Any clues? Am I not starting it correctly? (I have always used the Control Panel up until today.) dennis - have gudulka, will travel http://KafanaKlub.com
Dennis Godfrey wrote:
Any clues? Am I not starting it correctly? (I have always used the Control Panel up until today.)
I run zope/cmf/plone on a debian sarge box, too. And I had this very same problem: run either zopectrl or the /etc/init.d/zope start and then it died. To diagnose the problem, add "Debug: yes" in the /etc/zopectrl/zopectrlrc, then start the server. That gave me the diagnostics I needed. The problem in my case was that /var/lib/zope/instance/default/var needs to be user root and group zope, with the sticky bit set. drwxr-xr-t 2 root zope 232 2003-12-04 07:55 var From /usr/share/doc/zope/SETUID.txt: You must also make sure the var directory is owned by root, and that it has the sticky bit set. This is done by the command 'chmod o+t var' on most systems. When the sticky bit is set on a directory, anyone can write files, but nobody can delete others' files in order to rewrite them. This is necessary to keep others from overwriting the PID file, tricking root into killing processes when 'stop' is run. Once I changed the owner of var, and restarted zope, the server came right up. HTH. Kirk
Dennis Godfrey wrote at 2003-12-9 16:08 -0800:
... Any clues? Am I not starting it correctly? (I have always used the Control Panel up until today.)
Whenever you have startup problems with Zope up to version 2.6.x, activate Zope logging (--> "doc/LOGGING.txt") and look into the log file.
From version 2.7 on, use "bin/zopectl fg".
-- Dieter
Thanks to Kirk Lowery, I have figured out why I could not start the zope server. This appears to be a debian problem, but perhaps others have it, too. In order to start zope, /var/lib/zope/instance/default/var needs to be owned by root with the sticky bit set. As soon as I made this change, there was much joy in our collab group. However, I am now unable to pack ZODB. That generates a 'permission denied' for trying to write to that directory. This is how I got into trouble in the 1st place - when I installed PloneCollectorNG, I got a 'permission denied' message and had to change ownership of that directory to zope. So, in order to start zope, the directory needs to be owned by root. In order to, for example, pack ZODB, the directory needs to be owned by zope. Kirk has filed a bug @ bugs.debian.org dennis - have gudulka, will travel http://KafanaKlub.com
dennis@likebunnies.com (Dennis Godfrey) on 12/10/03 wrote:
Thanks to Kirk Lowery, I have figured out why I could not start the zope server. This appears to be a debian problem, but perhaps others have it, too.
In order to start zope, /var/lib/zope/instance/default/var needs to be owned by root with the sticky bit set. As soon as I made this change, there was much joy in our collab group.
However, I am now unable to pack ZODB. That generates a 'permission denied' for trying to write to that directory. This is how I got into trouble in the 1st place - when I installed PloneCollectorNG, I got a 'permission denied' message and had to change ownership of that directory to zope.
So, in order to start zope, the directory needs to be owned by root. In order to, for example, pack ZODB, the directory needs to be owned by zope.
its not especially advisable to run zope as root. you should run it as a non-priv-ed user, eg create a new user zope and run it as that, then chmod/chown all the zope stuff so its rwx etc etc zope. <--> george donnelly ~ http://www.zettai.net/ ~ "Quality Zope Hosting" Shared and Dedicated Zope Hosting ~ Zope Servers ~ Zope Websites Yahoo, AIM: zettainet ~ ICQ: 51907738 ~ Sales (USA): 1-866-967-3669
participants (5)
-
Dennis Godfrey -
Dieter Maurer -
george donnelly -
george donnelly -
Kirk Lowery