这些行在系统日志中的含义是什么:
Mar 16 12:09:33 BBB systemd[XXXX]: Failed to get udev device from devnum 9:1: Permission denied
Mar 16 12:09:33 BBB systemd[XXXX]: Failed to get udev device from devnum 9:2: Permission denied
Mar 16 12:09:33 BBB systemd[Y]: Created slice User Slice of AAAAA.
Mar 16 12:09:33 BBB systemd[Y]: Starting User Manager for UID 1001...
Mar 16 12:09:33 BBB systemd[Y]: Started Session c53 of user AAAAA.
Mar 16 12:09:33 BBB systemd[ZZZZ]: Failed to enumerate devices: Permission denied
Mar 16 12:09:33 BBB systemd[ZZZZ]: Failed to get udev device from devnum 9:1: Permission denied
Mar 16 12:09:33 BBB systemd[ZZZZ]: Failed to get udev device from devnum 9:2: Permission denied
Mar 16 12:09:33 BBB systemd[ZZZZ]: Failed to get udev device from devnum 8:3: Permission denied
Mar 16 12:09:33 BBB systemd[ZZZZ]: Failed to get udev device from devnum 8:19: Permission denied
Mar 16 12:09:33 BBB systemd[ZZZZ]: Failed to get udev device from devnum 8:35: Permission denied
Mar 16 12:09:33 BBB systemd[ZZZZ]: Reached target Timers.
Mar 16 12:09:33 BBB systemd[ZZZZ]: Reached target Sockets.
Mar 16 12:09:33 BBB systemd[ZZZZ]: Reached target Paths.
Mar 16 12:09:33 BBB systemd[ZZZZ]: Reached target Basic System.
Mar 16 12:09:33 BBB systemd[ZZZZ]: Reached target Default.
Mar 16 12:09:33 BBB systemd[ZZZZ]: Startup finished in 6ms.
Mar 16 12:09:33 BBB systemd[Y]: Started User Manager for UID 1001.
更多背景信息:
- Codeship(一种 CI 工具)正在通过 SSH 连接服务器并运行一个命令(该命令调用 php、postgresql,并且必须在自定义日志中记录一些内容)。
- 该命令似乎被阻止(无响应,但控制台上没有详细信息)
- 所服务的站点(nginx、postgresql)在调用 postgresql 命令的页面上没有响应。
- 我通过 SSH 连接,重新启动了 postgresql 服务,但 codeship 脚本失败了。
- 然后一切又恢复正常了(postgreSQL 正常)。
我搜索了 PostgreSQL 日志、Nginx 日志和 php 日志,但一无所获。所以我开始深入研究 syslog。但我不是专家。这些行是我认为问题开始的地方,但我不确定。
- 这几行是什么意思?
- 如果与我的实际问题无关,我应该在哪里搜索?
答案1
udev
是Unix/Linux系统上控制设备的虚拟对象。
正如日志所说,该进程没有从 获取信息的权限devnum 9:1:
。
更多来自人udev对于 systemd:
记得检查 CI 工具 (codeship) 是否有权限读取 udev 信息。您可以使用用户
su - username
并使用类似这样的命令来检查它。udevadm info -q all -n /dev/your_device
如果用户没有权限。使用它来更改设备权限。chmod 0666 /dev/your_device
确保用户可以拥有读特权。