samba getpeername failed. Error was Transport endpoint is not connected错误

来源:互联网 发布:希尔伯特曲线 python 编辑:程序博客网 时间:2024/04/29 23:06

问题描述:
          在检查/var/log/messages日志文件时发现如下错误:


                   smbd[15295]: getpeername failed. Error was Transport endpoint is not connected


解决方法:


           在/etc/samba/smb.conf配置文件中加入以下代码:
                smb ports=139


            重启smb服务
                 #service smb restart


          (PS: 如果看日志还出现以上错误,把 smb ports=139改成 smb ports=445试试)  


相关解释:


其实getpeername failed. Error was Transport endpoint is not connected算不上一个真正的错误。smb ports=139指定smb服务监听的端口号,默认情况下它同时监听139和445端口。windows XP 去连接的时候会两个端口都测试连接上去,最后又只选择其中一个端口使用而断开另外一个端口,所有smb认为是个错误而记录在案。


国外论坛上看到的一段话:
Those entries in log.smbd do not really indicate a problem. They are due to a windows XP machine on local area network which inquires on both ports 445 and 139. Ultimatley, windows XP only uses one of those ports and it disconnects from the other one, which leads to the samba log entry. The log entries can be eliminated by having samba only listen on one of the two ports, as long as your server is not a PDC (Primary Domain Controller)(which mine is). I read somewhere that having samba only listen on one of the ports can cause a reduction in performance.
0 0
原创粉丝点击