You are not logged in.

#1 2013-05-13 14:12:03

hotvic
Member
Registered: 2013-02-11
Posts: 109

CUPS extremely slow over network

I've a small lan network (only two computers) and I'm trying to setup cups over my lan network, but it's alway too slow, so much that is impossible to use.

PC2 is connected to PC1 via wireless.

PC1 (Server):
IP: 192.168.0.1/24
- Cups:
[x] Share printers connected to this system
[x] Allow printing from the Internet
[x] Allow remote administration

PC2 (Client):
IP: 192.168.0.2/24
Gateway: 192.168.0.1

Problem isn't wireless! I already tried using crossover cable and same result, very very slow. (Only cups is slow, all other applications/servers is normal)

I've noted also that if try loading cups web interface on PC1 with 192.168.0.1:631 is slow also, but with: 127.0.0.1:631 isn't slow.

PC1 full cupsd.conf:

LogLevel warn
# Allow remote access
Port 631
Listen /var/run/cups/cups.sock
# Share local printers on the local network.
Browsing On
BrowseLocalProtocols dnssd
DefaultAuthType Basic
WebInterface Yes
<Location />
  # Allow shared printing and remote administration...
  Order allow,deny
  Allow all
</Location>
<Location /admin>
  # Allow remote administration...
  Order allow,deny
  Allow all
</Location>
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  # Allow remote access to the configuration files...
  Order allow,deny
  Allow all
</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>

Offline

#2 2013-05-14 17:10:53

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,499

Re: CUPS extremely slow over network

Hi, the info you give is not that much to start of, but lets try!
As you say you tested the network, which isn't the problem, except for cups.
So leaves me to giving you a slightly different cupsd.conf, you could try, works here!


   LogLevel warn
# Allow remote access
Listen 631
# You don't really need the next setting, but messages are sent there!
#ServerAdmin $user@localhost
DefaultEncryption Never
BrowseAllow all
Listen /var/run/cups/cups.sock
# Share local printers on the local network.
Browsing On
BrowseLocalProtocols dnssd
DefaultAuthType Basic
#WebInterface Yes
<Location />
  # Allow shared printing and remote administration...
  Order allow,deny
  Allow all
</Location>
<Location /admin>
  # Allow remote administration...
  Order allow,deny
  Allow all
</Location>
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  # Allow remote access to the configuration files...
  Order allow,deny
  Allow all
</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
    Allow All
  </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>

edit: you know it's most comfortable to admin cups with a user who is already a 'UNIX' user!

Last edited by qinohe (2013-05-14 17:16:02)

Offline

#3 2013-05-16 12:46:09

hotvic
Member
Registered: 2013-02-11
Posts: 109

Re: CUPS extremely slow over network

I'm sick, when I'm healed I'll try this.

Offline

#4 2013-05-16 22:25:08

hotvic
Member
Registered: 2013-02-11
Posts: 109

Re: CUPS extremely slow over network

Ok,

I tested your cups.conf and same results, slow...

The more strange is that by 127.0.0.1 cupsd work perfect, but by 192.168.0.1 in the same machine (server) it's slow :S

Offline

#5 2013-05-19 08:41:50

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,499

Re: CUPS extremely slow over network

Do you have any kind of firewall/restriction on your network?
What you could still try is put 'Allow All"  after every 'Order allow,deny' and try if it works.
You only need the ones that are in it now, just to try!!
Are the users the same, the cups admin & the user on the PC which is trying to print?

Offline

#6 2013-05-19 14:02:30

hotvic
Member
Registered: 2013-02-11
Posts: 109

Re: CUPS extremely slow over network

I'm not trying to print, trying only to access web interface! this so much slow that is impossible 'Client' connect.

Web interface page delay 30 or more seconds for load complete (sometimes failed with timeout)

No, in firewall only have one NAT rule:

# iptables -t nat -L -n
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination         
MASQUERADE  all  --  0.0.0.0/0            0.0.0.0/0

Offline

#7 2013-05-19 16:55:42

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,499

Re: CUPS extremely slow over network

So,  had time to look at my own cupsd.conf, which is a little different still so I paste it!
It's a my debian print-server running in OpenVz container, but that doesn't matter!,
Please try as this is a real working one,;

#
# "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $"
#
# Sample configuration file for the CUPS scheduler.  See "man cupsd.conf" for a
# complete description of this file.
#

# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel warn

# Deactivate CUPS' internal logrotating, as we provide a better one, especially
# LogLevel debug2 gets usable now
MaxLogSize 0

ServerAdmin qinohe@localhost

# Only listen for connections from the local machine.
Listen 631
#SSLListen 192.168.1.151:443
#Listen localhost:631
Listen /var/run/cups/cups.sock

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

# Default authentication type, when authentication is required...
DefaultAuthType Basic
DefaultEncryption Never

# Restrict access to the server...
<Location />
  Order allow,deny
  Allow All
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
  Allow All
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
  Allow All
</Location>

# Set the default printer/job policies...
<Policy default>
  # Job-related operations must be done by the owner or an administrator...
  <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 CUPS-Move-Job CUPS-Get-Document>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  # All administration operations require an administrator to authenticate...
  <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
    Allow All
  </Limit>

  # All printer operations require a printer operator to authenticate...
  <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 CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

# Set the authenticated printer/job policies...
<Policy authenticated>
  # Job-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI>
    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 CUPS-Move-Job CUPS-Get-Document>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  # All administration operations require an administrator to authenticate...
  <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>

  # All printer operations require a printer operator to authenticate...
  <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 CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

#
# End of "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $".
#

edit: I don't know about that rule, I'm not an iptables specialist, so someone else should explain that!

Last edited by qinohe (2013-05-19 17:07:36)

Offline

#8 2013-05-19 18:06:01

hotvic
Member
Registered: 2013-02-11
Posts: 109

Re: CUPS extremely slow over network

tested and no good results again sad

the rule on iptables is for share my connection with pc2, like is described here

Offline

#9 2013-05-19 18:28:38

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,499

Re: CUPS extremely slow over network

Clear, should work than I guess!
Could you share output of 'sysctl -p' from print-server!

Offline

#10 2013-05-19 18:54:19

hotvic
Member
Registered: 2013-02-11
Posts: 109

Re: CUPS extremely slow over network

here's:

# sysctl -p
net.ipv4.tcp_syncookies = 1
net.ipv4.ip_forward = 1
kernel.sysrq = 0

Offline

#11 2013-05-20 14:25:22

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,499

Re: CUPS extremely slow over network

Looks ok, forwarding is on!
Now I get the feeling there might be something wrong with routing/addressing of the network.
Have you tried to access the web page from another client?
What does your routing table look like?, IP part!

Last edited by qinohe (2013-05-20 14:25:49)

Offline

#12 2013-05-20 15:08:09

hotvic
Member
Registered: 2013-02-11
Posts: 109

Re: CUPS extremely slow over network

I only have two computers(Server, and Client), then... No, only tried from myself and from client

% ip route show
default via 10.90.10.254 dev enp0s4 
10.90.10.0/24 dev enp0s4  proto kernel  scope link  src 10.90.10.1 
192.168.0.0/24 dev wlp0s3f3u3  proto kernel  scope link  src 192.168.0.1

and netstat:

% netstat -r
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
default         10.90.10.254    0.0.0.0         UG        0 0          0 enp0s4
10.90.10.0      *               255.255.255.0   U         0 0          0 enp0s4
192.168.0.0     *               255.255.255.0   U         0 0          0 wlp0s3f3u3

Offline

#13 2013-05-20 15:35:51

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,499

Re: CUPS extremely slow over network

Do you use some virtualization?
Why don't you address them all in the same space?
I mean 168.0.1-254? or 10.90.10.1-254?

Offline

#14 2013-05-20 15:56:50

hotvic
Member
Registered: 2013-02-11
Posts: 109

Re: CUPS extremely slow over network

No, I don't use any virtualization

I'm not a expert in network... big_smile

I'm connected to internet by interface enp0s4, and it's own ip must be 10.90.10.1, then you mean put something like 10.90.10.2 in interface wlp0s3f3u3 and in 'client' other ip in this range ?

Offline

#15 2013-05-20 16:11:29

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,499

Re: CUPS extremely slow over network

Yes that is a good idea;)
In my home network I use just one 'space'.

  • 192.168.1.1 -router

  • 192.168.1.2 to 192.168.1.10 - static clients

  • 192.168.1.11 to 192.168.1.99 - dhcp clients

  • 192.168.1.100 - OpenVz server

  • 192.168.1.151 to 192.168.1.254 - static addresses for OpenVz containers.

Something like that!

Offline

#16 2013-05-20 16:58:09

hotvic
Member
Registered: 2013-02-11
Posts: 109

Re: CUPS extremely slow over network

Not working, I put 10.90.10.100/24 on interface wlp0s3f3u3 and 10.90.10.101/24 on 'Client', what I'm doing incorrect ?

edit:Not working mean, 'Client' cannot ping 10.90.10.100 ...

Last edited by hotvic (2013-05-20 16:59:37)

Offline

#17 2013-05-20 17:28:37

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,499

Re: CUPS extremely slow over network

Haha, now I (we)don't have a glass ball to see what you're doing wrong...
But if you give the address than use 10.90.10.100 without the '/24'
Also if you're using static addresses you should give the gateway, dns!
Probably you should try to understand 'networking' a little better, and read in!, I,m not a pro on this too,
but networking takes only a well configured way, or behaves badly, like your cups server shows you!

Really I won't handhold you through this one!
That's something you need to figure on you're own!

Offline

#18 2013-05-20 18:04:50

hotvic
Member
Registered: 2013-02-11
Posts: 109

Re: CUPS extremely slow over network

ok, if I try use 10.90.10.100 its automatically add /32 then 'Client' cannot put /32 its fails...

yes, the configuration is static, 'Client':
ip: 10.90.10.101/24
gateway: 10.90.10.100
dns: 8.8.8.8 and 8.8.4.4

and server I only add the ip:

# ip addr add 10.90.10.100/24 dev wlp0s3f3u3

Last edited by hotvic (2013-05-20 18:07:23)

Offline

#19 2013-05-20 18:21:54

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,499

Re: CUPS extremely slow over network

No, look in your own netstat output for the right gateway!
Probably your router!

Offline

#20 2013-05-20 18:28:35

hotvic
Member
Registered: 2013-02-11
Posts: 109

Re: CUPS extremely slow over network

I'm not using router! my computer is the router big_smile

Before:
My pc:
ip: 192.168.0.1/24

'Client':
ip: 192.168.0.2/24
gateway: 192.168.0.1

Offline

#21 2013-05-20 18:37:37

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,499

Re: CUPS extremely slow over network

Yes, but if that is so the gateway would be 192.168.0.1 but your netstat shows 10.90.10.254
So that could be right!
Or am I missing something

Offline

#22 2013-05-20 18:55:35

hotvic
Member
Registered: 2013-02-11
Posts: 109

Re: CUPS extremely slow over network

the netstat output is of server, which is connected to internet with ip 10.90.10.1 gateway 10.90.10.254 (enp0s4)

'Client' is connected to server by wireless(hostapd), interface wlp0s3f3u3 in server

Offline

#23 2013-05-20 19:16:44

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,499

Re: CUPS extremely slow over network

Yes, I understand I misread the gateway part a few times now, got it!
Than go on using the 10.90.10.* space, using gateway 10.90.10.254 for the rest of the network you build.
Wireless is going to use that space too.

Offline

#24 2013-05-20 21:55:26

hotvic
Member
Registered: 2013-02-11
Posts: 109

Re: CUPS extremely slow over network

tested and no work

I put:
server:
10.90.10.100/24 on wlp0s3f3u3

client:
ip: 10.90.10.101/24
gateway: 10.90.10.254
DNS is G. Public DNS, but this is irrelevant.

Offline

#25 2013-05-21 17:56:32

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,499

Re: CUPS extremely slow over network

I think someone with a little more knowledge about this specific setup with hostapd !, or has a setup similar to this one would be appreciated!
I may be overlooking something , but than again @hotvic, I'm sure it will work if you configure it as it should;)

Offline

Board footer

Powered by FluxBB