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


问题描述:
          在检查/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.
posted @   忱康  阅读(477)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
点击右上角即可分享
微信分享提示