Printer connection doesn't survive reboot

I’ve read many threads on this problem and, so far, none have worked to resolve this problem. I have a wireless HP printer with a DHCP assigned ip. I’m running 13.1 and KDE with current updates installed.

After a reboot, I attempt to print and get a communication error. This morning I tried

systemctl restart cups.service

When that didn’t work, I tried

systemctl restart cups

but that didn’t work either. I tried to open the cups web page but got a permissions error, so I opened it as root. My user has always been in the lp group, but yesterday I tried

lppasswd -a

and added my user. That obviously didn’t give me access to the cups page. When I get to cups, nothing I try gets the printer communicating. I end up re-installing it through yast and it begins to work.

My computer has a wired connection to my wireless router. I looked at the firewall. There are 2 interfaces displayed. The first is eth0 and that was in the External Zone. The other is the actual card and that has a device name and also an interface designation of enp2s8. That had no zone assigned and I put it into the Internal Zone for no other reason than to see if it worked to get communication established. It did not.

A separate problem: I can’t get boinc to connect to the localhost, even after today’s update. When boinc was running, I left my computer on 24/7 for months at a time. Now that boinc isn’t working, I shut the thing off every night and am faced with the communication error when I reboot in the morning. It’s only a few clicks to reinstall the printer but doing it everyday is very annoying. Please help me sort this out.

Since the printer has a dynamically assigned IP address, I assume you have CUPS configured to use the printer’s hostname? Anyway, I suggest you provide your working /etc/cups/printers.conf here. (BTW, it is more usual to configure printers to use static IP addresses, so that printers configured by IP address can be reached consistently. However, if you’re using a printer name, then this should present a problem.)

This will summarize the URI configuration too

lpstat -v

After a reboot, I attempt to print and get a communication error. This morning I tried

systemctl restart cups.service

When that didn’t work, I tried

systemctl restart cups

but that didn’t work either.

Well, depending on the issue, simply restarting the CUPS server will not fix the problem.

I tried to open the cups web page but got a permissions error, so I opened it as root. My user has always been in the lp group, but yesterday I tried

lppasswd -a

and added my user. That obviously didn’t give me access to the cups page. When I get to cups, nothing I try gets the printer communicating. I end up re-installing it through yast and it begins to work.

For administrative purposes, CUPS requires root privileges by default. (This is all defined in cupsd.conf)

Add your user to the lp (you already did) and the sys group. Re-login and use either


kdesu hp-setup

or the Printer module in KDE’s system settings.

After configuring the user will be able to start and stop the printer etc.

Yes, good advice to use hp-setup for HP printers. It will correctly set up the print queue etc

On Fri 28 Feb 2014 04:36:01 PM CST, Prexy wrote:

I’ve read many threads on this problem and, so far, none have worked to
resolve this problem. I have a wireless HP printer with a DHCP assigned
ip. I’m running 13.1 and KDE with current updates installed.

After a reboot, I attempt to print and get a communication error. This
morning I tried
Code:

systemctl restart cups.service

When that didn’t work, I tried
Code:

systemctl restart cups

but that didn’t work either. I tried to open the cups web page but got
a permissions error, so I opened it as root. My user has always been in
the lp group, but yesterday I tried
Code:

lppasswd -a

and added my user. That obviously didn’t give me access to the cups
page. When I get to cups, nothing I try gets the printer communicating.
I end up re-installing it through yast and it begins to work.

My computer has a wired connection to my wireless router. I looked at
the firewall. There are 2 interfaces displayed. The first is eth0 and
that was in the External Zone. The other is the actual card and that has
a device name and also an interface designation of enp2s8. That had no
zone assigned and I put it into the Internal Zone for no other reason
than to see if it worked to get communication established. It did not.

A separate problem: I can’t get boinc to connect to the localhost, even
after today’s update. When boinc was running, I left my computer on 24/7
for months at a time. Now that boinc isn’t working, I shut the thing off
every night and am faced with the communication error when I reboot in
the morning. It’s only a few clicks to reinstall the printer but doing
it everyday is very annoying. Please help me sort this out.

Hi
What model HP printer?

I now have a HP LaserJet Pro P1102w (works fine) but you need to setup a
static ip address after connecting to the printer via the printers web
interface, or does it have it’s own configuration panel?

