LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-03-2019, 08:21 PM   #16
FuzzyHat
LQ Newbie
 
Registered: May 2016
Location: Maryland, USA
Distribution: Ubuntu Mate, Linux Mint
Posts: 17

Original Poster
Rep: Reputation: Disabled

Restarting the daemon didn't help, so I'll go with deleting and reinstalling the printers this weekend.

The "grep -i hosts /etc/nsswitch.conf" command gives me a single line of output:

hosts: files dns
 
Old 01-03-2019, 08:40 PM   #17
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Hold up - you’re missing mDNS name resolution from the configuration. It should look like this
Code:
hosts: files mdns4_minimal [NOTFOUND=return] dns
 
Old 01-03-2019, 09:58 PM   #18
FuzzyHat
LQ Newbie
 
Registered: May 2016
Location: Maryland, USA
Distribution: Ubuntu Mate, Linux Mint
Posts: 17

Original Poster
Rep: Reputation: Disabled
Ok, I edited the /etc/nsswitch.conf file to change that line, rebooted and pretty much lost DNS on my system. Firefox couldn't find anything at all. I put the file back the way it was, rebooted, and I'm back to "normal". I have a nagging feeling in the back of my head that a DNS problem could explain some odd behavior I've seen on this computer, but I can't think of a specific example other than my current printing and octopi issues.

Is there a way to "refresh" my DNS configurations?

Here's what my whole nsswitch.conf file looks like:

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd: compat
group: compat
shadow: compat
gshadow: files

hosts: files dns
networks: files

protocols: db files
services: db files
ethers: db files
rpc: db files

netgroup: nis
 
Old 01-04-2019, 12:11 AM   #19
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
Ok, I edited the /etc/nsswitch.conf file to change that line, rebooted and pretty much lost DNS on my system. Firefox couldn't find anything at all. I put the file back the way it was, rebooted, and I'm back to "normal". I have a nagging feeling in the back of my head that a DNS problem could explain some odd behavior I've seen on this computer, but I can't think of a specific example other than my current printing and octopi issues.
That should have worked without issue. Are you missing libnss-mdns perhaps?
Code:
dpkg -l|grep nss
Without mdns_minimal (or mdns4_minimal for IPv4 only) configured Avahi hostname resolution won't work. The package provides the required libraries...
Code:
dpkg-query -L libnss-mdns
Quote:
Is there a way to "refresh" my DNS configurations?
This is really only relevant when name caching is employed. From a quick google, I'm not sure Ubuntu 16.04 employed any such mechanism, and in any case a reboot would sort that out.

In your opening post you mentioned
Quote:
My laptop can't access the Octopi application via a browser and I should be able to.
What does the browser URL to reach the software look like?

Last edited by ferrari; 01-04-2019 at 12:59 AM.
 
Old 01-04-2019, 07:00 PM   #20
FuzzyHat
LQ Newbie
 
Registered: May 2016
Location: Maryland, USA
Distribution: Ubuntu Mate, Linux Mint
Posts: 17

Original Poster
Rep: Reputation: Disabled
The libnss commands all returned good looking results s0 libnss-mdns seems OK.

The URL that should work in my browser is "octopi.local". Firefox changes it to "www.octopi.local" and gives me "server not found" error.

Using the command line, I should be able to ssh into the Raspberry pi using the command:

"ssh pi@octopi.local"

That doesn't work and the error says it can't resolve the host name.

The command that DOES work is:

"ssh pi@192.168.1.33"

That gets me in every time and the pi is fully operational and responsive.
 
Old 01-04-2019, 07:36 PM   #21
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Well, for sure you'll need /etc/nsswitch.conf suitably configured (Ubuntu OS) for mDNS name resolution to work...
Code:
hosts:          files mdns4_minimal [NOTFOUND=return] dns
With repsect to the Raspberry Pi...

Check that avahi-daemon is running on the Pi with
Code:
service avahi-daemon status
and if necessary restart the daemon with
Code:
service avahi-daemon restart
Check that it is now discovered from the Ubuntu machine
Code:
avahi-browse -art |grep octopi
 
Old 01-05-2019, 01:49 PM   #22
FuzzyHat
LQ Newbie
 
Registered: May 2016
Location: Maryland, USA
Distribution: Ubuntu Mate, Linux Mint
Posts: 17

Original Poster
Rep: Reputation: Disabled
All those commands say avahi-daemon is running correctly. I did a restart and it cause errors in the status results but rebooting the pi cleared them up.

No change in not being able to reach the pi via the browser or printing.

I'm going to try deleting and reinstalling the printers later today just to see how things go.
 
Old 01-05-2019, 02:16 PM   #23
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
I'm going to try deleting and reinstalling the printers later today just to see how things go.
I wouldn't bother with that step, until you have mDNS working. Having said that, you could change the CUPS printer configurations to use the printer IP addresses and the appropriate network backends for the printers concerned. Then Avahi service discovery is not used (at least from a printing perspective).

Examining the open ports on the printers can be a good guide as to which network printing protocols are supported
Code:
nmap <printer_IP_address>

Last edited by ferrari; 01-05-2019 at 04:51 PM.
 
Old 01-05-2019, 02:23 PM   #24
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
It is strange that you can't get Avahi working properly on the Ubuntu host. A firewall not configured for mDNS multi-casting is the only possibility (based on what you've posted so far) that I can see now for an issue with this particular host.
 
Old 01-09-2019, 05:56 PM   #25
FuzzyHat
LQ Newbie
 
Registered: May 2016
Location: Maryland, USA
Distribution: Ubuntu Mate, Linux Mint
Posts: 17

Original Poster
Rep: Reputation: Disabled
Hi Ferrari, I'm back onto this after a small break.

I'm thinking at this point that there must be a different configuration file damaged than the ones we've checked. The avahi daemon is running correctly and everything we've looked for seems to be in place. The single problem we found was that my /etc/nsswitch.conf file had one line incorrect.

Original: hosts: files dns
Corrected: hosts: files mdns4_minimal [NOTFOUND-return] dns

The trouble is that if I use the corrected version, I can't access the internet from my browser and SpiderOak doesn't connect. I can however still use my Synergy mouse/kvm software correctly, but it doesn't use DNS.

Changing between the original and corrected versions of the nsswitched.conf file has no impact on my ability to access "octopi.local" or printing.

I did delete one of my printers and reinstall it, twice. The install went differently both times when it came to picking drivers, but attempting to print a test page resulted in another "the printer may not be connected" error message.

SOOOOO, are there any other configuration files that might be impacted? I've still got a sense that this is a DNS issue but that we're looking in the wrong place.

Thanks,
Bob
 
Old 01-09-2019, 09:48 PM   #26
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
I'm thinking at this point that there must be a different configuration file damaged than the ones we've checked. The avahi daemon is running correctly and everything we've looked for seems to be in place. The single problem we found was that my /etc/nsswitch.conf file had one line incorrect.

Original: hosts: files dns
Corrected: hosts: files mdns4_minimal [NOTFOUND-return] dns

The trouble is that if I use the corrected version, I can't access the internet from my browser and SpiderOak doesn't connect. I can however still use my Synergy mouse/kvm software correctly, but it doesn't use DNS.
Be careful with your syntax. It's
Code:
hosts: files mdns4_minimal [NOTFOUND=return] dns
Did you reboot (or at least restart the network) after making the required changes? I don't get

Quote:
SOOOOO, are there any other configuration files that might be impacted? I've still got a sense that this is a DNS issue but that we're looking in the wrong place.
Avahi name resolution has nothing to do with DNS though. Resolving foo.local hostnames (within your LAN) is done by Avahi.
 
Old 01-10-2019, 02:21 AM   #27
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
What does the following report?
Code:
sudo netstat -anp | grep ":53"
I'm just wondering if dnsmasq is in use here.

BTW, are you using NetworkManager to manage your networking for this host, or manual configuration using /etc/network/interfaces?
 
Old 01-13-2019, 09:20 AM   #28
FuzzyHat
LQ Newbie
 
Registered: May 2016
Location: Maryland, USA
Distribution: Ubuntu Mate, Linux Mint
Posts: 17

Original Poster
Rep: Reputation: Disabled
I use the GUI tools to manage my network, nothing manual.

Here's the netstat output:

tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN 1368/dnsmasq
tcp 0 0 192.168.1.34:53104 99.84.216.44:443 ESTABLISHED 15240/firefox
udp 0 0 127.0.1.1:53 0.0.0.0:* 1368/dnsmasq
udp 0 0 0.0.0.0:5353 0.0.0.0:* 1108/avahi-daemon:
udp6 0 0 :::5353 :::* 1108/avahi-daemon:
 
  


Reply

Tags
networking, printing, printing stopped



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Print-to-file print driver to print PDF Bill Fox Linux - General 3 05-02-2006 04:15 PM
HP PS7150: text doesn't print in OOO and Abiword!, but I can print test page & w MzFF gabba Mandriva 6 10-31-2005 11:10 AM
Can't print to Linksys print server joe k Linux - Newbie 3 12-07-2004 09:06 AM
Can't print to print server (RH8 + LPRng) ivanscheers Linux - Networking 1 10-08-2004 06:37 AM
can`t print the print jobs dansen Linux - Networking 0 12-20-2002 01:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:54 AM.

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