Bug 506574 - (samba-mounts) mount cifs fails: name/address mismatch
mount cifs fails: name/address mismatch
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
11
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Jeff Layton
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-17 15:37 EDT by g. artim
Modified: 2014-06-18 03:38 EDT (History)
8 users (show)

See Also:
Fixed In Version: 2.6.29.6-213.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-22 17:58:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
wireshark trace of lo (6.41 KB, text/plain)
2009-06-22 17:54 EDT, g. artim
no flags Details
patch -- fix port= mount option for cifs (1.17 KB, patch)
2009-06-23 09:14 EDT, Jeff Layton
no flags Details | Diff

  None (edit)
Description g. artim 2009-06-17 15:37:24 EDT
Description of problem:

if i try and mount a cifs file I get 

mount.cifs kernel mount options unc=//127.0.0.1\wally,pass=xxxxxx,ver=1,rw,username=wally,port=1139 
mount error(111): Connection refused
the server is fc10 the client is fc11

Version-Release number of selected component (if applicable):
server:
samba.x86_64                            3.2.11-0.30.fc10               installed
samba-client.x86_64                     3.2.11-0.30.fc10               installed
samba-common.x86_64                     3.2.11-0.30.fc10               installed
samba-winbind.x86_64                    3.2.11-0.30.fc10  

client:
samba-winbind3.3.2-0.33.fc11.x86_64                                                   samba-common3.3.2-0.33.fc11.x86_64                                                    samba-client-3.3.2-0.33.fc11.x86_64  

How reproducible:
ssh -L 1139:127.0.0.1:139 user@anyhost.com
sudo /bin/mount -v -t cifs //127.0.0.1/wally /home/wally/z -o username=wally,port=1139

results:

mount.cifs kernel mount options unc=//127.0.0.1\wally,pass=xxxxx,ver=1,rw,user=wally,port=1139 

mount.cifs kernel mount options unc=//127.0.0.1\wally,pass=xxxxx,ver=1,rw,user=wally,port=1139 

mount.cifs kernel mount options unc=//127.0.0.1\wally,pass=xxxxx,ver=1,rw,user=wally,port=1139 
mount error(111): Connection refused
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

if i do:
[wally@localhost ~]$ smbclient -L 127.0.0.1 -p 1139 --workgroup=MYGROUP
Enter wally's password: 
Domain=[GENEPI1] OS=[Unix] Server=[Samba 3.2.11-0.30.fc10]

	Sharename       Type      Comment
	---------       ----      -------
	IPC$            IPC       IPC Service (Samba Server)
	software        Disk      lab software
	share_genetics  Disk      lab stuff
	share_lab       Disk      lab stuff
	rm233           Printer   color printer
	rm209           Printer   hp1300n
	wally           Disk      Home Directories
Connection to 127.0.0.1 failed (Error NT_STATUS_CONNECTION_REFUSED)
NetBIOS over TCP disabled -- no workgroup available

and get a log like:


[2009/06/17 12:32:31,  0] lib/util_sock.c:matchname(1749)
  matchname: host name/address mismatch: ::ffff:127.0.0.1 != localhost.localdomain
[2009/06/17 12:32:31,  0] lib/util_sock.c:get_peer_name(1870)
  Matchname failed on localhost.localdomain ::ffff:127.0.0.1


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:


thanks for any help, I've spent much time trying to trouble shoot, I also 
tried running fc10's versions of samba-{common,client,winbind}, still no
work. I also tried disabling ipv6 at the module level, nada. I did verify
my tunnel using netcat and xeyes, both worked as expected. -- gary
Comment 1 g. artim 2009-06-18 12:05:48 EDT
when i try the mount I get prompted 3x for a passwd and each time it is rejected, because I'm tunneling thru ssh it useless to to a net trace.
Comment 2 Simo Sorce 2009-06-18 14:33:09 EDT
NT_STATUS_CONNECTION_REFUSED usually just means there is no listening daemon on the ip/port you are trying to connect to.
given smbclient succeedes it seem like mount.cifs is trying to connect to the wrong host or connecting to the wrong port.

You can check what's going on by taking a network trace of the local interface on the client or on the server
Use wireshark/tcpdump and listen on interface "lo"
Comment 3 g. artim 2009-06-18 14:44:01 EDT
ok, will do, I can't get to it asap, but early next week will response. This is a 'show stopper' for my environment -- should be for anyone tunneling ports. Without samba on the linux desktop I'll get lotsa complaints. I did tunnel ports 14000 (local) 14001 (remote) using nc (netcat) and worked fine. my guess is its mount.cifs.  thanks much for your help, will reply shortly! g.
Comment 4 g. artim 2009-06-22 17:54:04 EDT
Created attachment 349010 [details]
wireshark trace of lo

