Posts Tagged ‘networking’

Ubuntu keeps sending DNS queries to daisy

12 December 2014 Leave a comment

Recently I noticed that my Linux desktop (Ubuntu 14.04.1 LTS)  sends a DNS query to about every 8 seconds. I do not want that, so I did some googling. Turns out that it is a known issue for more than 2 years.

What is happening

A service called whoopsie is actively doing those repeated queries to check if your system is on-line. A misconfiguration in the combination of network manager and dnsmask makes the query to always go to the internet instead of caching the query result for some time. There are several workarounds that stop this, see e.g.

On my desktop computer, I have statically configured my network, so it is not that useful to have the network manager active. I decided to permanently stop this service.

sudo -s
initctl stop network-manager
echo 'manual' > /etc/init/network-manager.override

That should make the query seems less often, it should prevent disabling caching. Unfortunately I see the queries as much as before. So, even as I do see some usefulness in reporting errors, the error reporting should only go on-line after I allow it to go on-line, and not every few seconds, so whoopsie has to go..

Removing whoopsie

The solution to this constant DNS traffic is to switch-off whoopsie. I decided that uninstalling it was the easiest way, and you can undo it by installing it again. So uninstall it, like this:

sudo dpkg --remove whoopsie

After that, no DNS queries to anymore!

Categories: Linux Tags: , ,

Linux Samba with CIFS and Windows Home Server

7 October 2012 Leave a comment

Last year I experimented with a borrowed NAS  and wanted to use it as a backup for my windows home server. At home most of my computers run linux and I wanted to map those shares automatic on my main desktop. Not wanting to re-invent a wheel again, I did a google search and found this:

So I needed to put the following lines in  /etc/fstab, or for testing, something similar after the sudo mount command

my Nas (all on the same line):
//nas/data /media/nas cifs credentials=/root/.naslogin, rw,iocharset=utf8,dir_mode=0777,file_mode=0777 0 0

My Homeserver (all on the same line):
//whs/ebooks /media/whs/ebooks cifs credentials=/root/.whslogin, rw,iocharset=utf8,dir_mode=0777,file_mode=0777 0 0

This worked for my NAS but not for my windows home server.  Mounting the share from the home server  failed . It just trow an error: “mount error(5): Input/output error“, that pointed to the right solution. NOT!

After some searching, I found the reason. I was not using the netbios name for the windows server, but an alias.

What happened.

Mounting the share failed because windows refused the connection. The internal netbios name of my home server did not match the name in the mount command.

Remember that for windows, the computer name is also the netbios name, and the home server is running Windows Home Server (i.e. Windows 2003). I decided to have a dns name for my home server different than the internal computer name, so there was a mismatch.

Once I knew the cause, the solution to this was easy. Just use the same computer name as the computer thinks it has, and not something else 🙂 even through that other name resolves to the same computer. After adding the netbios name of my home server to the hosts file on linux and using the netbios name in the mount command, it worked.

sudo mount -t cifs //roheve/ebooks /media/whs/ebooks -o credentials=/root/.whslogin,iocharset=utf8,dir_mode=0777,file_mode=0777,nounix

And now it ‘just works’.

PS: I need to remember these to (copy_n_paste is easy)

sudo mount -t cifs //sw-hy1.testlab.local/c$/data /media/testlab/hy1 -o credentials=/root/.testlab,iocharset=utf8,dir_mode=0777,file_mode=0777,nounix

sudo mount -t cifs //sw-hy2.testlab.local/data /media/testlab/hy2 -o credentials=/root/.testlab,iocharset=utf8,dir_mode=0777,file_mode=0777,nounix

Categories: Linux, Windows Tags: , , ,