LocalFS problem while booting server
Hi, I have installed Zope 2.5.0 (with Python 2.1.2) on a FreeBSD 4.2 server behind Apache 1.3.20 with PCGI. Zope is started at boot time from /etc/rc.local with the command /usr/local/zope/bin/zopectl start After booting, LocalFS does not work. ErrorMessage is: Traceback (most recent call last): File "/usr/local/zope/2.5.0/lib/python/OFS/Application.py", line 531, in import_product product=__import__(pname, global_dict, global_dict, silly) File "/usr/local/WWW/zopetest.domain.com/Products/LocalFS/__init__.py", line 65, in ? traceback.print_exc() File "/usr/lib/python2.1/traceback.py", line 210, in print_exc print_exception(etype, value, tb, limit, file) File "/usr/lib/python2.1/traceback.py", line 122, in print_exception _print(file, 'Traceback (most recent call last):') File "/usr/lib/python2.1/traceback.py", line 13, in _print file.write(str+terminator) IOError: [Errno 5] Input/output error (As you can see, the LocalFS product is installed in the Products directory of one site only) But when I log in as root and issue the command /usr/local/zope/bin/zopectl restart manually it works (only with a warning: /usr/local/zope/zope/lib/python/ts_regex.py:15: DeprecationWarning: the regex module is deprecated; please use the re module import regex, regsub #, Sync /usr/lib/python2.1/regsub.py:15: DeprecationWarning: the regsub module is deprecated; please use re.sub() DeprecationWarning) But then it *does* work. Can anybody give me a clue what is different in starting it from rc.local and by hand? TIA, Reinoud -- __________________________________________________ "Nothing is as subjective as reality" Reinoud van Leeuwen reinoud.v@n.leeuwen.net http://www.xs4all.nl/~reinoud __________________________________________________
Reinoud I think LocalFS is sending an error message to the "console" as a part of it's startup.. and somehow that is not valid process in your rc.local. I've heard of folks using redirection, and/or STUPID_LOG_FILE to solve this. -steve On Friday, March 1, 2002, at 11:45 AM, Reinoud van Leeuwen wrote:
Hi,
I have installed Zope 2.5.0 (with Python 2.1.2) on a FreeBSD 4.2 server behind Apache 1.3.20 with PCGI.
Zope is started at boot time from /etc/rc.local with the command /usr/local/zope/bin/zopectl start
After booting, LocalFS does not work. ErrorMessage is: Traceback (most recent call last): File "/usr/local/zope/2.5.0/lib/python/OFS/Application.py", line 531, in import_product product=__import__(pname, global_dict, global_dict, silly) File "/usr/local/WWW/zopetest.domain.com/Products/LocalFS/__init__.py", line 65, in ? traceback.print_exc() File "/usr/lib/python2.1/traceback.py", line 210, in print_exc print_exception(etype, value, tb, limit, file) File "/usr/lib/python2.1/traceback.py", line 122, in print_exception _print(file, 'Traceback (most recent call last):') File "/usr/lib/python2.1/traceback.py", line 13, in _print file.write(str+terminator) IOError: [Errno 5] Input/output error
(As you can see, the LocalFS product is installed in the Products directory of one site only)
But when I log in as root and issue the command /usr/local/zope/bin/zopectl restart manually it works (only with a warning:
/usr/local/zope/zope/lib/python/ts_regex.py:15: DeprecationWarning: the regex module is deprecated; please use the re module import regex, regsub #, Sync /usr/lib/python2.1/regsub.py:15: DeprecationWarning: the regsub module is deprecated; please use re.sub() DeprecationWarning)
But then it *does* work. Can anybody give me a clue what is different in starting it from rc.local and by hand?
TIA, Reinoud
-- __________________________________________________ "Nothing is as subjective as reality" Reinoud van Leeuwen reinoud.v@n.leeuwen.net http://www.xs4all.nl/~reinoud __________________________________________________
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Fri, 1 Mar 2002, Steve Spicklemire wrote:
Reinoud
I think LocalFS is sending an error message to the "console" as a part of it's startup.. and somehow that is not valid process in your rc.local. I've heard of folks using redirection, and/or STUPID_LOG_FILE to solve this.
I once had this problem and it took me a while to realize: some_directory$ /var/zope/start -D (long-running process) in another shell: other_dir$ rm -rf some_directory Then, when restarting Zope if it had LocalFS, I rec'd an IOError as it tried to use the now non-existing present working directory. Might not be your problem, but worth checking. It was annoying difficult for 20 minutes to decode. -- Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton Independent Knowledge Management Consultant
On Fri, Mar 01, 2002 at 05:45:43PM +0100, Reinoud van Leeuwen wrote:
Hi,
I have installed Zope 2.5.0 (with Python 2.1.2) on a FreeBSD 4.2 server behind Apache 1.3.20 with PCGI.
Zope is started at boot time from /etc/rc.local with the command /usr/local/zope/bin/zopectl start
After booting, LocalFS does not work. ErrorMessage is: Traceback (most recent call last): File "/usr/local/zope/2.5.0/lib/python/OFS/Application.py", line 531, in import_product product=__import__(pname, global_dict, global_dict, silly) File "/usr/local/WWW/zopetest.domain.com/Products/LocalFS/__init__.py", line 65, in ? traceback.print_exc() File "/usr/lib/python2.1/traceback.py", line 210, in print_exc print_exception(etype, value, tb, limit, file) File "/usr/lib/python2.1/traceback.py", line 122, in print_exception _print(file, 'Traceback (most recent call last):') File "/usr/lib/python2.1/traceback.py", line 13, in _print file.write(str+terminator) IOError: [Errno 5] Input/output error
After some debugging I found the solution: during the start process, the product tries to write a warning to sys.stderr. For some reason STDERR is not writable from /etc/rc.local. So the warning cannot be written, and this results in an exception, preventing the product from starting up at all. I solved this by changing the line in /etc/rc.local to: echo -n " Zope "; /usr/local/zope/bin/zopectl start 2>> /var/log/zopeboot Now the warning can be written somewhere and Zope boots complete. Thanks for your help. -- __________________________________________________ "Nothing is as subjective as reality" Reinoud van Leeuwen reinoud.v@n.leeuwen.net http://www.xs4all.nl/~reinoud __________________________________________________
participants (3)
-
Joel Burton -
Reinoud van Leeuwen -
Steve Spicklemire