Once that’s done, configure via hp-setup as root user.


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.2 Kernel 3.11.10-7-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

On Fri 28 Feb 2014 11:55:32 PM CST, malcolmlewis wrote:

[QUOTE]
On Fri 28 Feb 2014 04:36:01 PM CST, Prexy wrote:

I’ve read many threads on this problem and, so far, none have worked to
resolve this problem. I have a wireless HP printer with a DHCP assigned
ip. I’m running 13.1 and KDE with current updates installed.

After a reboot, I attempt to print and get a communication error. This
morning I tried
Code:

systemctl restart cups.service

When that didn’t work, I tried
Code:

systemctl restart cups

but that didn’t work either. I tried to open the cups web page but got
a permissions error, so I opened it as root. My user has always been in
the lp group, but yesterday I tried
Code:

lppasswd -a

and added my user. That obviously didn’t give me access to the cups
page. When I get to cups, nothing I try gets the printer communicating.
I end up re-installing it through yast and it begins to work.

My computer has a wired connection to my wireless router. I looked at
the firewall. There are 2 interfaces displayed. The first is eth0 and
that was in the External Zone. The other is the actual card and that has
a device name and also an interface designation of enp2s8. That had no
zone assigned and I put it into the Internal Zone for no other reason
than to see if it worked to get communication established. It did not.

A separate problem: I can’t get boinc to connect to the localhost, even
after today’s update. When boinc was running, I left my computer on 24/7
for months at a time. Now that boinc isn’t working, I shut the thing off
every night and am faced with the communication error when I reboot in
the morning. It’s only a few clicks to reinstall the printer but doing
it everyday is very annoying. Please help me sort this out.

Hi
What model HP printer?

I now have a HP LaserJet Pro P1102w (works fine) but you need to setup a
static ip address after connecting to the printer via the printers web
interface, or does it have it’s own configuration panel?

Once that’s done, configure via hp-setup as root user.

[/QUOTE]
Hi
Another thought, on my router I can define static ip’s based on MAC
address as well, although I don’t do that, just have a small pool for
dhcp and set static ip’s via hosts file and NetworkManager.


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.2 Kernel 3.11.10-7-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

@deano_ferrari The printer is connected now. So, I don’t know if lpstat -v will tell you anything. But, here it is

lpstat -v
device for Officejet_6700: hp:/net/Officejet_6700?ip=192.168.1.130
device for Officejet_6700_fax: hpfax:/net/Officejet_6700?ip=192.168.1.130

Although I do not have it set up by a static ip, it always comes up with that .130 even though the next highest ip is 192.168.1.6 If I read you correctly, you think I should switch to static? In the router page? yast? hp-setup?
Here is /etc/cups/printers.conf

# Printer configuration file for CUPS v1.5.4# Written by cupsd on 2014-03-01 00:00
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
<Printer Officejet_6700>
UUID urn:uuid:10122186-6f8d-33ac-5def-217c049b9f99
Info Officejet_6700
MakeModel HP Officejet 6700 hpijs, 3.13.10
DeviceURI hp:/net/Officejet_6700?ip=192.168.1.130
State Idle
StateTime 1393603114
Type 8425500
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
<Printer Officejet_6700_2>
UUID urn:uuid:1114f0c5-28d4-3e9e-5643-1283b4136786
Info 
Location 
MakeModel HP Officejet 6700 hpijs, 3.13.10
DeviceURI hp:/net/Officejet_6700?ip=192.168.1.130
State Idle
StateTime 1393649994
Type 8425500
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
<Printer Officejet_6700_fax>
UUID urn:uuid:e65de39e-abaf-3b0a-4aa5-7117f15f64cd
Info Officejet_6700_fax
MakeModel HP Fax4 hpcups
DeviceURI hpfax:/net/Officejet_6700?ip=192.168.1.130
State Idle
StateTime 1393340107
Type 4108
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
<Printer Officejet_6700_fax_2>
UUID urn:uuid:15a61314-d010-33cd-6760-696c381aadf1
Info 
Location 
MakeModel HP Fax4 hpcups
DeviceURI hpfax:/net/Officejet_6700?ip=192.168.1.130
State Idle
StateTime 1393649994
Type 4108
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>


