LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-28-2020, 12:50 AM   #16
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,805

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140

Are you accessing this virtual machine via its local desktop? That is are you using a browser on the guest itself, or are you trying to reach it's CUPS server web interface externally eg via the host?

Last edited by ferrari; 04-28-2020 at 12:53 AM.
 
Old 04-28-2020, 12:54 AM   #17
lambdrum
LQ Newbie
 
Registered: Apr 2020
Location: Orange County, CA
Distribution: Fedora 30
Posts: 19

Original Poster
Rep: Reputation: Disabled
Ferrari,

I am using the desktop and Firefox within the same virtual machine, not the host.
 
Old 04-28-2020, 01:00 AM   #18
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,805

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Run
Code:
wget -p localhost:631 -O test.out
That should produce something like
Code:
~> wget -p localhost:631 -O test.out
WARNING: combining -O with -r or -p will mean that all downloaded content
will be placed in the single file you specified.

--2020-04-28 17:58:48--  http://localhost:631/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:631... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2362 (2.3K) [text/html]
Saving to: ‘test.out’

test.out                           100%[===============================================================>]   2.31K  --.-KB/s    in 0s      

2020-04-28 17:58:48 (692 MB/s) - ‘test.out’ saved [2362/2362]

Loading robots.txt; please ignore errors.
--2020-04-28 17:58:48--  http://localhost:631/robots.txt
Reusing existing connection to [localhost]:631.
HTTP request sent, awaiting response... 200 OK
Length: 95 [text/plain]
Saving to: ‘test.out’

test.out                           100%[===============================================================>]      95  --.-KB/s    in 0s      

2020-04-28 17:58:48 (29.2 MB/s) - ‘test.out’ saved [95/95]

FINISHED --2020-04-28 17:58:48--
Total wall clock time: 0.07s
Downloaded: 2 files, 2.4K in 0s (368 MB/s)
with the web page elements saved to test.out as well. Don't worry about posting the output, unless you get errors or 'connection refused' etc
 
1 members found this post helpful.
Old 04-28-2020, 01:09 AM   #19
lambdrum
LQ Newbie
 
Registered: Apr 2020
Location: Orange County, CA
Distribution: Fedora 30
Posts: 19

Original Poster
Rep: Reputation: Disabled
I received some errors:
Connecting to localhost (localhost) ::.110|631... failed: Connection timed out. There were more numbers before the 110
connecting to localhost (localhost) ::.169|631... failed: connection timed out. There were more numbers before the 169

Then it went on to try again and fail again
 
Old 04-28-2020, 01:47 AM   #20
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,805

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
When the connection timeout occurs, get the current cups.service status with
Code:
sudo systemctl status cups
If necessary, restart the service
Code:
sudo systemctl restart cups
and immediately try reaching the web interface via your browser. Any different?

Just in case this thread is relevant...
https://www.linuxquestions.org/quest...ks-4175590585/
 
Old 04-28-2020, 04:15 AM   #21
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,805

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
Originally Posted by lambdrum View Post
I received some errors:
Connecting to localhost (localhost) ::.110|631... failed: Connection timed out. There were more numbers before the 110
connecting to localhost (localhost) ::.169|631... failed: connection timed out. There were more numbers before the 169

Then it went on to try again and fail again
This looks like localhost is not configured, but others may be able to advise further here.

Check that /etc/hosts contains the following entry
Code:
127.0.0.1       localhost
Run
Code:
host localhost
Check that you get the following response...
Code:
localhost has address 127.0.0.1
localhost has IPv6 address ::1
 
1 members found this post helpful.
Old 04-28-2020, 04:38 AM   #22
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,805

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Just in case this is relevant...
https://unix.stackexchange.com/quest...st-connections
 
Old 04-28-2020, 11:44 PM   #23
lambdrum
LQ Newbie
 
Registered: Apr 2020
Location: Orange County, CA
Distribution: Fedora 30
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
When the connection timeout occurs, get the current cups.service status with
Code:
sudo systemctl status cups
If necessary, restart the service
Code:
sudo systemctl restart cups
and immediately try reaching the web interface via your browser. Any different?

Just in case this thread is relevant...
https://www.linuxquestions.org/quest...ks-4175590585/
Hello Ferrari,
it appears we are making some progress:

