# I've set up shared printer but doesn't print Test page. HELP

## Oniryczny

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

----------

## ian.au

 *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)
> ...

 

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. 

```
/var/log/cups/access_log
```

```
/var/log/cups/error_log
```

 If so grep through for errors and paste the output here.

Post the following file from the cups server: 

```
/etc/cups/cupsd.conf
```

 and the output of 

```
equery u cups
```

and 

```
lpoptions
```

From the client 

```
/etc/cups/client.conf
```

 and the output of 

```
lpstat -a
```

----------

## Oniryczny

I use wired connected windows desktops and wireless windows laptops 

```
$ 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)

$
```

```

$ 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

$
```

```

$ 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

$
```

```

$ 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]

----------

## Oniryczny

@ian.au

Some advice?

----------

## ian.au

 *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:

```
# 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.

----------

## Oniryczny

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  :Smile: 

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

----------

## ian.au

 *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:

```
#

# 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

```
# 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.
> ...

 

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.

----------

## Oniryczny

finally I'm home   :Smile: 

now it's not printing even from debian but prints from gentoo (serwer)   :Crying or Very sad: 

https://paste.pound-python.org/show/ZDlnClqnjY76I4LMQZ6V/

----------

