Cups does not work! Error message like: Unknown directive BrowseOrder

NethServer release 7.6.1810 (final)

What happens with cups on Nethserver? I just activate a feature (cups) but does not work on my browser. In my logs a got some errors like that:

E [29/Jul/2019:08:59:48 -0300] Unknown directive BrowseOrder on line 23 of /etc/cups/cupsd.conf.
E [29/Jul/2019:08:59:48 -0300] Unknown directive BrowseAllow on line 24 of /etc/cups/cupsd.conf.
E [29/Jul/2019:08:59:48 -0300] Unknown browse protocol “CUPS” ignored.
E [29/Jul/2019:09:10:45 -0300] Unknown browse protocol “CUPS” ignored.
E [29/Jul/2019:10:04:26 -0300] Unknown directive BrowseOrder on line 22 of /etc/cups/cupsd.conf.
E [29/Jul/2019:10:04:26 -0300] Unknown directive BrowseAllow on line 23 of /etc/cups/cupsd.conf.
E [29/Jul/2019:10:04:26 -0300] Unknown browse protocol “CUPS” ignored.

In my cups.conf all good for me:

LogLevel warn

MaxLogSize 0

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS dnssd

Listen /var/run/cups/cups.sock

Listen 0.0.0.0:631

# Default authentication type, when authentication is required…
DefaultAuthType Basic

# Restrict access to the server…

  • Order deny,allow*
  • Deny From All*
  • Allow From 127.0.0.1*
  • Allow From 192.180.0.0/255.255.255.0*

# Restrict access to the admin pages…
<Location /admin>

  • Order deny,allow*
  • Allow From 127.0.0.1*
  • Allow From 192.180.0.0/255.255.255.0*

# Restrict access to configuration files…
<Location /admin/conf>

  • AuthType Default*
  • Require user @SYSTEM*
  • Order deny,allow*
  • Allow From 127.0.0.1*
  • Allow From 192.180.0.0/255.255.255.0*

emphasized text

I already looked here in the forum for some kind of solutions, but none helped me for now!

When accessing CUPS URL, do you see the admin page? or a Forbidden message?
Are you accessing from green network or from a network listed in trusted networkds?

Not sure, but they might be just a warning, not preventing normal usage.
I think this is a #bug (some of those settings were removed/deprecated since 1.6.2). Old settings are still present on default nethserver templates. They should be compared against cupsd.conf.default file and review cups manual for other changes.

3 Likes

When accessing CUPS URL, do you see the admin page? or a Forbidden message?
Are you accessing from green network or from a network listed in trusted networkds?

1 -Forbidden message
2- I try both, green and trusted networks

Not sure, but they might be just a warning, not preventing normal usage.
I think this is a #bug (some of those settings were removed/deprecated since 1.6.2). Old settings are still present on default nethserver templates. They should be compared against cupsd.conf.default file and review cups manual for other changes.

I will try compare with cupsd.conf.default and i let you know about it!

Thanks for now @dnutan.

1 Like

Do you use a proxy? Maybe it blocks the access to cups.

Which URL do you use for connecting to cups? http/https? ip/name?

Do you mind to take a look @stephdl?

1 Like

I do not use proxy im my pc. The URL is a default cups http://server.local:631

@dnutan

I made some changes in file but even trying with the default file (cups.conf.default) I was unsuccessful. Still unreachable in my browser access.

@thedigu, for what I tested on a vm, it works as expected, the cups page is available at http://Your_IP:631 I can log with the root user to the admin page.

What about your logs in /var/log/cups

/var/log/cups/access_log
/var/log/cups/error_log 
/var/log/cups/page_log 

could you give us the exact forbidden message, screenshot, cp and paste

2 Likes

this a raw of changes we shpuld do inside the configuration, please comment

