cups icon indicating copy to clipboard operation
cups copied to clipboard

CUPS Проблема с отменой подписки по RSS

Open Tarzan142 opened this issue 4 years ago • 7 comments

Добрый день, имеется CUPS вот на ubuntu. Создаются сами по себе подписки по RSS 50 c лишним штук. при наличии 25 принтеров. эти подписки очееень сильно тормозят капс. При очистке содержимого файлов файлов subscriptions.conf,subscriptions.conf.O, сервер работает шустро (время переключения вкладок веб версии капса стало 1 сек вместо 8-9 секунд, но при печати любого документа с любого принтера создается вновь 50 с лишним подписок RSS. В чем дело, подскажите?. Думал дело в каком-то принтере, удалил все под чbстую, но подписки так и создаются. Ubuntu 18.04.3, CUPS 2.2.7, все принтеры удалял под 0, после печати на любой из принтеров все подписки 50 + появляются вновь. Файл subscriptions.conf: //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Subscription configuration file for CUPS v2.2.7 Written by cupsd NextSubscriptionId 405 <Subscription 349> Events printer-state-changed printer-restarted printer-shutdown printer-stopped$ Owner Имя пользователя LeaseDuration 86400 Interval 0 ExpirationTime 1633013711 NextEventId 15851 </Subscription> И так далее: 50 шт. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Мой конфиг: LogLevel warn PageLogFormat MaxLogSize 1m Listen localhost:631 Listen /run/cups/cups.sock Browsing Off BrowseLocalProtocols dnssd DefaultAuthType Basic WebInterface Yes <Location /> Order allow,deny </Location> <Location /admin> Order allow,deny </Location> <Location /admin/conf> AuthType Default Require user @SYSTEM Order allow,deny </Location> <Location /admin/log> AuthType Default Require user @SYSTEM Order allow,deny </Location> <Policy default> JobPrivateAccess default JobPrivateValues default SubscriptionPrivateAccess default SubscriptionPrivateValues default <Limit Create-Job Print-Job Print-URI Validate-Job> Order deny,allow </Limit> <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document> Require user @OWNER @SYSTEM Order deny,allow </Limit> <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices> AuthType Default Require user @SYSTEM Order deny,allow </Limit> <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs> AuthType Default Require user @SYSTEM Order deny,allow </Limit> <Limit Cancel-Job CUPS-Authenticate-Job> Require user @OWNER @SYSTEM Order deny,allow </Limit> <Limit All> Order deny,allow </Limit> </Policy> <Policy authenticated> JobPrivateAccess default JobPrivateValues default SubscriptionPrivateAccess default SubscriptionPrivateValues default <Limit Create-Job Print-Job Print-URI Validate-Job> AuthType Default Order deny,allow </Limit> <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document> AuthType Default Require user @OWNER @SYSTEM Order deny,allow </Limit> <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default> AuthType Default Require user @SYSTEM Order deny,allow </Limit> <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs> AuthType Default Require user @SYSTEM Order deny,allow </Limit> <Limit Cancel-Job CUPS-Authenticate-Job> AuthType Default Require user @OWNER @SYSTEM Order deny,allow </Limit> <Limit All> Order deny,allow </Limit> </Policy> <Policy kerberos> JobPrivateAccess default JobPrivateValues default SubscriptionPrivateAccess default SubscriptionPrivateValues default <Limit Create-Job Print-Job Print-URI Validate-Job> AuthType Negotiate Order deny,allow </Limit> <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document> AuthType Negotiate Require user @OWNER @SYSTEM Order deny,allow </Limit> <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default> AuthType Default Require user @SYSTEM Order deny,allow </Limit> <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs> AuthType Default Require user @SYSTEM Order deny,allow </Limit> <Limit Cancel-Job CUPS-Authenticate-Job> AuthType Negotiate Require user @OWNER @SYSTEM Order deny,allow </Limit> <Limit All> Order deny,allow </Limit> </Policy> MaxClients 10000

Tarzan142 avatar Sep 30 '21 13:09 Tarzan142

(Sorry, I don't speak/write Russian, but was able to translate via Google...)

If you can enable debug logging (cupsctl --debug-logging), wait for some of the subscriptions to be created, and then attach a copy of your /var/log/cups/error_log file, we might be able to help you determine the cause.

michaelrsweet avatar Sep 30 '21 14:09 michaelrsweet

Good afternoon, thanks for your responsiveness, sorry for my english :). My log: error_log.zip

Thanks

Tarzan142 avatar Sep 30 '21 17:09 Tarzan142

@Tarzan142 OK, so I don't see any subscriptions getting created. By chance, did you stop the CUPS service before cleaning out the subscriptions.conf file? You need to do that, otherwise CUPS won't see that the subscriptions have been removed.

michaelrsweet avatar Oct 01 '21 15:10 michaelrsweet

I stop the cups (service cups stop), clear the subscription.conf and subscription.conf.O file, start the cups (service cups start), check no subscriptions on RSS (it works quickly), but after the page has been printed(when printing any of 26 printers), all 50 subscriptions of the sets and very much slow down the cups.

Tarzan142 avatar Oct 01 '21 16:10 Tarzan142

Log after cleaning subscription.conf. error_log_clean_sub.zip

Tarzan142 avatar Oct 01 '21 17:10 Tarzan142

In the archive error_log_clean_sub.zip do not like these lines, their value reaches just 50 + D [01/Oct/2021:19:59:14 +0300] [CGI] cgiSetArray: notify_time_interval[1]="0" D [01/Oct/2021:19:59:14 +0300] [CGI] cgiSetArray: notify_subscription_id[1]="2" D [01/Oct/2021:19:59:14 +0300] [CGI] cgiSetVariable: SERVER_NAME="localhost" D [01/Oct/2021:19:59:14 +0300] [CGI] cgiSetVariable: CUPS_VERSION="CUPS v2.2.7" D [01/Oct/2021:19:59:14 +0300] [CGI] cgiSetArray: notify_lease_duration[2]="86400" D [01/Oct/2021:19:59:14 +0300] [CGI] cgiSetArray: notify_time_interval[2]="0" D [01/Oct/2021:19:59:14 +0300] [CGI] cgiSetArray: notify_subscription_id[2]="3" D [01/Oct/2021:19:59:14 +0300] [CGI] cgiSetVariable: SERVER_NAME="localhost" D [01/Oct/2021:19:59:14 +0300] [CGI] cgiSetVariable: CUPS_VERSION="CUPS v2.2.7" D [01/Oct/2021:19:59:14 +0300] [CGI] cgiSetArray: notify_lease_duration[3]="86400" D [01/Oct/2021:19:59:14 +0300] [CGI] cgiSetArray: notify_time_interval[3]="0" D [01/Oct/2021:19:59:14 +0300] [CGI] cgiSetArray: notify_subscription_id[3]="4" D [01/Oct/2021:19:59:14 +0300] [CGI] cgiSetVariable: SERVER_NAME="localhost" D [01/Oct/2021:19:59:14 +0300] [CGI] cgiSetVariable: CUPS_VERSION="CUPS v2.2.7" D [01/Oct/2021:19:59:14 +0300] [CGI] cgiSetArray: notify_lease_duration[4]="86400" D [01/Oct/2021:19:59:14 +0300] [CGI] cgiSetArray: notify_time_interval[4]="0" D [01/Oct/2021:19:59:14 +0300] [CGI] cgiSetArray: notify_subscription_id[4]="5" D [01/Oct/2021:19:59:14 +0300] [CGI] cgiSetVariable: SERVER_NAME="localhost" D [01/Oct/2021:19:59:14 +0300] [CGI] cgiSetVariable: CUPS_VERSION="CUPS v2.2.7" ........................................................................................................................

Tarzan142 avatar Oct 06 '21 06:10 Tarzan142

Hi @Tarzan142 ,

the newest log doesn't show any Create-Subscription either :( . The logs you showed in the previous comment happens always after Get-Subscriptions operation, and it goes from admin CGI script, which asks for subscriptions when showing the main admin page - probably because of RSS, which is removed in the latest CUPS.

It would be great if you tried the following:

  1. stop cups
  2. clean up /etc/cups/subscriptions.conf*
  3. set DirtyCleanInterval 0 in /etc/cups/cupsd.conf (this will cause writing down new subscriptions into subscriptions.conf ASAP - it will narrow the interval of capturing logs)
  4. start catching the logs $ tail -f /var/log/cups/error_log &> current_log.txt
  5. start cups
  6. print a job
  7. go to the Admin page of CUPS Web UI
  8. check whether subscriptions.conf has the new subs - if it does, stop capturing logs by ctrl+c.

After that, please attach current_log.txt as attachment here.

Thank you in advance!

zdohnal avatar Oct 06 '21 08:10 zdohnal