● cups.service - CUPS Scheduler
Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2020-04-28 21:00:15 PDT; 25min ago
Docs: man:cupsd(8)
Main PID: 1626 (cupsd)
Status: "Scheduler is running..."
Tasks: 1 (limit: 8902)
Memory: 2.0M
CGroup: /system.slice/cups.service
└─1626 /usr/sbin/cupsd -l

Apr 28 21:00:15 localhost.localdomain systemd[1]: Starting CUPS Scheduler...
Apr 28 21:00:15 localhost.localdomain systemd[1]: Started CUPS Scheduler.
Apr 28 21:00:46 localhost.localdomain cupsd[1626]: Unable to finalize "/etc/cups/printers.conf": Permission denied
Apr 28 21:05:43 localhost.localdomain cupsd[1626]: REQUEST localhost - - "POST / HTTP/1.1" 200 361 Create-Printer-Subscriptions successful-ok
Apr 28 21:05:47 localhost.localdomain cupsd[1626]: REQUEST localhost - - "POST / HTTP/1.1" 200 151 Cancel-Subscription client-error-not-found
Apr 28 21:23:28 localhost.localdomain cupsd[1626]: REQUEST localhost - - "POST / HTTP/1.1" 200 151 Cancel-Subscription client-error-not-found

The unable to finalize "/etc/cups/printers.conf" may be a problem. And i learned how to copy and paste in the terminal. Thoughts on what to do about the above anyone?

I did read the link provided, and it did not look like the bug was fixed except in a release. The one solution i saw was not recommended it looked like:

/lib/systemd/system/cups.socket

adding a line

ListenStream=631

in the "[Socket]" section. The file should look like this then:

----------
[Unit]
Description=CUPS Scheduler

[Socket]
ListenStream=/var/run/cups/cups.sock
ListenStream=631

[Install]
WantedBy=sockets.target
 
Old 04-28-2020, 11:58 PM   #24
lambdrum
LQ Newbie
 
Registered: Apr 2020
Location: Orange County, CA
Distribution: Fedora 30
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
This looks like localhost is not configured, but others may be able to advise further here.

Check that /etc/hosts contains the following entry
Code:
127.0.0.1       localhost
Run
Code:
host localhost
Check that you get the following response...
Code:
localhost has address 127.0.0.1
localhost has IPv6 address ::1
Ferrari,

It almost looks like there are no contents in the /etc/hosts file. I ran cat /etc/hosts and nothing happened.

Is there a way to delete CUPS and then reinstall it?
 
Old 04-29-2020, 12:08 AM   #25
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,805

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
It almost looks like there are no contents in the /etc/hosts file. I ran cat /etc/hosts and nothing happened.
Ok, add the localhost entries (or at least the IPv4 address) as above to /etc/hosts, with an editor as root eg using nano...
Code:
sudo nano /etc/hosts
When done, save and reboot. Now you should be able to ping localhost
Code:
ping localhost
and further to that you should now be able to reach the CUPS web interface in the browser using "localhost:631".

BTW, even without that hostname it should siall have been possible to use the localhost IP address "127.0.0.1:631"

Quote:
Is there a way to delete CUPS and then reinstall it?
This appears to be a fundamental network issue with "localhost" hostname missing.

Last edited by ferrari; 04-29-2020 at 12:21 AM.
 
1 members found this post helpful.
Old 04-29-2020, 12:18 AM   #26
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,805

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
Originally Posted by lambdrum View Post
Hello Ferrari,
it appears we are making some progress:

● cups.service - CUPS Scheduler
Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2020-04-28 21:00:15 PDT; 25min ago
Docs: man:cupsd(8)
Main PID: 1626 (cupsd)
Status: "Scheduler is running..."
Tasks: 1 (limit: 8902)
Memory: 2.0M
CGroup: /system.slice/cups.service
└─1626 /usr/sbin/cupsd -l

Apr 28 21:00:15 localhost.localdomain systemd[1]: Starting CUPS Scheduler...
Apr 28 21:00:15 localhost.localdomain systemd[1]: Started CUPS Scheduler.
Apr 28 21:00:46 localhost.localdomain cupsd[1626]: Unable to finalize "/etc/cups/printers.conf": Permission denied
Apr 28 21:05:43 localhost.localdomain cupsd[1626]: REQUEST localhost - - "POST / HTTP/1.1" 200 361 Create-Printer-Subscriptions successful-ok
Apr 28 21:05:47 localhost.localdomain cupsd[1626]: REQUEST localhost - - "POST / HTTP/1.1" 200 151 Cancel-Subscription client-error-not-found
Apr 28 21:23:28 localhost.localdomain cupsd[1626]: REQUEST localhost - - "POST / HTTP/1.1" 200 151 Cancel-Subscription client-error-not-found

