Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cifs: Dealing w/mount error(115): Operation now in progress
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message

Joined: 30 Aug 2002
Posts: 918
Location: US-FL-EST

PostPosted: Thu Jun 07, 2012 11:18 pm    Post subject: cifs: Dealing w/mount error(115): Operation now in progress Reply with quote

I post this tip and its associated observations in the spirit that people trying to solve this problem will find it both helpful and enlightening.

Here is the background scenario:
  • You have a Windows based file share you want to access. This particular example uses WinXP Home as the server.
  • You have a Linux based PC with Samba installed which is your client.
  • You want to use cifs to attach the Windows based file share to your Linux based client.
The message: "mount error(115): Operation now in progress" indicates a failure to attach a Windows based file share using Samba. The following example is typical:
# mount -t cifs // /mnt/sweet.softare
mount error(115): Operation now in progress
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

First, let's make some things clear. If you've received this message, then the following is probably true:
  • Samba is properly installed on your client PC.
  • Your Samba configuration settings are probably correct.
  • Your Windows host network settings are probably correct.
  • The Windows based file share is visible and reachable from your client PC.
  • You cannot connect to the shared printer you know is out there.
As far as I can tell, you only get this message if Samba 'sees' the share you want but cannot connect to it.

Edit: Point of clarification - In the examples below, you'll notice I use a domain name of 'lamasondufeu'. I always make use of a domain name on mixed networks in order to enforce Windows Workgroup naming consistency. By default, Samba will use the domain name of the computer it's running on as the 'Windows Workgroup' unless you explicitly provide one in smb.conf. Also by default, WinXP always uses 'workgroup' as it's value for 'Windows Workgroup'.

All computers which expect to talk to each other using Windows {cifs based} networking need to either be in the same Workgroup or you need to explicitly which workgroups they are allowed to talk to. Selecting a specific domain name for your network and using that as your Windows Workgroup name makes mixed networks much easier to adminster. Also, it's considered bad security practice to leave the Windows Workgroup name at it's default value so this is something you want to change anyway.

It's always good policy on multi-computer local networks to pick your own domain name and stick with it for that local network. End Edit

Before we run any diagnostics, we can see one immediate problem. Note the prompt for 'Password:'.

First tip: WinXP Home has no support for password based file shares. Password based file shares are optional for WinXP Professional. In the Windows world, all simple file shares assume there are no username/password pairs. Therefore, the above command was incorrect.

When trying to attach any simple Windows based file shares, you need to add '-o guest' to the mount command. Simple in this case means no password restricted file shares which means no user authentication of any kind. Repeat: All WinXP Home based file share are simple. Most home users of WinXP Professional will also be using simple file shares as will Win 7 users whose file shares are set in WinXP compatibility mode.

The above command should look more like this:
# mount.cifs --verbose -o "guest,domain=lamasondufu" // /mnt/sweet.softare
mount.cifs kernel mount options: ip=,unc=\\\Software,guest,ver=1,user=,domain=lamasondufu,pass=********
mount error(115): Operation now in progress
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

This command also failed but we were no longer prompted for 'Password'. Yeah! First problem resolved.

To head off a possible point of confusion, please note that mount -t cifs and mount.cifs are the exactly equivalent. All these examples are cut and pasted from real life.

The first diagnostic we need to run is smbtree. This will confirm everything that's actually visible on the network from Samba's point of view. The results should prove:
  • You have Samba correctly installed.
  • What file shares/printers are available for you to attach.
Do not run this diagnostic tool on a network with a lot of PCs. The options you should use are:
  -b, --broadcast                    Use broadcast instead of using the master browser
  -N, --no-pass                      Don't ask for a password
These options will run smbtree without the need or confusion to determine who the 'master browser' is and restrict the output to simple shares (no password) only.

The following is a typical example from my home network:
# smbtree -b -N
        \\SWEET                         Mumzie MS
                \\SWEET\CanonMX3        Canon MX360 series Printer
                \\SWEET\print$          Printer Drivers
                \\SWEET\IPC$            Remote IPC
        \\SLIZARD                       Samba 3.6.5
                \\SLIZARD\HP_PhotoSmart_P1000   HP PhotoSmart P1000
                \\SLIZARD\IPC$                  IPC Service (Samba 3.6.5)
                \\SLIZARD\print$                Printer Drivers
        \\PYROTEKK                      Samba 3.6.5
                \\PYROTEKK\IPC$                 IPC Service (Samba 3.6.5)
        \\PYRODYNO                      Samba 3.6.5
                \\PYRODYNO\IPC$                 IPC Service (Samba 3.6.5)

