CUPS get stuck after restart on active cups-browsed print jobs
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- c, linux, ubuntu
调研方向
首先检查 cups 和 cups-browsed 的 systemd 单元、报告中的服务日志,以及重启后 /var/spool/cups 下的队列状态。在 Ubuntu 22.04 上使用一个处于活动状态的 cups-browsed 作业重现故障,并比较分别重启任一 daemon 时的行为。当排队中的打印机能够恢复,且不会出现持续的 destination-host 错误,也不需要删除 spool 文件时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
Printer queues getting stuck or disabled and sometimes yield a status message "No suitable destination host found by cups-browsed, retrying later" or "No destination host name supplied by cups-browsed for printer , is cups-browsed running?". Printing on other printer queues from cups-browsed works successful, at least most of the time.
We tried solving the problem by clearing all print queues on the affected workstations at first (stopping both daemons and clear printers.conf), but it didn't stop it. The patch https://github.com/OpenPrinting/cups-browsed/commit/57d9351ea45f47b3bd185f263b1e37d276cf17b8 from #23 didn't really solved it, too.
At the moment, I suspect a line of shell script in our configuration management (fai) which restarts the cups-browsed daemon after a configuration change.
To Reproduce
Steps to reproduce the behavior:
- Print a job to a printer queue managed by cups-browsed. Helpful if the print job is bigger than a few pages so you got more time to react.
- Wait till the program printed and the job is processed by CUPS.
- Restart the
cupsorcups-browsedsystemd unit. Both should result in some or an other error described above. - Printing again to the same queue yields to the same error. Maybe a single print job passes through, but the same error is excepted.
Expected behavior
Printing works even through restart from one of the responsible daemons or the avoidance of persisting the error.
System Information:
- OS: Ubuntu
- Version 22.04 LTS
cups-browsed and cups-filters are backported from Ubuntu mantic (Version 2.0.0-0ubuntu2) because of trouble in earlier versions in junction to our CUPS server on Debian 11.
Also added the patch https://github.com/OpenPrinting/cups-browsed/commit/57d9351ea45f47b3bd185f263b1e37d276cf17b8
Additional context
From my current understanding, it's a problem when CUPS want to print but cups-browsed hasn't detected the remote printer. It could be because of those cases:
- cups-browsed is in restart and therefor, printing isn't possible.
- CUPS started and have unfinished jobs from the previous run. The daemon tries to print but cups-browsed didn't detected the remote printers yet, so no target to print.
When restarting CUPS, these problematic printing queues persist while other queues appear after cups-browsed detected them. Don't know if thats just a CUPS problem because theres a print job for him also.
On most workstations that reported the problem, we found log messages that systemd killed the service at some time and cups-browsed reports the following message for all print queues at the next start:
Timeout happened during creation of the queue <name>, turn on DebugLogging for more info.
We now tried to temporarily solve this problem by the following systemd unit override for cups.service:
# /etc/systemd/system/cups.service.d/20-cups-jobs.conf
[Service]
ExecStartPre=/usr/bin/find /var/spool/cups -maxdepth 1 -type f -delete
It cleans the printing queue before the start so it wont trigger an undetected cups-browsed printer.
I can give feedback if this solves it. At least at the next restart.
Would be nice if cups-browsed would be more resilient with this.
- 主要语言
- C
- 星标
- 51
- 派生
- 21
- 平均合并
- 22 小时 49 分钟
- 30 天内合并 PR
- 6
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OpenPrinting/cups-browsed 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 67/100
OpenPrinting/cups-browsed#82 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
OpenPrinting/cups-browsed#77 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 42/100
OpenPrinting/cups-browsed#76 ·
-
难度 4/5 3-5 天 新手友好度 50/100
OpenPrinting/cups-browsed#75 ·
-
难度 4/5 3-5 天 新手友好度 38/100
OpenPrinting/cups-browsed#71 ·
查看 OpenPrinting/cups-browsed 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
ChupathingyCE/chupathingyce#1550 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
slice
难度 2/5 1-3 小时 新手友好度 73/100
Life-Framework/Life-Framework#3878 ·
维护者通常 1 天内回复
-
`sha256()` returns a wrong hash when libsql-ffi is built with gcc 11 or later可能已有人在做 @colinhacks 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
tursodatabase/libsql#2333 ·
维护者通常 11 天内回复