Bug 506574 (samba-mounts)

Summary: mount cifs fails: name/address mismatch
Product: [Fedora] Fedora Reporter: g. artim <gartim>
Component: kernelAssignee: Jeff Layton <jlayton>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: gartim, gdeschner, itamar, jlayton, kernel-maint, quintela, ssorce, steved
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
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 21:58:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
wireshark trace of lo
none
patch -- fix port= mount option for cifs none

Description g. artim 2009-06-17 19:37:24 UTC
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
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 16:05:48 UTC
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 18:33:09 UTC
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 18:44:01 UTC
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 21:54:04 UTC
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
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 23:06:27 UTC
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 13:14:06 UTC
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 16:34:05 UTC
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 23:17:22 UTC
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 23:37:19 UTC
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-25 02:04:41 UTC
forget post #8/#9, i made an error and am retrying now. (be back)

Comment 11 g. artim 2009-06-25 02:59:29 UTC
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 10:44:05 UTC
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 12:55:59 UTC
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 14:48:24 UTC
Ok, I'll wait and test with 2.6.31 ( cheers ).

Comment 15 Chuck Ebbert 2009-06-29 19:18:22 UTC
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 19:56:22 UTC
ok, sorry about that.

Comment 17 Chuck Ebbert 2009-06-29 20:04:13 UTC
Fixed in kernel-2.6.29.5-204

Comment 18 Fedora Update System 2009-07-08 12:14:06 UTC
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 07:13:02 UTC
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 21:57:43 UTC
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.