added simple text output from wireshark. Seems the mount.cifs never tries to go to 1139. let me need more detail. i noted that mount.cifs segfaults if you try running it directly. 

command executed: 

ssh -L 1139:127.0.0.1:139  waldo@somehost.com
sudo /bin/mount -v -t cifs -o port=1139,username=waldo,password=xxxxxxx //127.0.0.1/waldo     /home/waldo/z
Comment 5 g. artim 2009-06-22 19:06:27 EDT
smbclient -p 1139 //127.0.0.1/user

works, i get into the cifs shell or whatever.

mount.cifs still borken! -- g
Comment 6 Jeff Layton 2009-06-23 09:14:06 EDT
Created attachment 349091 [details]
patch -- fix port= mount option for cifs

This patch should fix it. Can you test it out and let me know whether it does?
Comment 7 g. artim 2009-06-23 12:34:05 EDT
thanks, will do. since its a fs/cifs patch I need to learn the fc/redhat methods of src updates/compiles of kernel -- i could do this with gentoo in a wink, but i know there's more to it with RH/fc. bare with me as i muddle along, but __hey__ thanks for find this for us!! -- g. -- should have feed back by Friday at the latest.
Comment 8 g. artim 2009-06-24 19:17:22 EDT
no go, same problem after patching and installing rpm kernel. did you get it to work? thanks much. maybe there is an easier way? ...

[wally@localhost ~]$ sudo /bin/mount -v -t cifs //127.0.0.1/wally /home/wally/z -o username=wally,port=1139
parsing options: rw,username=wally,port=1139
Password: 

mount.cifs kernel mount options unc=//127.0.0.1\wally,pass=abc123,ver=1,rw,username=wally,port=1139 

mount.cifs kernel mount options unc=//127.0.0.1\wally,pass=abc123,ver=1,rw,username=wally,port=1139 

mount.cifs kernel mount options unc=//127.0.0.1\wally,pass=abc123,ver=1,rw,username=wally,port=1139 
mount error(111): Connection refused
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
Comment 9 g. artim 2009-06-24 19:37:19 EDT
on attempts get these on console. the wireshark show no attempt to go to 1139 port. smbclient works.  

CIFS VFS: Error connecting to socket. Aborting operation
 CIFS VFS: cifs_mount failed w/return code = -111
 CIFS VFS: Error connecting to socket. Aborting operation
 CIFS VFS: cifs_mount failed w/return code = -111
 CIFS VFS: Error connecting to socket. Aborting operation
 CIFS VFS: cifs_mount failed w/return code = -111
 CIFS VFS: Error connecting to socket. Aborting operation
Comment 10 g. artim 2009-06-24 22:04:41 EDT
forget post #8/#9, i made an error and am retrying now. (be back)
Comment 11 g. artim 2009-06-24 22:59:29 EDT
ok, retested with the little change Jeff and it works! ha! 

blew off on disk the first time i tried building the kernel rpms and forgot
to re-apply the change and tested it without them.

re-did with patches and the mount flys,
 
*
*
One question, when/how will I know the patch has made it into the kernel?
*
*
cheers, thanks thanks thanks, Gary
Comment 12 Jeff Layton 2009-06-25 06:44:05 EDT
Steve French (the upstream CIFS maintainer) committed this into his tree last night. I expect that this patch will make 2.6.31.
Comment 13 Simo Sorce 2009-06-25 08:55:59 EDT
Ok, closing this bug as it is fixed upstream.
As soon as we have the new kernel including these patches in Fedora it will work automatically.
Comment 14 g. artim 2009-06-25 10:48:24 EDT
Ok, I'll wait and test with 2.6.31 ( cheers ).
Comment 15 Chuck Ebbert 2009-06-29 15:18:22 EDT
Please don't close F-11 bugs as soon as upstream patches are submitted. It will be many months until those patches would automatically get into f-11, if ever.
Comment 16 g. artim 2009-06-29 15:56:22 EDT
ok, sorry about that.
Comment 17 Chuck Ebbert 2009-06-29 16:04:13 EDT
Fixed in kernel-2.6.29.5-204
Comment 18 Fedora Update System 2009-07-08 08:14:06 EDT
kernel-2.6.29.6-213.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/kernel-2.6.29.6-213.fc11
Comment 19 Fedora Update System 2009-07-16 03:13:02 EDT
kernel-2.6.29.6-213.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update kernel'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-7617
Comment 20 Fedora Update System 2009-07-22 17:57:43 EDT
kernel-2.6.29.6-213.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.