CUPS 错误日志很快就会填满。几天之内,它已经填满了1.8GB。
我需要帮助确定日志如此快填满的原因。这是错误日志的片段:
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] argv[5]="finishings=3 number-up=1 job-uuid=urn:uuid:87f14fd8-e2c1-3c85-660b-2ac816cdd376 job-originating-host-name=localhost time-at-creation=1657840033 time-at-processing=1657840075 time-at-completed=time-at-completed"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] argv[6]="/var/spool/cups/d1741429-001"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[0]="CUPS_CACHEDIR=/var/cache/cups"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[1]="CUPS_DATADIR=/usr/share/cups"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[2]="CUPS_DOCROOT=/usr/share/cups/www"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[4]="CUPS_REQUESTROOT=/var/spool/cups"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[5]="CUPS_SERVERBIN=/usr/lib/cups"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[6]="CUPS_SERVERROOT=/etc/cups"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[7]="CUPS_STATEDIR=/var/run/cups"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[8]="HOME=/var/spool/cups/tmp"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[9]="PATH=/usr/lib/cups/filter:/usr/lib64/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[10]="[email protected]"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[11]="SOFTWARE=CUPS/1.4.2"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[12]="TMPDIR=/var/spool/cups/tmp"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[13]="USER=root"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[14]="CUPS_SERVER=/var/run/cups/cups.sock"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[15]="CUPS_ENCRYPTION=IfRequested"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[16]="IPP_PORT=631"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[17]="CHARSET=utf-8"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[18]="LANG=en_US.UTF-8"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[19]="PPD=/etc/cups/ppd/mzpay1.ppd"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[20]="RIP_MAX_CACHE=128m"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[21]="CONTENT_TYPE=text/plain"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[22]="DEVICE_URI=lpd://mzpay1/raw?timeout=10"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[23]="PRINTER_INFO=mzpay1"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[24]="PRINTER_LOCATION="
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[25]="PRINTER=mzpay1"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] envp[26]="CUPS_FILETYPE=document"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] Started backend /usr/lib/cups/backend/lpd (PID 5903)
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] STATE: +connecting-to-device
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] Looking up "mzpay1"...
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] Connecting to mzpay1:515 for printer raw
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] Connecting to printer...
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] STATE: -connecting-to-device
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] Connected to printer...
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] Connected to 172.29.51.44:515 (IPv4) (local port 1020)...
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] lpd_command 02 raw
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] Sending command string (5 bytes)...
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] Reading command status...
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] lpd_command returning 0
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] Control file is:
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] Hcms10.rockhold.local
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] Ppick
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] J_stdin_
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] ldfA903cms10.macarth
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] UdfA903cms10.macarth
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] N_stdin_
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] lpd_command 02 95 cfA903cms10.macarth
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] Sending command string (26 bytes)...
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] Reading command status...
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] Set job-printer-state-message to "Remote host did not respond with command status byte after 10 seconds!", current level=WARN
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] lpd_command returning 4
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] Backend returned status 1 (failed)
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] Retrying job on same printer.
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] End of messages
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] printer-state=3(idle)
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] printer-state-message="/usr/lib/cups/backend/lpd failed"
D [15/Jul/2022:09:08:05 +1000] [Job 1741429] printer-state-reasons=none
答案1
在代码片段中,CUPS 尝试mzpay1
使用 LPD 协议向打印机(IP 172.29.51.44)提交打印作业,即连接到打印机上的 TCP 端口 515。
打印机似乎接受连接,但在 10 秒内未响应命令状态字节。因此 CUPS 认为这是一次失败,并将重试打印作业。也许这个循环会重复?
您应该调查为什么该打印机似乎没有响应。它是否可能正忙于从其他主机发送的另一个打印作业?
根据我的经验,如果让多个主机将作业直接发送到打印机,某些网络打印机将无法正常工作。此外,LPD 协议似乎有一个内置的假设,即 LPD 服务器有足够的存储空间,因此它可以在实际打印机制繁忙时假脱机处理任何合理数量的打印作业。
对于许多小型网络打印机来说,情况并非如此:当打印机正在打印一个作业时,在第一个作业完成之前它无法接受另一个作业。但 LPD 中似乎没有办法说“请稍等”:客户端要么立即开始提交打印作业,要么根本不提交。因此,当充当 LPD 服务器的打印机试图找借口希望第一个作业尽快完成时,客户端会变得不高兴。
如果这似乎是问题所在,请尝试切换到其他网络打印协议(如果您的打印机支持某种网络打印协议);或者让所有客户端系统将作业发送到一台有足够磁盘空间用于打印作业假脱机的服务器,并且只让该服务器将作业直接发送到打印机。
答案2
我建议查看cupsd.conf中的LogLevel选项https://www.suse.com/support/kb/doc/?id=000016621 我认为设置为“警告”就足够了,我的设置为“调试”并在 30 秒内提交了 2mb...!