我的 ubuntu 18.04 plex 服务器上运行着 tautulli。我使用浏览器中的按钮对其进行了升级。现在该服务无法启动:
root@plex:~# systemctl restart tautulli
Job for tautulli.service failed because the control process exited with error code.
See "systemctl status tautulli.service" and "journalctl -xe" for details.
root@plex:~#
-- Unit tautulli.service has begun starting up.
May 04 16:27:22 plex Tautulli.py[25883]: Traceback (most recent call last):
May 04 16:27:22 plex Tautulli.py[25883]: File "/opt/Tautulli/Tautulli.py", line 38, in <module>
May 04 16:27:22 plex Tautulli.py[25883]: import plexpy
May 04 16:27:22 plex Tautulli.py[25883]: File "/opt/Tautulli/plexpy/__init__.py", line 37, in <module>
May 04 16:27:22 plex Tautulli.py[25883]: import activity_handler
May 04 16:27:22 plex Tautulli.py[25883]: File "/opt/Tautulli/plexpy/activity_handler.py", line 24, in <module>
May 04 16:27:22 plex Tautulli.py[25883]: import activity_processor
May 04 16:27:22 plex Tautulli.py[25883]: File "/opt/Tautulli/plexpy/activity_processor.py", line 21, in <module>
May 04 16:27:22 plex Tautulli.py[25883]: import database
May 04 16:27:22 plex Tautulli.py[25883]: File "/opt/Tautulli/plexpy/database.py", line 24, in <module>
May 04 16:27:22 plex Tautulli.py[25883]: import logger
May 04 16:27:22 plex Tautulli.py[25883]: File "/opt/Tautulli/plexpy/logger.py", line 30, in <module>
May 04 16:27:22 plex Tautulli.py[25883]: import helpers
May 04 16:27:22 plex Tautulli.py[25883]: File "/opt/Tautulli/plexpy/helpers.py", line 48, in <module>
May 04 16:27:22 plex Tautulli.py[25883]: from plexpy.api2 import API2
May 04 16:27:22 plex Tautulli.py[25883]: File "/opt/Tautulli/plexpy/api2.py", line 39, in <module>
May 04 16:27:22 plex Tautulli.py[25883]: import notification_handler
May 04 16:27:22 plex Tautulli.py[25883]: File "/opt/Tautulli/plexpy/notification_handler.py", line 43, in <module>
May 04 16:27:22 plex Tautulli.py[25883]: from newsletter_handler import notify as notify_newsletter
May 04 16:27:22 plex Tautulli.py[25883]: File "/opt/Tautulli/plexpy/newsletter_handler.py", line 29, in <module>
May 04 16:27:22 plex Tautulli.py[25883]: NEWSLETTER_SCHED = BackgroundScheduler()
May 04 16:27:22 plex Tautulli.py[25883]: File "/opt/Tautulli/lib/apscheduler/schedulers/base.py", line 82, in __init__
May 04 16:27:22 plex Tautulli.py[25883]: self.configure(gconfig, **options)
May 04 16:27:22 plex Tautulli.py[25883]: File "/opt/Tautulli/lib/apscheduler/schedulers/base.py", line 121, in configure
May 04 16:27:22 plex Tautulli.py[25883]: self._configure(config)
May 04 16:27:22 plex Tautulli.py[25883]: File "/opt/Tautulli/lib/apscheduler/schedulers/background.py", line 29, in _configure
May 04 16:27:22 plex Tautulli.py[25883]: super(BackgroundScheduler, self)._configure(config)
May 04 16:27:22 plex Tautulli.py[25883]: File "/opt/Tautulli/lib/apscheduler/schedulers/base.py", line 689, in _configure
May 04 16:27:22 plex Tautulli.py[25883]: self.timezone = astimezone(config.pop('timezone', None)) or get_localzone()
May 04 16:27:22 plex Tautulli.py[25883]: File "/opt/Tautulli/lib/tzlocal/unix.py", line 131, in get_localzone
May 04 16:27:22 plex Tautulli.py[25883]: _cache_tz = _get_localzone()
May 04 16:27:22 plex Tautulli.py[25883]: File "/opt/Tautulli/lib/tzlocal/unix.py", line 70, in _get_localzone
May 04 16:27:22 plex Tautulli.py[25883]: return pytz.timezone(etctz.replace(' ', '_'))
May 04 16:27:22 plex Tautulli.py[25883]: File "/opt/Tautulli/lib/pytz/__init__.py", line 178, in timezone
May 04 16:27:22 plex Tautulli.py[25883]: raise UnknownTimeZoneError(zone)
May 04 16:27:22 plex Tautulli.py[25883]: pytz.exceptions.UnknownTimeZoneError: 'SystemV/EST5'
May 04 16:27:22 plex systemd[1]: tautulli.service: Control process exited, code=exited status=1
May 04 16:27:22 plex systemd[1]: tautulli.service: Failed with result 'exit-code'.
May 04 16:27:22 plex systemd[1]: Failed to start Tautulli - Stats for Plex Media Server usage.
我不知道该如何着手调查此事。我假设在某个 tautulli 配置文件中配置了某个时区,而该文件却不存在/opt/Tautulli/lib/pytz/__init__.py
?还是该文件本身有问题?
环顾四周,这个答案有很多链接:https://stackoverflow.com/a/21717676/1867249
但是他的流程涉及“这将启动一个带有你的 Python 模块的 Finder 窗口。”并且我没有在服务器上安装任何 GUI。
答案1
使用 timedatectl 解决,系统由于某种原因使用了旧的时区 SystemV/EST5。