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
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

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.
Comment by richard kuesters (vltr) - Tuesday, 18 April 2017, 19:19 GMT
I don't think this has to do with packaging (or Arch), but with changes related to twisted itself - I did experience the same, but for unknown reasons the "twistd web --help" message wasn't that much of a help to start with.

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 :)
Comment by Aleksei (yupi) - Wednesday, 19 April 2017, 16:52 GMT
Thanks a lot!

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.
Comment by richard kuesters (vltr) - Wednesday, 19 April 2017, 17:08 GMT
I think it can be closed because the "twistd" executable is distributed by Twisted Matrix also, it has nothing to do with Arch Linux:

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 :)

Loading...