FS#53536 - [python-twisted] web fails to start
Attached to Project:
Arch Linux
Opened by Aleksei (yupi) - Sunday, 02 April 2017, 13:00 GMT
Last edited by Jelle van der Waa (jelly) - Wednesday, 19 April 2017, 18:38 GMT
Opened by Aleksei (yupi) - Sunday, 02 April 2017, 13:00 GMT
Last edited by Jelle van der Waa (jelly) - Wednesday, 19 April 2017, 18:38 GMT
|
Details
Description:
After upgrade to 17.1.0-1, my twistd3 file server fails to start. Below is the command I used to start it with, which fails now: frencis ~$ /usr/bin/twistd3 --nodaemon web --port=8000 --path="/path/to/server/root" Traceback (most recent call last): File "/usr/bin/twistd3", line 11, in <module> load_entry_point('Twisted==17.1.0', 'console_scripts', 'twistd')() File "/usr/lib/python3.6/site-packages/twisted/scripts/twistd.py", line 29, in run app.run(runApp, ServerOptions) File "/usr/lib/python3.6/site-packages/twisted/application/app.py", line 662, in run runApp(config) File "/usr/lib/python3.6/site-packages/twisted/scripts/twistd.py", line 25, in runApp _SomeApplicationRunner(config).run() File "/usr/lib/python3.6/site-packages/twisted/application/app.py", line 380, in run self.application = self.createOrGetApplication() File "/usr/lib/python3.6/site-packages/twisted/application/app.py", line 440, in createOrGetApplication ser = plg.makeService(self.config.subOptions) File "/usr/lib/python3.6/site-packages/twisted/web/tap.py", line 254, in makeService strports.service(config['port'], site).setServiceParent(s) File "/usr/lib/python3.6/site-packages/twisted/application/strports.py", line 40, in service endpoints.serverFromString(reactor, description), factory) File "/usr/lib/python3.6/site-packages/twisted/internet/endpoints.py", line 1569, in serverFromString nameOrPlugin, args, kw = _parseServer(description, None) File "/usr/lib/python3.6/site-packages/twisted/internet/endpoints.py", line 1487, in _parseServer getPlugins(IStreamServerEndpointStringParser), endpointType File "/usr/lib/python3.6/site-packages/twisted/internet/endpoints.py", line 1503, in _matchPluginToPrefix raise ValueError("Unknown endpoint type: '%s'" % (endpointType,)) ValueError: Unknown endpoint type: '8000' |
This task depends upon
Closed by Jelle van der Waa (jelly)
Wednesday, 19 April 2017, 18:38 GMT
Reason for closing: Not a bug
Additional comments about closing: Not a bug.
Wednesday, 19 April 2017, 18:38 GMT
Reason for closing: Not a bug
Additional comments about closing: Not a bug.
Well, reading about endpoints in Twisted: https://twistedmatrix.com/documents/current/core/howto/endpoints.html ...
I did then realized that my box was running with at least two nics for a good time ... Basically, all I had to get it running was assign an interface to my "port" (yeah, well, that's where the "--help" flag wasn't "helpful") and things started working again:
$ twistd web --path=/home/user/storage/ --port="tcp:port=8000:interface=192.168.0.52"
I hope this helps :)
Changing the flag from --port=8000 to --port="tcp:port=8000" works.
Should we maybe submit a feature request upstream to update --help output with such a simple example?
Should this example (and maybe a link to https://twistedmatrix.com/documents/current/core/howto/endpoints.html#servers) be added to this package's upgrade notes in Arch?
Otherwise, I think the bug can be closed.
https://github.com/twisted/twisted/blob/trunk/src/twisted/scripts/twistd.py
https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/twisted
https://www.archlinux.org/packages/extra/x86_64/python-twisted/
Hope this helps :)