references to man cupsd.conf and cupsd -t

  • Browsing on (seems deprecated, in man configuration we find)

     Browsing Yes
    
     Browsing No
          Specifies whether or not shared printers should be advertised.
    
  • it seems that now we need to enable if cups looks after the DNS-SD protocol

     BrowseWebIF Yes
    
     BrowseWebIF No
          Specifies whether the CUPS web interface is advertised via DNS-SD.
    
  • BrowseLocalProtocols CUPS dnssd (seems deprecated, in man configuration we find)

     BrowseLocalProtocols [All] [DNSSD]
          Specifies the protocols to use for local printer sharing.
    
  • BrowseOrder and BrowseAllow seems indeed to be not relevant anymore

in short in /etc/cups/cupsd.conf

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS dnssd

should become

  # Show shared printers on the local network.
 Browsing Yes # looks after shared printer
 BrowseWebIF Yes # looks after dnssd shared printer
 BrowseLocalProtocols All

who can test please ?

Thank you for checking it!

once done no more warnings

@thedigu the cups access_log should have the key why you were denied to use the web service, please check

@stephdl

/var/log/cups/access_log > Empty
/var/log/cups/page_log > Empty

/var/log/cups/error_log
E [31/Jul/2019:12:08:57 -0300] Unknown directive BrowseOrder on line 22 of /etc/cups/cupsd.conf.
E [31/Jul/2019:12:08:57 -0300] Unknown directive BrowseAllow on line 23 of /etc/cups/cupsd.conf.
E [31/Jul/2019:12:08:57 -0300] Unknown browse protocol “CUPS” ignored.
W [31/Jul/2019:12:08:57 -0300] No limit for Validate-Job defined in policy default and no suitable template found.
W [31/Jul/2019:12:08:57 -0300] No limit for Cancel-Jobs defined in policy default - using Pause-Printer’s policy.
W [31/Jul/2019:12:08:57 -0300] No limit for Cancel-My-Jobs defined in policy default - using Send-Document’s policy.
W [31/Jul/2019:12:08:57 -0300] No limit for Close-Job defined in policy default - using Send-Document’s policy.
W [31/Jul/2019:12:08:57 -0300] No JobPrivateAccess defined in policy default - using defaults.
W [31/Jul/2019:12:08:57 -0300] No JobPrivateValues defined in policy default - using defaults.
W [31/Jul/2019:12:08:57 -0300] No SubscriptionPrivateAccess defined in policy default - using defaults.
W [31/Jul/2019:12:08:57 -0300] No SubscriptionPrivateValues defined in policy default - using defaults.
W [31/Jul/2019:12:08:57 -0300] No limit for Validate-Job defined in policy authenticated - using Print-Job’s policy.
W [31/Jul/2019:12:08:57 -0300] No limit for Cancel-Jobs defined in policy authenticated - using Pause-Printer’s policy.
W [31/Jul/2019:12:08:57 -0300] No limit for Cancel-My-Jobs defined in policy authenticated - using Send-Document’s policy.
W [31/Jul/2019:12:08:57 -0300] No limit for Close-Job defined in policy authenticated - using Send-Document’s policy.
W [31/Jul/2019:12:08:57 -0300] No JobPrivateAccess defined in policy authenticated - using defaults.
W [31/Jul/2019:12:08:57 -0300] No JobPrivateValues defined in policy authenticated - using defaults.
W [31/Jul/2019:12:08:57 -0300] No SubscriptionPrivateAccess defined in policy authenticated - using defaults.
W [31/Jul/2019:12:08:57 -0300] No SubscriptionPrivateValues defined in policy authenticated - using defaults.

Can you try accessing using the IP address instead of the domain?

I already tested this but I did not succeed…
I looked at the documentation before posting to ask questions :wink:

Duuuuuudddddeeeeeeeee! I’ve tested it before and it didn’t work before, and now it goes well!

But on my other server does not work. The settings are the same, they are only in different networks. I’ll check, and let u know! :man_facepalming:

OK, make sure to check it from a computer that is part of the server’s trusted network. Let us know how it goes.

1 Like

Please a fix is available https://github.com/NethServer/dev/issues/5800#issuecomment-518238398

3 Likes

@thedigu did you check it out?

1 Like