You are not logged in.

#1 2021-02-05 13:29:39

gox
Member
Registered: 2021-02-05
Posts: 5

[SOLVED] Print at office from a CUPS in a VPS

Hello everyone! This is my first topic in this forum that from which Ive learnt much but this time I couldnt find any similar topic

I want to print at a local office, where the physical printer is, files that are generated in a Ubuntu VPS. At this office I have running one ubuntu server where a CUPS server is also running and now I am migrating the services in the local server at the office to an Ubuntu VPS.

I can print at the local office printer through the local CUPS server as far as they are in the same network but I cant replicate that but printing from the VPS.

I cant even manage to print the test document from CUPS website interface but it seems that the print order goes through as the VPS CUPS job is done and also the office CUPS receives it and the job seems to be done too but the printer is not printing at the end. No error is showed

- The CUPS at the office has the Brother printer identified and prints well locally, lets say that this printer has address http://myofficedomain.net/printer/Brother
- In the VPS CUPS I added the printer through web interface pointing the created printer to the mentioned address above

In both CUPS I am using same Brother driver that I downloaded from Brother website

I tried to find topics or websites talking about this: printing in a CUPS that points to another CUPS printer in a different network, but I didnt find anything


Thanks for reading

Last edited by gox (2021-02-20 08:37:40)

Offline

#2 2021-02-07 08:54:33

paulkerry
Member
From: Sheffield, UK
Registered: 2014-10-02
Posts: 611

Re: [SOLVED] Print at office from a CUPS in a VPS

Ubuntu is not supported on this forum, but maybe you are saying you are using an Arch system to send to it?

It look like you are filtering twice -
https://wiki.archlinux.org/index.php/CUPS
"Warning: Avoid configuring both the server and the client with a printer filter - either the print queue on the client or the server should be 'raw'. This avoids sending a print job through the filters for a printer twice, which can cause problems such as shared printer works locally but remote machine fails to print("

Last edited by paulkerry (2021-02-07 08:55:16)

Offline

#3 2021-02-07 09:37:33

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,366

Re: [SOLVED] Print at office from a CUPS in a VPS

How are you connecting to the remote machine?


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus B550-F Gaming MB, 128Gb Corsair DDR4, Fractal Design Define 7 XL, 5 HD (2 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

/ is the root of all problems.

Offline

#4 2021-02-08 17:49:17

gox
Member
Registered: 2021-02-05
Posts: 5

Re: [SOLVED] Print at office from a CUPS in a VPS

paulkerry wrote:

Ubuntu is not supported on this forum, but maybe you are saying you are using an Arch system to send to it?

It look like you are filtering twice -
https://wiki.archlinux.org/index.php/CUPS
"Warning: Avoid configuring both the server and the client with a printer filter - either the print queue on the client or the server should be 'raw'. This avoids sending a print job through the filters for a printer twice, which can cause problems such as shared printer works locally but remote machine fails to print("

I know this is not for Ubuntu fans, but this VPS machine it has to be Ubuntu server... I like trying different distros smile

I cant set the client CUPS printer as raw, as other local users would print with it. What I did was changing the server CUPS as raw but still got the same error, the printer or class doesnt exist

Offline

#5 2021-02-08 17:50:10

gox
Member
Registered: 2021-02-05
Posts: 5

Re: [SOLVED] Print at office from a CUPS in a VPS

Roken wrote:

How are you connecting to the remote machine?

Through SSH. How should I connect other wise?

Offline

#6 2021-02-08 19:01:51

paulkerry
Member
From: Sheffield, UK
Registered: 2014-10-02
Posts: 611

Re: [SOLVED] Print at office from a CUPS in a VPS

I'm confused by what you are saying: in your first post, you said "No error is showed" and in your next post said "the same error, the printer or class doesnt exist", so which is it?

Have you looked at...
https://wiki.archlinux.org/index.php/CU … leshooting
and enabled cupsd debug logging as described in detail at...
https://wiki.archlinux.org/index.php/CU … #Debug_log
and what does the error_log tell you when you do so?

Offline

#7 2021-02-09 09:47:20

gox
Member
Registered: 2021-02-05
Posts: 5

Re: [SOLVED] Print at office from a CUPS in a VPS

Thanks paulkerry for your answer

I am sorry, you are right. While writting the first post I didnt complete it. What I meant there was no error, it was while printing the test page. The error was showed while trying to print from another service located in the VPS server, it said that there was no printer

The good news are that after setting the value of the server printer to RAW, the test page goes through and prints in the client CUPS printer. That problem is solved, it was from the filters as you suggested

Printing from the webservice that is running in the VPS gives me an error saying the the printer or class doesnt exist. The cups log doesnt show anything, not even receiving the work, so I guess that this is not really a CUPS error but the service I have running

I am glad I asked about this error I had. Thanks for helping because it was driving me nuts why I couldnt even print the test page

Offline

#8 2021-02-15 19:15:10

paulkerry
Member
From: Sheffield, UK
Registered: 2014-10-02
Posts: 611

Re: [SOLVED] Print at office from a CUPS in a VPS

Glad you are sorted: that all makes sense!

As the cups log isn't showing anything, the job isn't getting there, so check firewalls and the /etc/cups/cupsd.conf section that allows outside connections...

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

you might have to add a line there for your network, for example...
Allow from n.n.n.n/22
and then restart cupsd.

Please remember to prepend "[SOLVED]" to your first post.

Offline

#9 2021-02-20 08:37:24

gox
Member
Registered: 2021-02-05
Posts: 5

Re: [SOLVED] Print at office from a CUPS in a VPS

But it shouldnt be related to firewalls or ufw restriction as the test cups page works well

Thanks

Offline

Board footer

Powered by FluxBB