Author Topic: Samba problem  (Read 2170 times)

Offline Nounouche

  • Jr. Member
  • **
  • Posts: 29
Samba problem
« on: May 03, 2010, 12:02:54 PM »
Hello everybody,

Since my PCLinuxOS 2010 KDE4 that replaced the 2009 edition, Samba client malfunctions. The browsing on NAS hard drives is very very slow, whereas in the 2009 edition it was working perfectly. I tried several things but no success.

I have theses logs about Samba in /var/log:
file:///var/log/samba/__ffff_127.0.0.1.log
file:///var/log/samba/__ffff_192.168.123.4.log
file:///var/log/samba/cores
file:///var/log/samba/localhost.local.log
file:///var/log/samba/log.nmbd
file:///var/log/samba/log.smbd
file:///var/log/samba/log.swat
file:///var/log/samba/log.wb-NAS-STORAGE
file:///var/log/samba/log.winbindd
file:///var/log/samba/nas-server.log
file:///var/log/samba/nas-storage.log
file:///var/log/samba/nmbd.log
file:///var/log/samba/smbd.log
file:///var/log/samba/winbindd.log

I don't know what to look there as far as error messages could be concerned...

Would someone have any suggestion ?
Thanks.

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1317
Re: Samba problem
« Reply #1 on: May 03, 2010, 02:05:05 PM »
It's not clear if you need tip's on packaging Samba, or you have a support question?

Packaging issues are delt with here :-)

I have hinted that I'll take a hard look at Samba. I just need a couple of rather large packages to be accepted to the repo first, but perhaps someone beats me to it and update Samba :-)

cheers,
MBantz

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Samba problem
« Reply #2 on: May 03, 2010, 02:15:42 PM »
Hi,

I sent him to the english forums, from the french forum, but he got lost in the way. Would someone put his thread in the General section please ?

MrBantz : he can't use Samba normally as he used to in last year's version.