If you're on a network with more than a handful of computers, this listing can be quite long. Instead of running smbtree, you can run nmblookup. To run this command, you need an additional bit of information. That information is the IP address of the computer which hosts the file share you want to attach. As you can see from the above mount command, I have this information. There are one option you'll want to use:
  -A, --lookup-by-ip                     Do a node status on <name> as an IP Address

This option reduces all the actions needed to perform the query to the barest minimum possible. This is an important point with implications I'll address further down.

Here is a typical example of the query:
# nmblookup -A
Looking up status of
        SWEET           <00> -         M <ACTIVE>
        LAMASONDUFEU    <00> - <GROUP> M <ACTIVE>
        SWEET           <20> -         M <ACTIVE>
        LAMASONDUFEU    <1e> - <GROUP> M <ACTIVE>

        MAC Address = 00-16-76-78-E4-4F

The results show us two things:
  • We have Samba properly installed.
  • The file share host is visible on our network.
Now that we've verified Samba is working and that the host is visible, we're ready to take the next diagnostic step. From both the smbtree and nmblookup commands, we know the Windows name of the host computer is SWEET. We therefore try our mount command using SWEET instead of
# mount.cifs --verbose -o "guest,domain=lamasondufu" //SWEET/Software /mnt/sweet.softare
mount error: could not resolve address for SWEET: Unknown error

Second Tip: When one computer can't find another computer by name, then we always punt. In this case, punting means to explicitly set up an entry in our local client's /etc/hosts file for the target share server:
# echo "   SWEET           sweet           sweet.lamasondufeu" >> /etc/hosts

We do this so that we rely upon only our local client and the target share host to establish a connection. It's part of the bog standard diagnostic process to reduce number of possible failed components to the minimum needed.

Now, we try our mount command again:
# mount.cifs --verbose -o guest //SWEET/Software /mnt/sweet.softare
mount.cifs kernel mount options: ip=,unc=\\SWEET\Software,guest,ver=1,user=,pass=********
# df -h
Filesystem                Size  Used Avail Use% Mounted on
rootfs                    369G  299G   52G  86% /
/dev/root                 369G  299G   52G  86% /
devtmpfs                  3.7G     0  3.7G   0% /dev
tmpfs                     3.7G  436K  3.7G   1% /run
shm                       3.7G  724K  3.7G   1% /dev/shm
/dev/sda1                  31M  6.5M   23M  23% /boot
/dev/sdb1                 931G  910G   21G  98% /home
/dev/sda4                 559G  553G  4.2G 100% /pub00
/dev/sdc1                 1.9T  1.8T   39G  98% /pub01
/dev/sdd1                 1.9T  1.8T   34G  99% /pub02
/dev/loop0                9.4G  9.4G     0 100% /mnt/newsf
/dev/sde1                 931G  899G   32G  97% /pubu01
/dev/sdf1                 1.9T  1.8T   20G  99% /pubu02
/dev/sdi1                 1.4T  1.4T   21G  99% /pubu03
/dev/sdj1                 1.9T  1.8T   20G  99% /pubu04
/dev/sdg1                 1.9T  1.8T   40G  98% /pubu05
/dev/sdh1                 1.4T  1.4T   16G  99% /pubu06       234G  231G  2.9G  99% /mnt/slizard/home    234G   85G  149G  37% /mnt/slizard/library      931G  913G   17G  99% /mnt/slizard/pub01      931G  896G   36G  97% /mnt/slizard/pub02      931G  894G   38G  96% /mnt/slizard/pub03      931G  909G   23G  98% /mnt/slizard/pub04    230G  177G   42G  81% /mnt/slizard/pubroot       179G  101G   69G  60% /mnt/pyrotekk/home      931G  860G   71G  93% /mnt/pyrotekk/pub01     1.2T  1.1T   73G  94% /mnt/pyrotekk/public    179G  101G   69G  60% /mnt/pyrotekk/pubroot  1.4T  1.4T   63G  96% /mnt/pyrotekk/temp1  1.4T  1.4T   39G  98% /mnt/pyrotekk/temp2
//SWEET/Software           53G   18G   36G  34% /mnt/sweet.softare

