Solved A CUPS issue....

I have recently built a new install of FreeBSD 12.2-RELEASE on my office desktop machine. All has gone well so far. As I mentioned, I am working to build a DE for my wife and the other computo-klutzes in our family so we can all eventually dump Billy Gates' offerings.

The FreeBSD base went forward with no issues. I then installed (via pkg install) Xorg, and other software, and eventually, MATE. MATE, much to my surprise, seems to work just fine, although there are a couple of minor issues which I will handle later. There are "interesting" error messages flashing past as it loads. One says something like, "This shouldn't happen!!!" I'll get those down later and figure them out.

The main issue for me is that I cannot reach the CUPS web-interface at all using http://localhost:631. Firefox simply times out. I have adjusted cups-files.conf and cupsd.conf to point to the correct files, but nothing helps. I have installed all the necessary software, including hplip.

After checking the forum, I thought I should take a look at rc.firewall, and, again, rc.conf, but there is nothing in either one that suggests that the firewall, if I even have one, is interfering with my ability to reach the CUPS administration function through Firefox.

Does anyone have any suggestions as to where I might begin looking?

Ken Gordon
 
The main issue for me is that I cannot reach the CUPS web-interface at all using http://localhost:631. Firefox simply times out. I have adjusted cups-files.conf and cupsd.conf to point to the correct files, but nothing helps. I have installed all the necessary software, including hplip.
Check if cupsd(8) is actually running. Did you enable it in rc.conf? If you have it enabled but it's not running then check for errors in the logs. It might fail to start due to some wrong setting for example. If it is running double check with sockstat -l and see if it's listening on port 631.
 
Well, of course, when I enabled it, I stupidly left off the "d". I wrote: cups_enable="YES". Fixed that.

sockstat -l|more shows cupsd listening on 631 for both tcp6 and tcp4 with USER as root. But it still times out in Firefox.

Ken Gordon
 
This CUPS article is a good guide for setting up your printer:
https://docs.freebsd.org/en_US.ISO8859-1/articles/cups/article.html

Hello and thanks. I have set up printers in the past with CUPS and am quite familiar with the process.....once I get CUPS to run. :)
There is another package which I have found useful to install:
# pkg install cups-filters

I have installed # pkg install cups-filters, # pkg install gutenprint, # pkg install cups-pdf, # pkg install hplip, and some other "helpers".

Finally, if you get to CUPS Adminstration tab I have had to use root to login. This might be considered a security risk to some people, but if you are confident in your security methods, then use it.

Hmm....now that you mention that, I remember that I had to do that at one time. But usually the CUPS Administration tab has always asked for a root login at some point.

I suspect I have some file pointers wrong.

Thanks for the suggestions. Much appreciated.

Ken Gordon
 
Well, of course, when I enabled it, I stupidly left off the "d". I wrote: cups_enable="YES". Fixed that.

sockstat -l|more shows cupsd listening on 631 for both tcp6 and tcp4 with USER as root. But it still times out in Firefox.

Ken Gordon
Make sure you are trying to use http and not https. Modern browsers seem to assume the latter if you don't explicitly specify it.
 
I did. Still times out. I also went back and checked the configuration files to make sure they pointed to real directories, and all looked correct.

I also stopped then restarted the cupsd service. Still no joy.

I then checked the cups error_log and find that cups cannot find two directories: /usr/local/etc/cups/ppd/mime and /usr/local/etc/cups/banners.

So I made those two directories, but they are empty. Should there be files in those? If so, what files, and where should I get them?

Ken Gordon
 
Never mind: I simply changed the pointer in cups-files.conf to where those actually are: in /usr/local/share/cups

Ken Gordon
 
I have not yet tried any other browser. I'll do two things: first I will install Chrome (although I hate it), and will install Lynx, then will report here.

I have just finished trying to edit the cupsd.conf file as suggested in the Handbook, but no joy there either.

I am really stuck on this one...

So far, I have not yet found a similar situation on the web anywhere....but I'll keep looking...

Ken Gordon
 
Results: Chromium hangs just like Firefox and reports "Unavailable...". Lynx says, "Making connection to localhost:631", hangs......and finally reports, "Unable to connect to localhost:631."

Interesting!!!! Now what....or as some have said here, WTF?!!?!?!?!

Ken Gordon
 
Good idea. I'll try that asap, but now I have grand-baby duties! :)

I'll try that as soon as I can.

Thanks,

Ken Gordon
 
This is baffling the heck out of me: I can't even telnet to it. If, from a terminal, I issue telnet localhost 631, first, it says Trying ::1..., followed by, telnet: connect to address ::1: Operation timed out, then Trying 127.0.0.1..., followed by, telnet: connect to address 127.0.0.1: Operation timed out, followed by, telnet: Unable to connect to remote host

So I cannot even telnet to my own localhost. What the heck? ? ? ? ? Yet I can ping both.

This doesn't sound like a CUPS problem to me!!!

Ken Gordon
 
At this point, I am suspecting an issue with the firewall, but I am not sure how to go about investigating this.

Ken Gordon
 
Holy Crap!!!! I had pf enabled and configured in rc.conf. I commented out everything having to do with that firewall, and, BINGO!, CUPS now works properly.

Thanks for your patience, guys.

Now....how do I list this issue as SOLVED?

Ken Gordon
 
Click the hamburger top right of the thread text, choose "Edit Thread" (or the like).

Edit: Hamburger:

_
_
_
 
Back
Top