(Would updating Samba solve this kind of problem ? Please, don't wait for being beaten ! :D )

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline ThirdOfSix

  • Hero Member
  • *****
  • Posts: 745
Re: Samba problem
« Reply #3 on: May 03, 2010, 02:30:12 PM »
Nounouche,

I have been fighting this problem since the first releases of kde4.

I have made posts about it under different headings while not knowing enough to figure out exactly what was happening.

Unfortunately, this only happens to those of us who are using particular NAS drives on a local network.

There do not seem to be many folks on the forum who fall into that category.

My latest understanding of what is happening is that the KIO-slave that is part of kde4 opens too many connections to samba shares and is very slow to close them.

Many NAS drives have a limit of 5 connections at any one time.

As soon as the system tries to open more, you get an error of "server timed out" or "can not open " or one of several other messages depending on how you reached that point.

To see if this is your problem, open Konsole and enter the command "netstat -plant -c".

Now, access your NAS drive and watch the number of connections made. It you are using one like my Hawking drives, the system will start giving errors as soon as you reach five connections.

Even shutting down Dolphin will not close the connections. You have to wait for them to time out and close.

Some of them will not time out as long as you remain in Dolphin.

Many will time out after about five minutes.

As an example, I can access my movie shares on the NAS drive. I am up to 4 connections by the time I get to the movie folder.

As soon as I click on a movie, it goes up to 5 and still needs to open one more for the media player so the player gives an error message and won't run.

If I just sit and watch the konsole  output from netstat, eventually some of the connections will disappear.

As soon as they do, I can click on a movie and it will play.

I went to the kde web site and searched on "too many connections" and found a number of posts on this issue as it relates to accessing FTP servers that restrict the number of connections made by a user.

The bottom line is that the developers are aware of the problem but have put it in a very low priority category.

Therefore, there is no telling if and when it will be fixed.

Yes, I know that they are talking about FTP servers and we are talking about Samba servers. But, it appears to be the same problem.

The first thing you should do is to go into the setup on your NAS drive and see if it allows you to set the maximum number of connections.

If so, upping it to at least 10 will probably solve a lot of your problem. Unfortunately, some units like two of mine have a maximum setting of 5 connection.

I have found several other things that help.

Go into Dolphin and disable the showing of the Information panel.

Also, disable preview.

Setting the NAS drive up with a static IP address makes a big difference.

If, by chance, you are trying to access multimedia files, Believe it or not, you can access them through Firefox.

You just type in smb://192.168.1.xx where the 192.168.1.xx is the actuall IP address of your NAS drive. It will allow you to navigate the file structure on the drive. When you click on a movie or other multimedia file, Firefox will play it using the mplayer plug-in.

This works even though you can not access and play the same file via dolphin.

If you look at the output of the netstat command while doing this, you will see that the access to the NAS drive is being made via some Gnome code rather than the kde code that dolphin trys to use.

This brings up the obvious that I have not yet tried. If you add the Gnome desktop to your install, you will probably be able to access the NAS drive with no problem.

Good luck.



Offline Nounouche

  • Jr. Member
  • **
  • Posts: 29
Re: Samba problem
« Reply #4 on: May 10, 2010, 05:36:43 AM »
Here is the error message!
May  7 07:42:47 localhost nmbd[3398]: [2010/05/07 07:42:47,  0] nmbd/nmbd_packets.c:1072(process_browse_packet)
May  7 07:42:47 localhost nmbd[3398]:   process_browse_packet: Discarding datagram from IP 192.168.123.10. Source name NAS-STORAGE<00> is one of our names !
May  7 07:43:45 localhost klogd: operapluginwrap[5007]: segfault at 662f3263 ip 662f3263 sp bfabc8dc error 4 in 20b58f14c9b581391d79ea335a81488a-le32d4.cache-3[b171c000+6000]
May  7 07:52:53 localhost nmbd[3398]: [2010/05/07 07:52:53,  0] nmbd/nmbd_packets.c:1072(process_browse_packet)
May  7 07:52:53 localhost nmbd[3398]:   process_browse_packet: Discarding datagram from IP 192.168.123.10. Source name NAS-STORAGE<00> is one of our names !

Daniel

Online muungwana

  • Hero Member
  • *****
  • Posts: 6199
Re: Samba problem
« Reply #5 on: May 10, 2010, 09:22:41 AM »

If the problem comes from kde kio-slave opening too many connections, why not accessing the shares outside of kde kio-slaves applications? like mounting the shares on the local file system using smb4k or pcc.

can you try to use smb4k and mount remote shares on the local file system and then access those shares through the mount? I found this method to be most reliable and consistent.

remote shares can be mounted using pcc but the process is a bit tedious and can be confusing.

.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline Nounouche

  • Jr. Member
  • **
  • Posts: 29
Re: Samba problem
« Reply #6 on: May 10, 2010, 10:39:17 PM »
Ok, I'll try smb4k and I inform you of the results  ;)

Daniel

Offline Nounouche

  • Jr. Member
  • **
  • Posts: 29
Re: Samba problem
« Reply #7 on: May 11, 2010, 04:06:02 AM »
How to make parameters and smb4k or save the files have installed ?
Daniel

Online muungwana

  • Hero Member
  • *****
  • Posts: 6199
Re: Samba problem
« Reply #8 on: May 11, 2010, 07:38:01 AM »
How to make parameters and smb4k or save the files have installed ?
Daniel
can you rephrase your question, i didnt get it
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline Nounouche

  • Jr. Member
  • **
  • Posts: 29
Re: Samba problem
« Reply #9 on: May 11, 2010, 07:48:37 AM »
When I reboot, I have no the partitions mounted with smb4k.
I must manually restart the parameterization. What I done wrong
Daniel

Offline cjs1949

  • Full Member
  • ***
  • Posts: 66
Re: Samba problem
« Reply #10 on: May 11, 2010, 07:58:33 AM »
Hmmm... I too have a samba client problem since loading 2010. The server is running PCLOS 2009.2 and can be seen happily by the Windows machines but my 2010 machine can see nothing, either thru Dolphin (or Konqueror) or by trying to mount it. Worked well under 2009

Online muungwana

  • Hero Member
  • *****
  • Posts: 6199
Re: Samba problem
« Reply #11 on: May 11, 2010, 08:08:04 AM »
When I reboot, I have no the partitions mounted with smb4k.
I must manually restart the parameterization. What I done wrong
Daniel

This is how smb4k works. You are supposed to start it up and mount shares folders manually when you want to access them and unmount when you are done.

There are ways to mount shared folder at boot time if you want but thats another problem.

Is your NAS still slow after you mount your shares through smb4k and access them through smb4k mount point?
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Online muungwana

  • Hero Member
  • *****
  • Posts: 6199
Re: Samba problem
« Reply #12 on: May 11, 2010, 08:09:29 AM »
Hmmm... I too have a samba client problem since loading 2010. The server is running PCLOS 2009.2 and can be seen happily by the Windows machines but my 2010 machine can see nothing, either thru Dolphin (or Konqueror) or by trying to mount it. Worked well under 2009

can you open another thread? Your problem is different from what is being discussed here and only one question is supposed to be discussed per thread
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline jlr1001

  • Full Member
  • ***
  • Posts: 116
    • Bent Pin Marketing & Entertainment
Re: Samba problem
« Reply #13 on: May 11, 2010, 02:04:52 PM »
Hey all,

I'm having a similar problem where if I mount and then browse my share via a terminal, things fly.  But if I try and use an app like Unison to backup my hard drive to the shared storage, or if I'm using gnucash and try to save my data to the smb share the transfer rate is slow as molasses.

I was searching around the other day and found this conversation:

http://www.unix.com/ip-networking/2534-samba-slow.html

For these people, there seems to have been some relief by changing the name resolve order (adding wins first), but I don't have the smb.conf file they're mentioning, so I don't know if this fix is applicable to us.



-JLR
Bent Pin Marketing & Entertainment
Narrative Marketing | Transmedia Storytelling

Offline ElCuervo

  • Hero Member
  • *****
  • Posts: 4148
  • I'm walking on sunshine!
Re: Samba problem
« Reply #14 on: May 11, 2010, 02:55:57 PM »
Hey all,

I'm having a similar problem where if I mount and then browse my share via a terminal, things fly.  But if I try and use an app like Unison to backup my hard drive to the shared storage, or if I'm using gnucash and try to save my data to the smb share the transfer rate is slow as molasses.

I was searching around the other day and found this conversation:

http://www.unix.com/ip-networking/2534-samba-slow.html

For these people, there seems to have been some relief by changing the name resolve order (adding wins first), but I don't have the smb.conf file they're mentioning, so I don't know if this fix is applicable to us.



-JLR
I think you probably have the same smb.conf file that I do:
Quote
# 7. Name Resolution Options:
    # All NetBIOS names must be resolved to IP Addresses
    # 'Name Resolve Order' allows the named resolution mechanism to be specified
    # the default order is "host lmhosts wins bcast". "host" means use the unix
    # system gethostbyname() function call that will use either /etc/hosts OR
    # DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
    # and the /etc/resolv.conf file. "host" therefore is system configuration
    # dependant. This parameter is most often of use to prevent DNS lookups
    # in order to resolve NetBIOS names to IP Addresses. Use with care!
    # The example below excludes use of name resolution for machines that are NOT
    # on the local network segment
    # - OR - are not deliberately to be known via lmhosts or via WINS.
    # name resolve order = wins lmhosts bcast

FWIW, even though my name resolve order is commented out, I have no speed issues connecting via samba to both Win7 and PCLinuxOS machines.
"If there were no change, there would be no butterflies" - Walt Disney

http://linuxcounter.net/cert/433721.png