@Knurpht I ran hp-setup and got the familiar install program. As usual, it cannot find a printer and I back up a screen to the “manual discovery” option where I enter the ip (shown above) and it finds the printer with correct driver from HP. And, I added myself to the sys group.

@malcolm_lewis I have an HP Officejet 6700 and it works well once it is connected.

It is after midnight here. I am going to shut down and reboot in the morning. I tried to change to static via the printer web page and HP Device Manager but there was no way to do so.

Also, what should I do about the firewall?

Thank you all for your help.

Yes, that tells us the printer URIs (connected or not). From that, we can see you have the printers defined via IP address.

Although I do not have it set up by a static ip, it always comes up with that .130 even though the next highest ip is 192.168.1.6 If I read you correctly, you think I should switch to static? In the router page? yast? hp-setup?

Configuring a static IP address lies with the device itself. As Malcolm suggested, many newer printers have an Embedded Web Server (EWS). You just enter the IP address into a browser, and it should come up.

I couldn’t connect to the printer’s web page because of the communication error! But, the printer has a touch screen and I set it to static ip from there. A reboot lost communications again.

It seems to me this is a cups problem. When I sent a doc to print, the HP software tells me a print job has been sent and shortly thereafter it tells me the job is complete. But there is no printing going on. I open the HP device manager and check the status of the printer to see the printer is stopped with a pending job. When I click on the button to start the printer, I get an error box that says I don’t have permission to contact the cups server. Filling in my user and password, I get an error message that I don’t have sufficient privileges. Filling in root allows me to click the start printer button and the job is released and the printer works.

My user is in both lp and sys. Going to the cups server page, I see how to add a printer but not a user. As stated earlier, I tried lppasswd -a to get sufficient privileges. Is that the wrong syntax? What should I have done?

Hi
I never had to add myself to any additional user groups etc for the printer here to work? Just ran hp-setup (setup via wireless) and then logged into cups as the root user. Now some wireless printers need to be setup via usb first… If you can see the device on the network, running an nmap scan should show ports open to see what services it will use.

What’s nmap? My terminal doesn’t know it.

Hi
It probably needs to be installed, if you want a GUI as well;


zypper in zenmap nmap

Else just nmap and run;


nmap -T4 -A -v <ip address of printer>

I got this

nmap -T4 -A -v 192.168.1.130

