Problem with CUPS/HPLIP: No module named gobject

I am setting up NethServer on an Intel NUC (NUC5PPYH) which seems a perfect little box for my purpose.

Unfortunately the NethServer 7 ISO download would not go through.

Fortunately I found the option of the package install on a CentOS minimal installation. I thus installed the
NethServer release 7.3.1611 (Final)
on the
Kernel release 3.10.0-514.10.2.el7 x86_64 7 (Core).

I only checked a few areas which seem to work so far, but I ran into a little problem with CUPS. I could install a printer, but trying to print I get no print out but the status message:
Idle - "Error importing HPLIP modules: 3045 No module named gobject"
The CUPS version is 1.6.3 (not exactly brand new but it should do the job)

Is there a way to fix this without breaking the NethServer installation?

Thanks
Helmut

You can try with:

yum install pygobject2
1 Like

This did the trick. Thanks Marc.

1 Like

One eliminates a problem on to run into the next one :slight_smile:

CUPS worked on the server and prints just fine, but it did not want to print from Windows 10.
Trying http://servername(FQD):631/printers/printername
resulted in “Windows cannot connect to printer” and “Returning HTTP Forbidden for Get-Printer-Attributes” in the CUPS error_log.
Manually changing the cupsd.conf file fixed the problem, but I am afraid this will be overwritten eventually:

   <Limit All>
     Order deny,allow
#    Deny From All                           # this was the default I commented out
     Allow From 127.0.0.1                     # I am not sure if this is necessary
     Allow From 192.168.10.0/255.255.255.0    # this is my local network
   </Limit>

While looking further into the CUPS error log I found the following:

E [11/Mar/2017:12:19:29 -0500] Unknown directive BrowseOrder on line 5 of /etc/cups/cupsd.conf.
E [11/Mar/2017:12:19:29 -0500] Unknown directive BrowseAllow on line 6 of /etc/cups/cupsd.conf.
E [11/Mar/2017:12:19:29 -0500] Unknown browse protocol “CUPS” ignored.

The man pages suggest [All] and [DNSSD] as possible parameters for BrowseLocalProtocols and for Browsing [Yes] and [No] (though the latter did not raise a warning in the error log).

My changes to cupsd.conf:

# Show shared printers on the local network.
Browsing Yes
#BrowseOrder allow,deny
#BrowseAllow all
BrowseProtocols DNSSD
BrowseLocalProtocols DNSSD

Perhaps this could be considered on one of the next upgrades should time permit.

Best Regards
Helmut

1 Like

Thanks for the feedback.
As you suggest a fix might be convinient, as there were similar reports:

I collected all the issues reported about CUPS, but I still can’t understand the problem.
I tried to replicate the access error, but I never succeeded.

@tavrist provided me with the modified file, but I can’t spot the differences.
I’m not sure the removing “Deny from all” is a good idea. But I’m not an expert.
Has any anyone found a good guide for CUPS? Or experience configuring it on CentOS?

Hi,

I did some quick fiddling with the cupsd.conf file to clarify things,
and this is how the section looks like now:

Order deny,allow Deny From All Allow From 127.0.0.1 Allow From 192.168.10.0/255.255.255.0

I uncommented “Deny From All” and it still works. Also, commenting out
"Allow From 127.0.0.1" does have no impact on printer setup on Windows
10, so it might not be necessary at all, I left it in there just in case.
But once I remove the line “Allow From 192…” I can no longer set up
the printer in Windows 10, so that seems to be the really required
addition if the cups server is to be used from Windows.

I hope this helps.
Best
Helmut