Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Tarzan142 opened this issue Sep 30, 2021 · 7 comments
Open

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

Tarzan142 opened this issue Sep 30, 2021 · 7 comments

Comments

@Tarzan142
Copy link

Tarzan142 commented Sep 30, 2021

Добрый день, имеется 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

И так далее: 50 шт.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Мой конфиг:
LogLevel warn
PageLogFormat
MaxLogSize 1m
Listen localhost:631
Listen /run/cups/cups.sock
Browsing Off
BrowseLocalProtocols dnssd
DefaultAuthType Basic
WebInterface Yes

Order allow,deny

<Location /admin>
Order allow,deny

<Location /admin/conf>
AuthType Default
Require user @System
Order allow,deny

<Location /admin/log>
AuthType Default
Require user @System
Order allow,deny


JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default

Order deny,allow


Require user @owner @System
Order deny,allow


AuthType Default
Require user @System
Order deny,allow


AuthType Default
Require user @System
Order deny,allow


Require user @owner @System
Order deny,allow


Order deny,allow



JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default

AuthType Default
Order deny,allow


AuthType Default
Require user @owner @System
Order deny,allow


AuthType Default
Require user @System
Order deny,allow


AuthType Default
Require user @System
Order deny,allow


AuthType Default
Require user @owner @System
Order deny,allow


Order deny,allow



JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default

AuthType Negotiate
Order deny,allow


AuthType Negotiate
Require user @owner @System
Order deny,allow


AuthType Default
Require user @System
Order deny,allow


AuthType Default
Require user @System
Order deny,allow


AuthType Negotiate
Require user @owner @System
Order deny,allow


Order deny,allow


MaxClients 10000

@michaelrsweet
Copy link
Collaborator

(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.

@Tarzan142
Copy link
Author

Tarzan142 commented Sep 30, 2021

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

Thanks

@michaelrsweet
Copy link
Collaborator

@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.

@Tarzan142
Copy link
Author

Tarzan142 commented Oct 1, 2021

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
Copy link
Author

Log after cleaning subscription.conf.
error_log_clean_sub.zip

@Tarzan142
Copy link
Author

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"
........................................................................................................................

@zdohnal
Copy link
Contributor

zdohnal commented Oct 6, 2021

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants