Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I've set up shared printer but doesn't print Test page. HELP
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Oniryczny
Guru
Guru


Joined: 01 Dec 2011
Posts: 380
Location: Poland

PostPosted: Thu Apr 19, 2018 5:54 am    Post subject: I've set up shared printer but doesn't print Test page. HELP Reply with quote

Hello

I have set up shared printer as described https://wiki.gentoo.org/wiki/Printing
but test page from network computer is not printing (printer works fine from my gentoo machine)
and I just don't know how to fix it

Can I have some help?

My printer is Brother DCP-T300 https://forums.gentoo.org/viewtopic-t-1050200-start-0.html
_________________
cogito ergo sum
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 418
Location: Australia

PostPosted: Thu Apr 19, 2018 7:03 pm    Post subject: Re: I've set up shared printer but doesn't print Test page. Reply with quote

Oniryczny wrote:

I have set up shared printer as described https://wiki.gentoo.org/wiki/Printing
but test page from network computer is not printing (printer works fine from my gentoo machine)
and I just don't know how to fix it

You'll need to supply more information, from your post all that can be determined is that you have a printer connected to your Gentoo machine, (assumed connected by USB cable for the Brother DCP-T300) and that you want to share it with 1 or more clients that aren't running Gentoo. It's not a lot to go on.

What flavour is/are the client/s (linux, osx, win-xx)? Wired or wireless lan?

You say you can't print a test page, can you confirm the printer is showing up to the client as an available network printer, and you can connect successfully, but then fails to print the test page? In that case there should be something useful in the logs ie.
Code:
/var/log/cups/access_log
Code:
/var/log/cups/error_log
If so grep through for errors and paste the output here.

Post the following file from the cups server:
Code:
/etc/cups/cupsd.conf
and the output of
Code:
equery u cups
and
Code:
lpoptions


From the client
Code:
/etc/cups/client.conf
and the output of
Code:
lpstat -a
Back to top
View user's profile Send private message
Oniryczny
Guru
Guru


Joined: 01 Dec 2011
Posts: 380
Location: Poland

PostPosted: Fri Apr 20, 2018 6:33 am    Post subject: Reply with quote

I use wired connected windows desktops and wireless windows laptops
Code:
$ equery u cups
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for net-print/cups-2.1.4:
 U I
 + + X                        : Add support for X11
 + + abi_x86_32               : 32-bit (x86) libraries
 + + acl                      : Add support for Access Control Lists
 + + dbus                     : Enable dbus support for anything that needs it (gpsd, gnomemeeting, etc)
 - - debug                    : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 + + java                     : Add support for the Java interpeter in the web server CGIs.
 - - kerberos                 : Add kerberos support
 - - lprng-compat             : Do not install lp... binaries so cups and lprng can coexist.
 + + pam                      : Add support for PAM (Pluggable Authentication Modules) - DANGEROUS to arbitrarily flip
 - - python                   : Add support for the Python interpeter in the web server CGIs.
 + + python_targets_python2_7 : Build with Python 2.7
 + + ssl                      : Add support for SSL/TLS connections (Secure Socket Layer / Transport Layer Security)
 + + static-libs              : Build static versions of dynamic libraries as well
 - - systemd                  : Enable use of systemd-specific libraries and features like socket activation or session tracking
 + + threads                  : Add threads support for various packages. Usually pthreads
 + + usb                      : Add USB support to applications that have optional USB support (e.g. cups)
 - - xinetd                   : Add support for the xinetd super-server
 + + zeroconf                 : Support for DNS Service Discovery (DNS-SD)
$
Code:

$ lpoptions
copies=1 device-uri=usb://Brother/DCP-T300?serial=BROE5H747598 finishings=3 job-cancel-after=10800 job-hold-until=no-hold job-priority=50 job-sheets=none,none marker-change-time=0 number-up=1 printer-commands=AutoConfigure,Clean,PrintSelfTestPage printer-info='Brother DCP-T300' printer-is-accepting-jobs=true printer-is-shared=true printer-location='Local Printer' printer-make-and-model='Brother DCP-T300 CUPS' printer-state=3 printer-state-change-time=1524169160 printer-state-reasons=none printer-type=8523788 printer-uri-supported=ipp://localhost/printers/Brother_DCP-T300
$
Code:

$ lpstat -a
Brother_DCP-T300 accepting requests since czw, 19 kwi 2018, 22:19:20
Canon-iR-ADV-C3520 accepting requests since sob, 7 kwi 2018, 17:38:04
$
Code:

$ cat /etc/cups/client.conf
ServerName /run/cups/cups.sock
$
Quote:

$ wgetpaste /etc/cups/cupsd.conf
Your paste can be seen here: https://paste.pound-python.org/show/XMtnsGmENf4X49W6ZjkS/
$
Quote:

$ wgetpaste /var/log/cups/error_log
Your paste can be seen here: https://paste.pound-python.org/show/oYM1aWErBgzJITEJt8c5/
$
Quote:

$ wgetpaste /var/log/cups/access_log
Your paste can be seen here: https://paste.pound-python.org/show/z2zeNzPnVMioYgbnTzcG/
$


[Moderator edit: changed [code] tags to [quote] tags to activate implicit URL linking for wgetpaste output. -Hu]
_________________
cogito ergo sum
Back to top
View user's profile Send private message
Oniryczny
Guru
Guru


Joined: 01 Dec 2011
Posts: 380
Location: Poland

PostPosted: Sun Apr 29, 2018 8:14 am    Post subject: Reply with quote

@ian.au
Some advice?
_________________
cogito ergo sum
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 418
Location: Australia

PostPosted: Mon Apr 30, 2018 8:59 pm    Post subject: Reply with quote

Oniryczny wrote:
@ian.au
Some advice?

Hi Oniryczny,
Sorry I am away on a construction site until later this week, I'll try and get a look at this for you when I get back, I really need to be able to review my own machines and settings as cups is not something I have to reconfigure often.

From memory you're serving almost all windows clients, what is handling authentication for the domain / workgroup there? I'd say the problem will likely be there, you could try backing off your security in cupsd.conf before the<Local /Admin> to something like:
Code:
# Allow remote access
Port 631
Listen /run/cups/cups.sock
Browsing On
# BrowseAddress
BrowseLocalProtocols
DefaultAuthType Basic
WebInterface Yes
<Location />
  # Allow remote access...
  Order allow,deny
  Allow all
</Location>

And if you get a connection start tightening up from there. But really I can't help much from here. Someone else may jump in meantime.

FTR I haven't run windows clients on my network for a decade, so I won't be much use with the client end of this problem. But usually it isn't too hard to get printers to print.
Back to top
View user's profile Send private message
Oniryczny
Guru
Guru


Joined: 01 Dec 2011
Posts: 380
Location: Poland

PostPosted: Tue May 01, 2018 6:02 pm    Post subject: Reply with quote

I added those lines (delete any?) and restarted cupsd but nothing new just Test page exist in Windows Print queue (previously it was gone from it)

I have succesfully printed Test Pagr from debian :)

And I changed err_log to debug so now it looks: https://paste.pound-python.org/show/NjNTL1wrCyxU53hHlprX/
_________________
cogito ergo sum
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 418
Location: Australia

PostPosted: Tue May 01, 2018 10:07 pm    Post subject: Reply with quote

Oniryczny wrote:
I added those lines (delete any?) and restarted cupsd but nothing new just Test page exist in Windows Print queue (previously it was gone from it)

I have succesfully printed Test Pagr from debian :)

And I changed err_log to debug so now it looks: https://paste.pound-python.org/show/NjNTL1wrCyxU53hHlprX/


Sorry if I was unclear, I meant for you to edit / comment replace this section in your cupsd.conf:

Code:
#
# 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
PageLogFormat

# Only listen for connections from the local machine.
#Listen localhost:631
Listen *:631
Listen /run/cups/cups.sock

# Show shared printers on the local network.
Browsing On
BrowseLocalProtocols dnssd

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

# Web interface setting...
WebInterface Yes

# Restrict access to the server...
<Location />
  Order allow,deny
  Allow localhost
  Allow from 192.168.1.*
</Location>


with the following
Code:
# Allow remote access
Port 631
Listen /run/cups/cups.sock
Browsing On
# BrowseAddress
BrowseLocalProtocols
DefaultAuthType Basic
WebInterface Yes
<Location />
  # Allow remote access...
  Order allow,deny
  Allow all
</Location>


I looked at your updated logs, tidying up cupsd.conf should take care of the following E lines

Quote:
E [01/May/2018:19:56:56 +0200] Missing value for <Location> on line 22 of /etc/cups/cupsd.conf.
E [01/May/2018:19:56:56 +0200] Unknown directive Order on line 24 of /etc/cups/cupsd.conf.
E [01/May/2018:19:56:56 +0200] Unknown directive Allow on line 25 of /etc/cups/cupsd.conf.
E [01/May/2018:19:56:56 +0200] Missing value for </Location> on line 26 of /etc/cups/cupsd.conf.
E [01/May/2018:19:56:56 +0200] Unknown directive BrowseAddress on line 156 of /etc/cups/cupsd.conf.

I [01/May/2018:19:56:56 +0200] Remote access is enabled.
D [01/May/2018:19:56:56 +0200] Added auto ServerAlias M5A99X
D [01/May/2018:19:56:56 +0200] Added auto ServerAlias M5A99X.lan
I [01/May/2018:19:56:56 +0200] Loaded configuration file "/etc/cups/cupsd.conf"
D [01/May/2018:19:56:56 +0200] Using keychain "/etc/cups/ssl" for server name "M5A99X.lan".
D [01/May/2018:19:56:56 +0200] Repairing access permissions of "/var/cache/cups"
I [01/May/2018:19:56:56 +0200] Using default TempDir of /var/spool/cups/tmp...
I [01/May/2018:19:56:56 +0200] Configured for up to 100 clients.


Make the changes and restart the cups server (perhaps manually roll those logs too, they date back to 2015 and it's a bit tedious scrolling through them) then retry your print job.

Run one job from the debian client that is successful and one from a windows client that isn't, post the log and we'll go from there. I think you're missing a step serving printer to windows (from memory when I was doing that I had a Samba PDC on my printserver, and that took care of distributing the drivers for windows clients, but it's been so long since I ran this configuration I really would need to go back and reeducate myself on the various methods available now.
Back to top
View user's profile Send private message
Oniryczny
Guru
Guru


Joined: 01 Dec 2011
Posts: 380
Location: Poland

PostPosted: Tue May 22, 2018 5:48 pm    Post subject: Reply with quote

finally I'm home :)

now it's not printing even from debian but prints from gentoo (serwer) :cry:
https://paste.pound-python.org/show/ZDlnClqnjY76I4LMQZ6V/
_________________
cogito ergo sum
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum