cmsAdminWebServer doesn't work - TypeError: an integer is required (got type bytes)
I've got a small issue, running the cmsAdminWebServer command just gives me an error:
File "/usr/lib/python3/dist-packages/gevent/_tblib.py", line 202, in as_traceback
code = CodeType(
TypeError: an integer is required (got type bytes)
Here's the entire error message, if it helps:
Traceback (most recent call last):
File "/usr/local/bin/cmsAdminWebServer", line 4, in <module>
__import__('pkg_resources').run_script('cms==1.5.dev0', 'cmsAdminWebServer')
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 667, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1463, in run_script
exec(code, namespace, namespace)
File "/usr/local/lib/python3.8/dist-packages/cms-1.5.dev0-py3.8.egg/EGG-INFO/scripts/cmsAdminWebServer", line 48, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/cms-1.5.dev0-py3.8.egg/EGG-INFO/scripts/cmsAdminWebServer", line 41, in main
success = default_argument_parser("Admins' web server for CMS.",
File "/usr/local/lib/python3.8/dist-packages/cms-1.5.dev0-py3.8.egg/cms/io/web_service.py", line 119, in run
self.web_server.start()
File "/usr/lib/python3/dist-packages/gevent/baseserver.py", line 305, in start
self.init_socket()
File "/usr/lib/python3/dist-packages/gevent/pywsgi.py", line 1491, in init_socket
self.update_environ()
File "/usr/lib/python3/dist-packages/gevent/pywsgi.py", line 1503, in update_environ
name = socket.getfqdn(address[0])
File "/usr/lib/python3/dist-packages/gevent/_socketcommon.py", line 269, in getfqdn
hostname, aliases, _ = gethostbyaddr(name)
File "/usr/lib/python3/dist-packages/gevent/_socketcommon.py", line 241, in gethostbyaddr
return get_hub().resolver.gethostbyaddr(ip_address)
File "/usr/lib/python3/dist-packages/gevent/resolver/thread.py", line 68, in gethostbyaddr
return self.pool.apply(_socket.gethostbyaddr, args, kwargs)
File "/usr/lib/python3/dist-packages/gevent/pool.py", line 159, in apply
return self.spawn(func, *args, **kwds).get()
File "src/gevent/event.py", line 268, in gevent._event.AsyncResult.get
File "src/gevent/event.py", line 296, in gevent._event.AsyncResult.get
File "src/gevent/event.py", line 286, in gevent._event.AsyncResult.get
File "src/gevent/event.py", line 266, in gevent._event.AsyncResult._raise_exception
File "src/gevent/event.py", line 211, in gevent._event.AsyncResult.exc_info.__get__
File "/usr/lib/python3/dist-packages/gevent/_tblib.py", line 371, in g
return f(a)
File "/usr/lib/python3/dist-packages/gevent/_tblib.py", line 432, in load_traceback
return loads(s)
File "/usr/lib/python3/dist-packages/gevent/_tblib.py", line 337, in unpickle_traceback
return ret.as_traceback()
File "/usr/lib/python3/dist-packages/gevent/_tblib.py", line 202, in as_traceback
code = CodeType(
TypeError: an integer is required (got type bytes)
I have tried running cmsResourceService -a, but I can see on the log that AdminWebServer loop-restarts.
This is the first time I'm encountering this issue, I have used CMS before and never seen an error like this - everything worked smoothly.
Hi, is it possible that you configured a port in cms.conf as a string instead of a number (e.g. admin_listen_port here?
Alternatively, are you using the correct gevent version (20.12.0)?
Hi, I have all ports as integers as it was by default, and the gevent version is what is should be (20.12.0).
https://github.com/gevent/gevent/issues/1491 could this be relevant? Possibly you have the listening address to be resolved and DNS does not resolve it?
@BeatriceSmart1e did you encounter this again? If yes please reopen the issue