openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #10160
[Bug 952286] Re: signal problems prevent graceful shutdown
Well, not sure what else I can say except for answering your questions.
Running OpenIndiana Build oi_151a2 64-bit (illumos fc320b2833d3)
I did just try a couple of things:
1. with --stop-after-init works fine
~/src/openerp$ server/6.1/openerp-server --addons-path=addons/6.1/,web/6.1/addons/ --stop-after-init
2012-04-10 11:57:34,898 1853 INFO ? openerp: OpenERP version 6.1
2012-04-10 11:57:34,898 1853 INFO ? openerp: addons paths: /home/richard/src/openerp/addons/6.1,/home/richard/src/openerp/web/6.1/addons
2012-04-10 11:57:34,899 1853 INFO ? openerp: database hostname: localhost
2012-04-10 11:57:34,899 1853 INFO ? openerp: database port: 5432
2012-04-10 11:57:34,899 1853 INFO ? openerp: database user: richard
2012-04-10 11:57:35,328 1853 INFO ? openerp.addons.web: embedded mode
~/src/openerp$
2. with --no-netrpc works as well
~/src/openerp$ server/6.1/openerp-server --addons-path=addons/6.1/,web/6.1/addons/ --no-netrpc
2012-04-10 11:58:30,513 1866 INFO ? openerp: OpenERP version 6.1
2012-04-10 11:58:30,514 1866 INFO ? openerp: addons paths: /home/richard/src/openerp/addons/6.1,/home/richard/src/openerp/web/6.1/addons
2012-04-10 11:58:30,514 1866 INFO ? openerp: database hostname: localhost
2012-04-10 11:58:30,514 1866 INFO ? openerp: database port: 5432
2012-04-10 11:58:30,514 1866 INFO ? openerp: database user: richard
2012-04-10 11:58:30,515 1866 INFO ? openerp.netsvc: Starting 0 services
2012-04-10 11:58:30,553 1866 INFO ? openerp.wsgi.core: HTTP service (werkzeug) running on 0.0.0.0:8069
2012-04-10 11:58:30,979 1866 INFO ? openerp.addons.web: embedded mode
2012-04-10 11:58:31,774 1866 INFO ? openerp: OpenERP server is running, waiting for connections...
2012-04-10 11:58:44,532 1866 INFO ? werkzeug: 127.0.0.1 - - [10/Apr/2012 11:58:44] "GET /web/webclient/home HTTP/1.1" 200 -
2012-04-10 11:58:44,568 1866 INFO ? werkzeug: 127.0.0.1 - - [10/Apr/2012 11:58:44] "GET /web/static/src/img/favicon.ico HTTP/1.1" 200 -
2012-04-10 11:58:44,604 1866 INFO ? werkzeug: 127.0.0.1 - - [10/Apr/2012 11:58:44] "GET /web/webclient/css HTTP/1.1" 200 -
2012-04-10 11:58:44,651 1866 INFO ? werkzeug: 127.0.0.1 - - [10/Apr/2012 11:58:44] "GET /web/webclient/js HTTP/1.1" 200 -
2012-04-10 11:58:45,052 1866 INFO ? werkzeug: 127.0.0.1 - - [10/Apr/2012 11:58:45] "POST /web/session/get_session_info HTTP/1.1" 200 -
2012-04-10 11:58:45,080 1866 INFO ? werkzeug: 127.0.0.1 - - [10/Apr/2012 11:58:45] "POST /web/webclient/qweblist HTTP/1.1" 200 -
2012-04-10 11:58:45,264 1866 INFO ? werkzeug: 127.0.0.1 - - [10/Apr/2012 11:58:45] "POST /web/proxy/load HTTP/1.1" 200 -
2012-04-10 11:58:45,451 1866 INFO ? werkzeug: 127.0.0.1 - - [10/Apr/2012 11:58:45] "POST /web/session/get_lang_list HTTP/1.1" 200 -
2012-04-10 11:58:45,499 1866 INFO template1 werkzeug: 127.0.0.1 - - [10/Apr/2012 11:58:45] "POST /web/database/get_list HTTP/1.1" 200 -
2012-04-10 11:58:45,503 1866 INFO template1 werkzeug: 127.0.0.1 - - [10/Apr/2012 11:58:45] "POST /web/database/get_list HTTP/1.1" 200 -
2012-04-10 11:58:45,509 1866 INFO ? werkzeug: 127.0.0.1 - - [10/Apr/2012 11:58:45] "GET /web/static/src/img/logo2.png HTTP/1.1" 200 -
2012-04-10 11:58:45,509 1866 INFO ? werkzeug: 127.0.0.1 - - [10/Apr/2012 11:58:45] "GET /web/static/src/img/pattern.png HTTP/1.1" 200 -
^C2012-04-10 11:58:51,017 1866 INFO ? openerp.netsvc: Stopping 0 services
2012-04-10 11:58:51,507 1866 INFO ? openerp.service: Initiating shutdown
2012-04-10 11:58:51,507 1866 INFO ? openerp.service: Hit CTRL-C again or send a second signal to force the shutdown.
~/src/openerp$
3. but as I stated in the bug report, without these a ^C hangs with a traceback as follows
~/src/openerp$ server/6.1/openerp-server --addons-path=addons/6.1/,web/6.1/addons/
2012-04-10 11:59:21,720 1882 INFO ? openerp: OpenERP version 6.1
2012-04-10 11:59:21,720 1882 INFO ? openerp: addons paths: /home/richard/src/openerp/addons/6.1,/home/richard/src/openerp/web/6.1/addons
2012-04-10 11:59:21,720 1882 INFO ? openerp: database hostname: localhost
2012-04-10 11:59:21,720 1882 INFO ? openerp: database port: 5432
2012-04-10 11:59:21,720 1882 INFO ? openerp: database user: richard
2012-04-10 11:59:21,721 1882 INFO ? openerp.service.netrpc_server: starting NET-RPC service on 0.0.0.0:8070
2012-04-10 11:59:21,722 1882 INFO ? openerp.netsvc: Starting 1 services
2012-04-10 11:59:21,757 1882 INFO ? openerp.wsgi.core: HTTP service (werkzeug) running on 0.0.0.0:8069
2012-04-10 11:59:22,093 1882 INFO ? openerp.addons.web: embedded mode
2012-04-10 11:59:23,043 1882 INFO ? openerp: OpenERP server is running, waiting for connections...
^C2012-04-10 11:59:28,326 1882 INFO ? openerp.netsvc: Stopping 1 services
Traceback (most recent call last):
File "server/6.1/openerp-server", line 270, in <module>
quit_on_signals()
File "server/6.1/openerp-server", line 207, in quit_on_signals
openerp.service.stop_services()
File "/home/richard/src/openerp/server/6.1/openerp/service/__init__.py", line 82, in stop_services
openerp.netsvc.Server.quitAll()
File "/home/richard/src/openerp/server/6.1/openerp/netsvc.py", line 317, in quitAll
srv.stop()
File "/home/richard/src/openerp/server/6.1/openerp/service/netrpc_server.py", line 142, in stop
self._close_socket()
File "/home/richard/src/openerp/server/6.1/openerp/netsvc.py", line 327, in _close_socket
close_socket(self.socket)
File "/home/richard/src/openerp/server/6.1/openerp/netsvc.py", line 50, in close_socket
sock.shutdown(socket.SHUT_RDWR)
File "<string>", line 1, in shutdown
socket.error: [Errno 134] Ce destinataire n'est pas connecté.
Problem remains, because without net-rpc, the gtk client is helpless (see screenshot)
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/952286
Title:
signal problems prevent graceful shutdown
Status in OpenERP Server:
Incomplete
Bug description:
I'd like to get openerp working well with SMF but the first thing I
notice is that it chokes instead of a graceful shutdown with signal
<pid> or signal -INT <pid>
Here is the output:
2012-03-11 14:35:03,559 6909 INFO ? openerp.netsvc: Stopping 1 services
Traceback (most recent call last):
File "server/6.1/openerp-server", line 270, in <module>
quit_on_signals()
File "server/6.1/openerp-server", line 207, in quit_on_signals
openerp.service.stop_services()
File "/home/richard/src/openerp/server/6.1/openerp/service/__init__.py", line 82, in stop_services
openerp.netsvc.Server.quitAll()
File "/home/richard/src/openerp/server/6.1/openerp/netsvc.py", line 317, in quitAll
srv.stop()
File "/home/richard/src/openerp/server/6.1/openerp/service/netrpc_server.py", line 142, in stop
self._close_socket()
File "/home/richard/src/openerp/server/6.1/openerp/netsvc.py", line 327, in _close_socket
close_socket(self.socket)
File "/home/richard/src/openerp/server/6.1/openerp/netsvc.py", line 50, in close_socket
sock.shutdown(socket.SHUT_RDWR)
File "<string>", line 1, in shutdown
socket.error: [Errno 134] Ce destinataire n'est pas connecté.
from line 147 to 208 in openerp-server describes the supposed handling,
notably what is supposed to happen:
""" Wait for one or two signals then shutdown the server.
The first SIGINT or SIGTERM signal will initiate a graceful shutdown while
a second one if any will force an immediate exit.
"""
# Wait for a first signal to be handled. (time.sleep will be interrupted
# by the signal handler.) The try/except is for the win32 case.
This is considered a showstopper in order to put into production mode
as is considered 'unmanageable'.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/952286/+subscriptions
References