Starting Nmap 6.40 ( http://nmap.org ) at 2014-03-01 14:17 EST
NSE: Loaded 110 scripts for scanning.
NSE: Script Pre-scanning.
Initiating ARP Ping Scan at 14:17
Scanning 192.168.1.130 [1 port]
Completed ARP Ping Scan at 14:17, 0.41s elapsed (1 total hosts)
Nmap scan report for 192.168.1.130 [host down]
NSE: Script Post-scanning.
Read data files from: /usr/bin/../share/nmap
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 1.93 seconds
           Raw packets sent: 2 (56B) | Rcvd: 0 (0B)



Adding the -Pn switch got the same thing. Used HP Device manager to print a test page and it worked.

Zenmap was nice, but gave identical output… as expected. Just for jollies, I ran it against my router and it showed open ports, but not 631. Isn’t that the one that has to be open for cups?

Also, I pinged the printer from the terminal and it responded.

On Sat 01 Mar 2014 07:36:02 PM CST, Prexy wrote:

I got this
Code:

nmap -T4 -A -v 192.168.1.130

Starting Nmap 6.40 ( http://nmap.org ) at 2014-03-01 14:17 EST
NSE: Loaded 110 scripts for scanning.
NSE: Script Pre-scanning.
Initiating ARP Ping Scan at 14:17
Scanning 192.168.1.130 [1 port]
Completed ARP Ping Scan at 14:17, 0.41s elapsed (1 total hosts)
Nmap scan report for 192.168.1.130 [host down]
NSE: Script Post-scanning.
Read data files from: /usr/bin/…/share/nmap
Note: Host seems down. If it is really up, but blocking our ping
probes, try -Pn Nmap done: 1 IP address (0 hosts up) scanned in 1.93
seconds Raw packets sent: 2 (56B) | Rcvd: 0 (0B)


Adding the -Pn switch got the same thing. Used HP Device manager to
print a test page and it worked.

Zenmap was nice, but gave identical output… as expected. Just for
jollies, I ran it against my router and it showed open ports, but not
631. Isn’t that the one that has to be open for cups?

Also, I pinged the printer from the terminal and it responded.

Hi
So it’s not at that ip address anymore… if you log into your router,
is there a table showing the ip address allocated against mac addresses?


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.2 Kernel 3.11.10-7-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Further to this, you could scan the whole subnet with something like

nmap -sP 192.168.1.0/24

The router’s web page shows the printer as 192.168.1.130 and a mac address. I cannot ping it from either the router page or a terminal.

nmap -sP 192.168.1.0/24

does not show the printer.

The printer has an indicator that wireless is connected, but is otherwise dark. Could this be something to do with wake-on-lan? Clutching at straws here.

Put the firewall down - ping works but not a ping from router. Neither does nmap.
Put the firewall back up - ping still works but not router page or nmap.

Hi
Can you power cycle the printer and check the router for the ip address and try nmap again.

This is absolutely maddening! I rebooted, lost connection and couldn’t get it back. I tried to stop and restart the printer through the HP device manager but didn’t have permission. So, I did it as root. That apparently got me connected, although ping did not immediately work.

As requested, I ran nmap before cycling the printer. I didn’t look at it closely. Then I power cycled the printer, ran nmap again and I saw the printer. BUT, looking again, I noticed that the printer showed in nmap before cycling.

I know it can take time for the network to discover things attached to it. Maybe I didn’t give it enough time to register the printer? Still, I can’t get the printer connected without intervention. But I can’t figure out which intervention! I would like my user to be recognized by cups but maybe only root can access cups.

On Mon 03 Mar 2014 07:56:01 PM CST, Prexy wrote:

This is absolutely maddening! I rebooted, lost connection and couldn’t
get it back. I tried to stop and restart the printer through the HP
device manager but didn’t have permission. So, I did it as root. That
apparently got me connected, although ping did not immediately work.

As requested, I ran nmap before cycling the printer. I didn’t look at
it closely. Then I power cycled the printer, ran nmap again and I saw
the printer. BUT, looking again, I noticed that the printer showed in
nmap before cycling.

I know it can take time for the network to discover things attached to
it. Maybe I didn’t give it enough time to register the printer? Still, I
can’t get the printer connected without intervention. But I can’t
figure out which intervention! I would like my user to be recognized by
cups but maybe only root can access cups.

Hi
What about power cycling the printer? So anything interesting in the
nmap output, ports open etc?


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.2 Kernel 3.11.10-7-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

I power cycled the printer a little while ago… and I don’t recall which step got connected. It was NOT the use of the HP Device Manager, as I thought it was. Here is nmap:



Starting Nmap 6.40 ( http://nmap.org ) at 2014-03-03 16:08 EST
NSE: Loaded 110 scripts for scanning.
NSE: Script Pre-scanning.
Initiating Ping Scan at 16:08
Scanning 192.168.1.130 [2 ports]
Completed Ping Scan at 16:08, 0.00s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 16:08
Completed Parallel DNS resolution of 1 host. at 16:08, 0.00s elapsed
Initiating Connect Scan at 16:08
Scanning 192.168.1.130 [1000 ports]
Discovered open port 139/tcp on 192.168.1.130
Discovered open port 443/tcp on 192.168.1.130
Discovered open port 80/tcp on 192.168.1.130
Discovered open port 8080/tcp on 192.168.1.130
Discovered open port 445/tcp on 192.168.1.130
Discovered open port 9220/tcp on 192.168.1.130
Discovered open port 9290/tcp on 192.168.1.130
Discovered open port 631/tcp on 192.168.1.130
Discovered open port 9101/tcp on 192.168.1.130
Discovered open port 9102/tcp on 192.168.1.130
Discovered open port 6839/tcp on 192.168.1.130
Discovered open port 7435/tcp on 192.168.1.130
Discovered open port 9110/tcp on 192.168.1.130
Discovered open port 9100/tcp on 192.168.1.130
Discovered open port 9111/tcp on 192.168.1.130
Completed Connect Scan at 16:08, 3.55s elapsed (1000 total ports)
Initiating Service scan at 16:08
Scanning 12 services on 192.168.1.130
Completed Service scan at 16:10, 131.17s elapsed (15 services on 1 host)
NSE: Script scanning 192.168.1.130.
Initiating NSE at 16:10
Completed NSE at 16:12, 74.96s elapsed
Nmap scan report for 192.168.1.130
Host is up (0.61s latency).
Not shown: 985 closed ports
PORT     STATE SERVICE           VERSION
80/tcp   open  http              HP Officejet 6700 printer http config (Serial CN38PC5HH405RQ)
|_http-favicon: Unknown favicon MD5: A14D3BAA6A6746D1A77AFB1E1DC82F0F
|_http-methods: GET
|_http-title: Site doesn't have a title (text/html; charset=UTF-8).
139/tcp  open  tcpwrapped
443/tcp  open  ssl/http          HP Officejet 6700 printer http config (Serial CN38PC5HH405RQ)
|_http-favicon: Unknown favicon MD5: A14D3BAA6A6746D1A77AFB1E1DC82F0F
|_http-methods: GET
|_http-title: Site doesn't have a title (text/html; charset=UTF-8).
| ssl-cert: Subject: commonName=HP7325A3/organizationName=HP/stateOrProvinceName=Washington/countryName=US
| Issuer: commonName=HP7325A3/organizationName=HP/stateOrProvinceName=Washington/countryName=US
| Public Key type: rsa
| Public Key bits: 1024
| Not valid before: 2013-05-31T19:11:01+00:00
| Not valid after:  2033-05-26T19:11:01+00:00
| MD5:   0032 99ff 9c8c c1dd 235a e7fc 0385 7fb6
|_SHA-1: 1933 544b dcf5 3124 9c34 857d 335a c319 81da b93b
|_ssl-date: 2014-03-03T21:13:18+00:00; +2m20s from local time.
445/tcp  open  netbios-ssn
631/tcp  open  http              HP Officejet 6700 printer http config (Serial CN38PC5HH405RQ)
|_http-methods: No Allow or Public header in OPTIONS response (status code 404)
|_http-title: Site doesn't have a title.
6839/tcp open  tcpwrapped
7435/tcp open  tcpwrapped
8080/tcp open  http              HP Officejet 6700 printer http config (Serial CN38PC5HH405RQ)
|_http-favicon: Unknown favicon MD5: A14D3BAA6A6746D1A77AFB1E1DC82F0F
|_http-methods: GET
|_http-title: Site doesn't have a title (text/html; charset=UTF-8).
9100/tcp open  jetdirect?
9101/tcp open  jetdirect?
9102/tcp open  jetdirect?
9110/tcp open  unknown
9111/tcp open  DragonIDSConsole?
9220/tcp open  hp-gsg            HP Generic Scan Gateway 1.0
9290/tcp open  hp-gsg            IEEE 1284.4 scan peripheral gateway
1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at http://www.insecure.org/cgi-bin/servicefp-submit.cgi :
SF-Port9110-TCP:V=6.40%I=7%D=3/3%Time=5314EF7D%P=i586-suse-linux-gnu%r(RPC
SF:Check,2B,"\0\0\(r\xfe\x1d\x13\0\0\0\0\0\0\0\x02\0\x01\x86\xa0\0\x01\x97
SF:\|\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0")%r(kumo-server,1,"\0");
Service Info: Device: printer; CPE: cpe:/h:hp:officejet_6700


Host script results:
| nbstat: 
|   NetBIOS name: HPD89D67552693, NetBIOS user: <unknown>, NetBIOS MAC: <unknown>
|   Names
|     HPD89D67552693<00>   Flags: <unique><active><permanent>
|     MSHOME<00>           Flags: <group><active><permanent>
|     HPD89D67552693<20>   Flags: <unique><active><permanent>
|     HP7325A3<00>         Flags: <unique><active><permanent>
|_    HP7325A3<20>         Flags: <unique><active><permanent>
|_smbv2-enabled: Server doesn't support SMBv2 protocol


NSE: Script Post-scanning.
Read data files from: /usr/bin/../share/nmap
Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 210.58 seconds



Several pages I found on this issue (not openSUSE) talk about the group lpadmin and also system group. We have groups named lp and sys. I assume these are the same things. Do I need to create an lpadmin group and put my user into it? Already in the other 2. Let me restate: just power cycling didn’t get the printer recognized.