LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   cups cannot connect to server (https://www.linuxquestions.org/questions/linux-newbie-8/cups-cannot-connect-to-server-4175678024/)

Greymug 07-02-2020 01:42 PM

cups cannot connect to server
 
garyh@HPLap:~$ cups-config --version
2.2.7

garyh@HPLap:~$ lpinfo -v
lpinfo: Bad file descriptor

garyh@HPLap:~$ lpstat -t
scheduler is not running
no system default destination
lpstat: Bad file descriptor
lpstat: Bad file descriptor
lpstat: Bad file descriptor
lpstat: Bad file descriptor
lpstat: Bad file descriptor

I was researching and learned the above. My printer-scanner HP 3520 is available via "Simple Scan" from the menu BUT I cannot print anything. I've uninstalled and re-installed HPLIP. Going to the settings-printers only gives option to "connect" and that /run/cups/cups.sock gives me "Cups server error".
Don't know how to proceed now.

ferrari 07-02-2020 02:19 PM

It appears that cupsd is not running. Which distro are you using?

Greymug 07-02-2020 02:25 PM

Linux mint 19.3 Tricia

ferrari 07-02-2020 02:40 PM

Ok, try
Code:

sudo systemctl start cups
and report back if any errors etc

It should be enabled already, but if not this will get it started at boot
Code:

sudo systemctl enable cups

Greymug 07-02-2020 03:04 PM

start cups .......no errors, but no change
enable cups (Re-booted)...no errors, but no change...'failed to connect to server'

Greymug 07-02-2020 03:13 PM

Wen requesting a "Simple scan" User@HPLap recognizes HP Deskjet_3250_series, but when it comes to printing the print side-note is "Print to file" or "Generic Printer" and neither works.

Greymug 07-02-2020 03:33 PM

my address is 127.0.0.53

michaelk 07-02-2020 05:25 PM

How is the printer connected i.e USB or wireless?

Since simple scan recognizes the printer so connectivity is not a problem.

The min version of hplip required by the printer is 3.12.6 and I believe Mint installs 3.19.3 by default so setup should not be a problem.

Does the output of this command show active running?

systemctl status cups

Greymug 07-02-2020 07:22 PM

usb

Greymug 07-02-2020 07:40 PM

/var/log/cups$ systemctl status cups
● cups.service - CUPS Scheduler
Loaded: loaded (/lib/systemd/system/cups.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Thu 2020-07-02 20:13:10 EDT; 26min ago
Docs: man:cupsd(8)
Main PID: 1095 (code=killed, signal=TERM)

Jul 02 20:13:10 HPLap systemd[1]: cups.service: Service hold-off time over, scheduling restart.
Jul 02 20:13:10 HPLap systemd[1]: cups.service: Scheduled restart job, restart counter is at 4.
Jul 02 20:13:10 HPLap systemd[1]: Stopped CUPS Scheduler.
Jul 02 20:13:10 HPLap systemd[1]: Started CUPS Scheduler.
Jul 02 20:13:10 HPLap systemd[1]: cups.service: Service hold-off time over, scheduling restart.
Jul 02 20:13:10 HPLap systemd[1]: cups.service: Scheduled restart job, restart counter is at 5.
Jul 02 20:13:10 HPLap systemd[1]: Stopped CUPS Scheduler.
Jul 02 20:13:10 HPLap systemd[1]: cups.service: Start request repeated too quickly.
Jul 02 20:13:10 HPLap systemd[1]: cups.service: Failed with result 'start-limit-hit'.
Jul 02 20:13:10 HPLap systemd[1]: Failed to start CUPS Scheduler.

Greymug 07-02-2020 07:47 PM

What happened was ... I tried to pipe a cat command to lp0. (unrecognized and suggested "lpr" cups-bsd.
I apt install lpr and see that cups was removed. (mistake)
I apt remove lpr -and- apt install cups-bsd (I then go to my email and begin following your suggestion.

michaelk 07-02-2020 08:11 PM

Make sure /etc/cups/cupsd.conf exists. If there is a /etc/cups/cupsd.conf.default but no cupsd.conf then copy the default and try restarting cups.

lp0 references a legacy hardware parallel port. cups has a usb back end which communicates directly with the printer.

Greymug 07-02-2020 08:31 PM

root@HPLap:/etc/cups# ls -l
total 88
-rw-rwxrwx 1 root lp 108 Jun 21 21:49 classes.conf
-rw-rwxrwx 1 root root 26954 May 9 2019 cups-browsed.conf
-rw-rwxrwx 1 root lp 21 Jun 30 13:51 cupsd.conf
-rw-rwxrwx 1 root lp 4571 Jun 30 13:50 cupsd.conf.O
-rw-rwxrwx 1 root root 2923 Aug 16 2019 cups-files.conf
drwxr-xr-x 2 root root 4096 Aug 16 2019 interfaces
drwxr-xr-x 2 root lp 4096 Jun 21 22:15 ppd
-rw-rwxrwx 1 root lp 552 Jun 21 22:16 printers.conf
-rw-rwxrwx 1 root lp 552 Jun 21 21:49 printers.conf.O
-rw-rwxrwx 1 root root 240 Dec 13 2019 raw.convs
-rw-rwxrwx 1 root root 211 Dec 13 2019 raw.types
-rw-rwxrwx 1 root root 142 Aug 16 2019 snmp.conf
drwx------ 2 root lp 4096 Aug 16 2019 ssl
-rw-rwxrwx 1 root lp 1222 Jun 30 13:51 subscriptions.conf
-rw-rwxrwx 1 root lp 930 Jun 30 13:50 subscriptions.conf.O
root@HPLap:/etc/cups# open /etc/cups/cupsd.conf
root@HPLap:/etc/cups# Listen

Command 'Listen' not found, did you mean:

command 'listen' from deb ruby-listen

Try: apt install <deb name>

root@HPLap:/etc/cups# listen
Traceback (most recent call last):
5: from /usr/bin/listen:4:in `<main>'
4: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
3: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
2: from /usr/lib/ruby/vendor_ruby/listen/cli.rb:1:in `<top (required)>'
1: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- thor (LoadError)
root@HPLap:/etc/cups#

ferrari 07-02-2020 08:53 PM

Code:

root@HPLap:/etc/cups# Listen
This is not a valid command. If you want to check cups.conf use an editor (eg nano) or the ‘cat’ command to view.
Code:

sudo cat /etc/cups/cups.conf

Greymug 07-02-2020 09:36 PM

I do not have cups.conf ... cupsd.conf instead........
-------------------------------
root@HPLap:/etc/cups# sudo cat /etc/cups/cupsd.conf
PreserveJobFiles Yes
-------------------------------


All times are GMT -5. The time now is 01:27 PM.