Success!! We can now access file shares and printer shares on the target host computer.

This is not the ideal solution. Rather the 'name' of the target share host and its associated IP address is supposed to be already available on our network. Moreover, this is supposed to happen automatically.

  • In this case SWEET (as can be seen from the nmblookup results) is the wins master browser on my local network. Yet no name/address association was available. I have had problems in the past with the wins master browser service in mixed environments. Crap happens. I should probably force configure the samba daemon on my internal network's server (SLIZARD) to be wins master browser.

  • In home networks which use an off the shelf router to connect to the internet, it is my personal observation that local name resolution may not happen. The default configuration of the OTS router is to support DNS service pass through for queries outside of the local lan.

  • As far as I've experienced, all distributions perform minimalist configuration installations. This means that these minimal configuration settings may assume working services that are not actually working such as a working wins or dns service.

  • Because of things like local caching (share name and IP being retained across reboots over time), it is possible for one client PC to have no problem with making a share connection while another either loses that ability or is never able to attach the share. Don't make the mistake of saying one PC is broken because another PC is still works.

  • In fact, said cached information can be lost due to simply performing an upgrade. It's not that the updated programs are broken. Instead, all the cached values are cleared during the upgrade. If your wins master browser is not working properly, then your wins resolution will never happen.

  • Depending on which machine on your network is the wins master browser and the version of Windows it's running, the strategy employed to refresh the wins master browser cache can range from stupid to really, really stupid. It is my understanding that after a wins master browser first initializes it's cache, it won't walk the local network again looking for new additions. Rather, it expects new additions to the local network to essentially add themselves.

  • Name resolution goes through a descending hierarchy of protocols. The last resort bottom name resolution protocol simply checks the /etc/hosts file. In theory however, explicitly specifying an IP address is supposed to always work too. I'm still surprised that my original mount command did not work. On the other hand, the added entry to the /etc/hosts file did work.

  • In my research for my issue, I encountered another known class of problems which can cause a mount error(115): Operation now in progress message. This is when the same nic (on the target share host) might be using more than one IP address. There are numerous valid circumstances for this including setting up virtual networks and the ability to add USB drives to routers for direct availability of said drives over a local network. In essence, the wins resolver associates the desired name with the wrong IP address.

The bottom line is that if you see a mount error(115): Operation now in progress message when trying to mount any cifs based network share, you most likely have a name resolution problem. Your equipment, software and physical connections are probably all fine. I re-iterate: Don't simply assume your equipment is broken or an upgrade was faulty or even that your configuration may be incorrect. Things may actually be working as designed.

In my example, lack of an internally available DNS combined with a stupid wins master browser are the root cause.

This episode has enhanced my motivation to build (re-purpose) a custom router again with a proper DNS as well as forcing it to be th wins master browser.

Further Readings

Threads which may be of interest in terms of the above discussion and hindsight perspective:

Samba Oddities
cifs-utils: Windows share cannot be mounted anymore after dist-upgrade
Mount Error
Error -115 when mounting share (cifs)
Mounting a Windows computer with two IP addresses
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message

Joined: 04 Sep 2013
Posts: 1

PostPosted: Wed Sep 04, 2013 10:45 pm    Post subject: Thanks! Reply with quote

I just wanted to add a brief note to firstly say thanks for the awesome tutorial

I was stumped by this issue for a while, but it turned out in my case that the issue was that there was no return route from the remote server (with the network share) back to the box I was trying to map it from. Adding a static route by running a single command on the server fixed the issue. Check out for an example of how to do this on windows.
Back to top
View user's profile Send private message

Joined: 26 Apr 2006
Posts: 733

PostPosted: Mon Jan 17, 2022 8:43 pm    Post subject: Reply with quote

In linux (both on client and server), I got this because I hadn't set the address of my server in /etc/hosts.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum