--- Begin Message ---
- To: submit@bugs.debian.org
- Subject: x2gobroker: RuntimeError when run as WSGI process f rom apache
- From: Linnea Skogtvedt <linnea@linuxavdelingen.no>
- Date: Tue, 19 Mar 2019 21:13:32 +0100
- Message-id: <69bbba0c-1276-4369-1dab-02805e6d5425@linuxavdelingen.no>
Package: x2gobroker
Version: 0.0.4.0-3
Approximately half the time, wget -O - http://127.0.0.1/x2gobroker/
yields a 500 Internal Server Error. /var/log/x2gobroker/wsgi.log shows
the following:
> wsgilog.log: Mon, 18 Mar 2019 16:01:12 ERROR Server got itself in trouble
> Traceback (most recent call last):
> File "/usr/lib/python3/dist-packages/wsgilog/__init__.py", line 192, in __call__
> return self.application(environ, start_response)
> File "/usr/lib/x2gobroker/wsgi/x2gobroker-wsgi", line 408, in _application
> return _tornado_application(environ, start_response)
> File "/usr/lib/python3/dist-packages/tornado/wsgi.py", line 83, in __call__
> return WSGIAdapter(self)(environ, start_response)
> File "/usr/lib/python3/dist-packages/tornado/wsgi.py", line 242, in __call__
> self.application(request)
> File "/usr/lib/python3/dist-packages/tornado/wsgi.py", line 207, in <lambda>
> application, request)
> File "/usr/lib/python3/dist-packages/tornado/web.py", line 2097, in __call__
> return dispatcher.execute()
> File "/usr/lib/python3/dist-packages/tornado/web.py", line 2228, in execute
> **self.path_kwargs)
> File "/usr/lib/python3/dist-packages/tornado/gen.py", line 297, in wrapper
> future = _create_future()
> File "/usr/lib/python3/dist-packages/tornado/gen.py", line 187, in _create_future
> future = Future()
> File "/usr/lib/python3.7/asyncio/events.py", line 644, in get_event_loop
> % threading.current_thread().name)
> RuntimeError: There is no current event loop in thread 'Dummy-1'.
This issue appears to be the same as in this tornado bug:
https://github.com/tornadoweb/tornado/issues/2371
The following workaround is suggested:
> import asyncio
> from tornado.platform.asyncio import AnyThreadEventLoopPolicy
> asyncio.set_event_loop_policy(AnyThreadEventLoopPolicy())
The error disappeared after adding these lines right after "### launch
as WSGI application ###" in /usr/bin/x2gobroker.
I am using a freshly installed Debian testing VM with two vCPUs. I used
the following command to install the packages: apt install apache2
x2gobroker x2gobroker-wsgi. To get this result I also had to apply the
fixes to my two recent bug reports on x2gobroker and x2gobroker-wsgi.
--- End Message ---
--- Begin Message ---
Source: x2gobroker
Source-Version: 0.0.4.1-1
We believe that the bug you reported is fixed in the latest version of
x2gobroker, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 925102@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Mike Gabriel <sunweaver@debian.org> (supplier of updated x2gobroker package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Tue, 23 Apr 2019 11:24:49 +0200
Source: x2gobroker
Architecture: source
Version: 0.0.4.1-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Remote Maintainers <debian-remote@lists.debian.org>
Changed-By: Mike Gabriel <sunweaver@debian.org>
Closes: 922040 922042 922137 922314 922458 922527 922774 923381 925102
Changes:
x2gobroker (0.0.4.1-1) unstable; urgency=medium
.
* New upstream release (with specific fixes, targetting Debian buster).
- Make builds reproducible. Thanks to Chris Lamb for providing a patch.
(Closes: #922137).
- Correctly initialize the loggers when using x2gobroker via WSGI in
Apache2. (Closes: #922042).
- x2gobroker-wsgi: Place WSGI script symlink (pointing to
<BINDIR>/x2gobroker) into a dedicated folder and configure Apache2
to use WSGIScriptAlias from that folder. (Closes: #922040).
- Permit `asyncio` to create event loops on any thread (required on
multithreaded WSGI servers using Python 3). (Closes: #925102).
- Make remote agent's SSH HostKey policy configurable globally, backend-wise
and per session profile. Fallback to RejectPolicy by default.
(Closes: #922314).
- x2gobroker/brokers/base_broker.py: Log IP address of authentication
attempts. (Closes: #922458).
* debian/patches:
+ Drop all patches. All changes applied upstream.
* debian/changelog:
+ Fix indentation in previous changelog stanza.
* debian/po:
+ Add French debconf translation. Thanks to Jean-Pierre Giraud. (Closes:
#923381).
+ Add Dutch debconf translation. Thanks to Frans Spiesschaert. (Closes:
#922774).
+ Add Portuguese debconf translation file. Thanks to Américo Monteiro.
(Closes: #922527).
* debian/x2gobroker-wsgi.install:
+ Add WSGIScriptAlias symlink path.
Checksums-Sha1:
fbea42d6572a11f700f007f95f404ef2bfcd45f9 3064 x2gobroker_0.0.4.1-1.dsc
9192d6b5601ebd4be490287582469b4c9ead892f 155610 x2gobroker_0.0.4.1.orig.tar.gz
632f2b42194cc9676622a702be499223e0312d14 488 x2gobroker_0.0.4.1.orig.tar.gz.asc
97358b6f11803c285b1431bad3e42086d95c82ee 37432 x2gobroker_0.0.4.1-1.debian.tar.xz
79c46354910315de8bb1640fd340f4a4a59bd105 9287 x2gobroker_0.0.4.1-1_source.buildinfo
Checksums-Sha256:
77d6293923608f46f728d0cbb6638aebc6b79ceae4d33e9a04f67e332c213f9c 3064 x2gobroker_0.0.4.1-1.dsc
c8939054b527d8a0b1e177fa225ecb33c41a430126e9dca8f8f622de9677512f 155610 x2gobroker_0.0.4.1.orig.tar.gz
c839dc644aa3cfdb9237b0752e3f7417c41e57b0946e01d0aeb4c2d04fe8ae82 488 x2gobroker_0.0.4.1.orig.tar.gz.asc
7b864442cbc61c0807099de728408aa775b2d4608463ac6b7728560956741e13 37432 x2gobroker_0.0.4.1-1.debian.tar.xz
d20b6af539227db002331926f768b3d31d13803a7450d5ce5868eac035235213 9287 x2gobroker_0.0.4.1-1_source.buildinfo
Files:
06425a93be14a10292ae4eb317e8cd31 3064 misc optional x2gobroker_0.0.4.1-1.dsc
5c6e5be4800900a84fb1434e3d88a145 155610 misc optional x2gobroker_0.0.4.1.orig.tar.gz
7421f6dc2c3aec1a02188c4ce9567d78 488 misc optional x2gobroker_0.0.4.1.orig.tar.gz.asc
f509775b89ae120d7801522c431281ac 37432 misc optional x2gobroker_0.0.4.1-1.debian.tar.xz
cd323770001ba121f436b0297c994b7f 9287 misc optional x2gobroker_0.0.4.1-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJJBAEBCAAzFiEEm/uu6GwKpf+/IgeCmvRrMCV3GzEFAlzAq6EVHHN1bndlYXZl
ckBkZWJpYW4ub3JnAAoJEJr0azAldxsxxuEP/1Uivoo8T0OHZ8yzjTeIfSkk4t6A
IZr9X64SBSNqV7hLSkMiw7qoI+vEkZtyN1wt4OOAZ1TFz/U9PhSyL9sMLlrjKn49
5dNdxcnd719RCTQBJZyKi+Olggczm9+LqRmqlgwRhnBtP4qwMPeeYmyCDVYA9bNO
XKd40XFXma/phxkntfhYC9uXW0PgQQo8uwvp5WusdsUX6TPhe32yyJx32qWasGpB
ptRQuSxh9WJXOavYZQ2KDXVqA0yMa5B8DTmMGeFZCKtLt3fdy7KEJivC1YS3cXUE
ZOZDPUAcW6BEZl9qAKpXCo8014prWJjUUTLYYFurjmkBzvllHRv7xNk9fUzfTEPS
wYB2R+x6JHP564X1qIJ6vzgb56XHj0eh+TNcmIrepqHvHvm1FkHRGclD0nOqesRN
9gYGxbkDnrJ0uTENYNQTggF2B9v/fx0GEA7JYKnLbKTukqEaFlBd26vNCAyH9QuF
xUFoOXDmYt6KSKkNBcbeHncaq4g8fB7KW7HFrBH9uTYJxsGIE8BgRAMUGKaUbH0g
+Elj9R8AidQWeXmpYqBw89mcQkeoOcFrs/mLPogzF/4nl0sIm3Z3cf2uhlzb5UsZ
f1nPU8s2nc1mNpQmcmpAtVC2w/Ki1wx25PbM7SB2PpIMbHjFkGYx3Cbbd1hCai/2
YQm+vOTEeXx4Ata0
=XVrS
-----END PGP SIGNATURE-----
--- End Message ---