The unable to finalize "/etc/cups/printers.conf" may be a problem. And i learned how to copy and paste in the terminal. Thoughts on what to do about the above anyone?
First thoughts are to check the CUPS config file ownerships/permissions...
Code:
ls -l /etc/cups
 
1 members found this post helpful.
Old 04-29-2020, 12:21 AM   #27
lambdrum
LQ Newbie
 
Registered: Apr 2020
Location: Orange County, CA
Distribution: Fedora 30
Posts: 19

Original Poster
Rep: Reputation: Disabled
Ferrari,

You have solved the issue and have the patience of a saint! i am able to access the CUPS web admin page and it appears i am in business. I cannot thank you enough. Any idea why this may have happened? or did i just probably delete or mess with something i should not have?

--- localhost ping statistics ---
284 packets transmitted, 284 received, 0% packet loss, time 1064ms
rtt min/avg/max/mdev = 0.021/0.037/0.384/0.030 ms


This has been resolved.
 
Old 04-29-2020, 12:24 AM   #28
lambdrum
LQ Newbie
 
Registered: Apr 2020
Location: Orange County, CA
Distribution: Fedora 30
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
First thoughts are to check the CUPS config file ownerships/permissions...
Code:
ls -l /etc/cups
This is the results from ls -l /etc/cups

[user1@localhost ~]$ ls -l /etc/cups
total 92
-rw-------. 1 root lp 0 Mar 26 2019 classes.conf
-rw-r--r--. 1 root lp 0 Mar 26 2019 client.conf
-rw-r--r--. 1 root root 27707 Apr 25 2019 cups-browsed.conf
-rw-r-----. 1 root lp 6278 Mar 26 2019 cupsd.conf
-rw-r-----. 1 root lp 6278 Mar 26 2019 cupsd.conf.default
-rw-r-----. 1 root lp 3000 Apr 25 2019 cups-files.conf
-rw-r-----. 1 root lp 3000 Mar 26 2019 cups-files.conf.default
-rw-r--r--. 1 root lp 17 Apr 26 18:25 lpoptions
drwxr-xr-x. 2 root lp 4096 Mar 26 2019 ppd
-rw-------. 1 root lp 429 Apr 26 19:08 printers.conf
-rw-------. 1 root lp 501 Apr 28 22:16 printers.conf.N
-rw-------. 1 root lp 491 Apr 26 19:02 printers.conf.O
-rw-r--r--. 1 root lp 142 Mar 26 2019 snmp.conf
-rw-r-----. 1 root lp 142 Mar 26 2019 snmp.conf.default
drwx------. 2 root lp 4096 Mar 26 2019 ssl
-rw-r-----. 1 root lp 712 Apr 28 22:16 subscriptions.conf
-rw-r-----. 1 root lp 412 Apr 28 22:04 subscriptions.conf.O
 
Old 04-29-2020, 12:49 AM   #29
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,805

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
Originally Posted by lambdrum View Post
Ferrari,

You have solved the issue and have the patience of a saint! i am able to access the CUPS web admin page and it appears i am in business. I cannot thank you enough. Any idea why this may have happened? or did i just probably delete or mess with something i should not have?

--- localhost ping statistics ---
284 packets transmitted, 284 received, 0% packet loss, time 1064ms
rtt min/avg/max/mdev = 0.021/0.037/0.384/0.030 ms


This has been resolved.
I'm really not sure why that file was missing. The default configuration should have been there from install. Anyway, glad to read of your progress. All part of the learning.
 
Old 04-29-2020, 12:52 AM   #30
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,805

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
The permissions of the listed files look ok to me. Just let us know if you have any problems configuring CUPS.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't Access Cups Admin @ Http://localhost:631 Perps SUSE / openSUSE 8 12-26-2018 02:36 AM
[SOLVED] CUPS web interface on localhost:631 not connecting zuzoa Linux - Software 8 07-13-2009 10:44 AM
CUPS. http://localhost:631/ not found Bester Linux - Server 2 03-25-2009 03:15 AM
Unable to log in to localhost:631/admin FibonacciPrower Linux - Hardware 1 06-10-2006 02:52 PM
CUPS Problem - can not access localhost:631 ch.keller Linux - Hardware 3 06-06-2005 05:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration