rsync?常见错误与解决方法整理服务器其它

在rsyncd.log里面或.err文件里面,大家可以用记事本打开查看。

注意windows下面我们需要给SvcwRsync用户,管理同步目录的所有权限,基本上这样就可以了,如果前期没有加权限,而且目录文件已经很多了,建议直接将SvcwRsync设置管理员即可。但这样会有一些安全风险,最好限制用户登陆。

错误1:rsync:readerror:Connectionresetbypeer(104)rsyncerror:errorinrsyncprotocoldatastream(code12)atio.c(794)[receiver=3.0.2]解决:很大可能是服务器端没有开启rsync服务,一般开启服务即可。或者开启了防火墙指定的端口873无法访问或者机房拦截源ip。

错误2:@ERROR:chdirfailedrsyncerror:errorstartingclient-serverprotocol(code5)atmain.c(1495)[receiver=3.0.2]解决:服务器端同步目录没有权限,cwrsync默认用户是Svcwrsync。为同步目录添加用户Svcwrsync权限。

错误3:@ERROR:failedtoopenlockfilersyncerror:errorstartingclient-serverprotocol(code5)atmain.c(1495)[receiver=3.0.2]解决:服务器端配置文件rsyncd.conf中添加lockfile=rsyncd.lock即可解决。

错误4:@ERROR:invaliduidnobodyrsyncerror:errorstartingclient-serverprotocol(code5)atmain.c(1506)[Receiver=3.0.2]解决:在rsyncd.conf文件中添加下面两行即可解决问题UID=0GID=0

错误5:@ERROR:authfailedonmoduletest2rsyncerror:errorstartingclient-serverprotocol(code5)atmain.c(1296)[receiver=3.0.2]解决:服务端没有指定正确的secretsfile,请在[test2]配置段添加如下配置行:authusers=coldstar#同步使用的帐号secretsfile=rsyncd.secrets#密码文件

错误6:passwordfilemustnotbeother-accessible解决:客户端的pass文件要求权限为600,chmod600/etc/rsync.pass即可。

错误7:rsync:chdir/cygdrive/c/workfailed:Nosuchfileordirectory(2)

解决:服务器端同步文件夹路径或名称写错了,检查path。

一些服务自动停止,如果它们没有什么可做的,例如“性能日志和警报”服务。”

解决方法:将安装目录下的rsyncd.pid文件删除,再重新启动RsyncServer服务。一般是异常关机导致的。

或者通过计划任务定时执行这个bat就可以自动开启rsync服务了

@echoofffor/f"usebackq"%%iin(`"tasklist|find/c"cygrunsrv.exe""`)do(setchkstat=%%i)if%chkstat%==0(del"e:\ProgramFiles(x86)\ICW\rsyncd.pid"/fnetstartRsyncServerecho================>>rsync%date:~0,10%.logecho%date%%time%checkrsyncservicestop>>rsync%date:~0,10%.logechorestartrsyncservice!>>rsync%date:~0,10%.logecho================>>rsync%date:~0,10%.log)如果日志文件过大会导致同步慢等问题,大家可以用下面的批处理

原理就是先判断服务器是不是正常运行,运行的时候停止服务,然后将日志与pid文件删除,再重新启动即可,一般几天一次就可以了。

问题5:网络收集问题1、权限问题类似如下的提示:rsync:opendir"/kexue"(indtsChannel)failed:Permissiondenied(13)注意查看同步的目录权限是否为7552、timeoutrsync:failedtoconnectto203.100.192.66:Connectiontimedout(110)rsyncerror:errorinsocketIO(code10)atclientserver.c(124)[receiver=3.0.5]检查服务器的端口netstat–tunlp,远程telnet测试。可能因为客户端或者服务端的防火墙开启导致无法通信,可以设置规则放行rsync(873端口)或者直接关闭防火墙。还有一种在同步过程中可能会提示没有权限(将同步目录加上SvcwRsync全部权限即可,更简单的方法就是将SvcwRsync设为管理员即可)

3、服务未启动rsync:failedtoconnectto10.10.10.170:Connectionrefused(111)rsyncerror:errorinsocketIO(code10)atclientserver.c(124)[receiver=3.0.5]启动服务:rsync--daemon--config=/etc/rsyncd.conf

4、磁盘空间满rsync:recv_generator:mkdir"/teacherclubBackup/rsync……"failed:Nospaceleftondevice(28)***Skippinganycontentsfromthisfaileddirectory***

5、Ctrl+C或者大量文件

rsyncerror:receivedSIGINT,SIGTERM,orSIGHUP(code20)atrsync.c(544)[receiver=3.0.5]rsyncerror:receivedSIGINT,SIGTERM,orSIGHUP(code20)atrsync.c(544)[generator=3.0.5]

说明:导致此问题多半是服务端服务没有被正常启动,到服务器上去查查服务是否有启动,然后查看下/var/run/rsync.pid文件是否存在,最干脆的方法是杀死已经启动了服务,然后再次启动服务或者让脚本加入系统启动服务级别然后shutdown-rnow服务器

6、xnetid启动rsync:readerror:Connectionresetbypeer(104)rsyncerror:errorinrsyncprotocoldatastream(code12)atio.c(759)[receiver=3.0.5]查看rsync日志rsync:unabletoopenconfigurationfile"/etc/rsyncd.conf":Nosuchfileordirectoryxnetid查找的配置文件位置默认是/etc下,根据具体情况创建软链接。例如:ln-s/etc/rsyncd/rsyncd.conf/etc/rsyncd.conf或者更改指定默认的配置文件路径,在/etc/xinetd.d/rsync配置文件中。

Rsyncconfigure:配置一:ignoreerrors说明:这个选项最好加上,否则再很多crontab的时候往往发生错误你也未可知,因为你不可能天天去看每时每刻去看log,不加上这个出现错误的几率相对会很高,因为任何大点的项目和系统,磁盘IO都是一个瓶颈Rsyncerror:错误一:@ERROR:authfailedonmodulexxxxxrsync:connectionunexpectedlyclosed(90bytesreadsofar)rsyncerror:errorinrsyncprotocoldatastream(code12)atio.c(150)说明:这是因为密码设置错了,无法登入成功,检查一下rsync.pwd,看客服是否匹配。还有服务器端没启动rsync服务也会出现这种情况。

错误二:passwordfilemustnotbeother-accessiblecontinuingwithoutpasswordfilePassword:说明:这是因为rsyncd.pwdrsyncd.sec的权限不对,应该设置为600。如:chmod600rsyncd.pwd

错误三:@ERROR:chrootfailedrsync:connectionunexpectedlyclosed(75bytesreadsofar)rsyncerror:errorinrsyncprotocoldatastream(code12)atio.c(150)说明:这是因为你在rsync.conf中设置的path路径不存在,要新建目录才能开启同步

错误四:rsync:failedtoconnectto218.107.243.2:Noroutetohost(113)rsyncerror:errorinsocketIO(code10)atclientserver.c(104)[receiver=2.6.9]说明:防火墙问题导致,这个最好先彻底关闭防火墙,排错的基本法就是这样,无论是S还是C,还有ignoreerrors选项问题也会导致错误五:@ERROR:accessdeniedtowwwfromunknown(192.168.1.123)rsync:connectionunexpectedlyclosed(0bytesreceivedsofar)[receiver]rsyncerror:errorinrsyncprotocoldatastream(code12)atio.c(359)说明:此问题很明显,是配置选项hostallow的问题,初学者喜欢一个允许段做成一个配置,然后模块又是同一个,致使导致

错误六:rsyncerror:receivedSIGINT,SIGTERM,orSIGHUP(code20)atrsync.c(244)[generator=2.6.9]rsyncerror:receivedSIGUSR1(code19)atmain.c(1182)[receiver=2.6.9]说明:导致此问题多半是服务端服务没有被正常启动,到服务器上去查查服务是否有启动,然后查看下/var/run/rsync.pid文件是否存在,最干脆的方法是杀死已经启动了服务,然后再次启动服务或者让脚本加入系统启动服务级别然后shutdown-rnow服务器

错误七:rsync:readerror:Connectionresetbypeer(104)rsyncerror:errorinrsyncprotocoldatastream(code12)atio.c(604)[sender=2.6.9]说明:原数据目录里没有数据存在

由于我们经常使用rsync进行服务器文件的同步工作,但在配置过程中,会出现很多问题,下面的错误基本上都是通过客户端返回的错误进行分析。

另外查找错误过程中也学到了一个查看错误的方法-查看系统日志,我们操作的每步都会在日志上有说明,有时候报错看不懂,日志上都写的清清楚楚。

命令:cat/var/log/messages

问题一:

@ERROR:authfailedonmodulebachuprsyncerror:errorstartingclient-serverprotocol(code5)atmain.c(1522)[receiver=3.0.3]

原因:服务器端该模块(backup)需要验证用户名密码,但客户端没有提供正确的用户名密码,认证失败。提供正确的用户名密码解决此问题。这个问题比较蠢,如果可能你和我一样明明在模块里写了密码文件,怎么都不通,这个时候我劝你先检查一下所写模块中是不是和下图一样。比如,某处多了个s。

问题二:110错误-timeout

rsync:failedtoconnectto203.100.192.66:Connectiontimedout(110)rsyncerror:errorinsocketIO(code10)atclientserver.c(124)[receiver=3.0.5]

原因:

检查服务器的端口netstat–tunlp,远程telnet测试。可能因为客户端或者服务端的防火墙开启导致无法通信,可以设置规则放行rsync(873端口)或者直接关闭防火墙。在这里博主是重启过服务器,然后就报110了,直接开启rsync服务就行。

命令:servicersyncdstart

问题三:113错误-防火墙rsync:failedtoconnectto218.107.243.2:Noroutetohost(113)rsyncerror:errorinsocketIO(code10)atclientserver.c(104)[receiver=2.6.9]原因:防火墙问题导致,这个很简单,关闭防火墙就可以。不过博主还是被困在这里几个小时,因为linux防火墙分两种:

-iptable和-firewall认识到这个问题首先查看系统的防火墙种类,查看防火墙状态即可serviceiptablestatusfirewall-cmd--state

确定防火墙种类后再按对应方法将防火墙关闭即可。

问题四:1516错误

@ERROR:authfailedonmodulebackuprsyncerror:errorstartingclient-serverprotocol(code5)atmain.c(1516)[Receiver=3.0.9]

解决:这个问题错误差别很大,可查看系统日志查看错误,再搜索解决方法。

THE END
1.长连接服务tcp连接断连问题我司最近一长连接服务(该服务是接收合作企业的设备采集数据)频繁出现断连问题。 从监控显示,这周已经出现过三次,发生的时间点分别是: 2024-11-18 14:00 2024-11-19 14:36 2024-11-20 04:45 image.png 对方反馈,之前偶尔出现断连,代码层面出现 socket read timed out 或者 connect timed out 异常。 最近https://www.jianshu.com/p/e7c11676190f
2.[fix]修复客户端在服务端挂掉后的处理逻辑·PullRequest!841The PR is not associated with any Issue, Please associate the PR with one Issue before trigger build. 表态 回复 gaozhichao 关联了 openharmony/time_time_service Issue IB6Y8Z 11月25日 20:35 gaozhichao 成员 11月25日 20:35 start build 表态 回复 openharmony_ci 成员 11月25日 20:35 https://gitee.com/openharmony/time_time_service/pulls/841
3.coredumpto/usr/lib/systemd/systemdcoredumppipfailed返回值为0表禁用功能,则不会产生coredum文件。ulimit -c unlimited暂时开启 #ulimit -c unlimited --- 限制coredump产生: #vim /etc/profile #半永久 #尾部追加 #ulimit -c unlimited #无限制,其他限制用数字表示k。 ulimit -c 1024 ***#vim /etc/security/limits.conf #永久https://blog.csdn.net/2401_84008551/article/details/144081592
4.Java网络编程:如何处理TCP连接异常System.out.println("Error occurred: "+e.getMessage()); e.printStackTrace(); } 诊断和识别异常: 确定是由于网络问题(如断开连接、防火墙限制等)还是客户端代码错误导致的异常。 适当地响应异常: 对于某些可以预知的异常,例如已关闭的Socket,可以提供相应的提示信息而不是抛出异常。 https://dandelioncloud.cn/article/details/1862613764344512514
5.wiresharkincorrectmob64ca13f53d41的技术博客char const* rtcpmuxLine = fMultiplexRTCPWithRTP ? "a=rtcp-mux\r\n" : ""; char const* rangeLine = rangeSDPLine(); char const* auxSDPLine = getAuxSDPLine(rtpSink, inputSource); if (auxSDPLine == NULL) auxSDPLine = ""; https://blog.51cto.com/u_16213571/12701717
6.RecipeTerminatedwithFatalError:Spawn·Issue#503is in, and only the latest two (Recipe terminated with error) when you take the ! out and leave the spaces in. It certainly seems like the magic comment does have something to do with this error, but I think something else might be going on in the background as well. In all instanchttps://github.com/James-Yu/LaTeX-Workshop/issues/503
7.请问用VSC编译时显示“Recipeterminatedwitherror.”的解决请问用VSC编译时显示“Recipe terminated with error.”的解决方法?发布于 2021-06-17 11:26:37 每一次在VSC里编译都出现问题:去查询类似问题,已经弄好了环境变量,且文件名和地址非中文。还是没效果。json代码如下 查看更多关注者 0 被浏览 14.4k https://ask.latexstudio.net/ask/question/3564.html
8.zliberrorutil/zbin.c:7:18: fatal error: lzma.h: No such file or directory #include <lzma.h> ^ compilation terminated. Makefile.housekeeping:1294: recipe for target 'util/zbin' failed make: *** [util/zbin] Error 1 -end quote I have all the required dependencies installed and I am trying http://forum.ipxe.org/showthread.php?tid=7730
9.railsmigration[gitlabLoading Cinc Auditor profile files: Loading Cinc Auditor input files: Loading Cinc Auditor waiver files: Recipe: gitlab::default * directory[/etc/gitlab] action create (up to date) [2022-07-22T19:47:45+02:00] WARN: Selected systemd because /run/systemd/system/ exists /opt/gitlab/https://gitlab.com/gitlab-org/gitlab/-/issues/368631
10.Fatalerror:CalltoundefinedfunctionfieldattachWhen running D7 install it breaks out with an error on front-end saying AJAX load error: An AJAX HTTP request terminated abnormally. Debugging information follows. Path: http://localhost/drupal-7.x-dev/install.php?q=install.php&profile=minima This is browser independent, at least I triehttps://www.drupal.org/node/481758
11.Steamworks.P2PSessionErrorP2PSessionError.NotRunningApp1 P2PSessionError.NoRightsToApp2 P2PSessionError.DestinationNotLoggedIn3 P2PSessionError.Timeout4 P2PSessionError.Max5 Getting Started3 About Facepunch.Steamworks Frequently Asked Questions Setting Up Installing1 Installing For Unity https://wiki.facepunch.com/steamworks/P2PSessionError
12.recipeterminatedwithfatalerror:spawnlatexmkenoent例如:\usepackage{fontspec}[< font path >]。这将告诉LaTeX系统去查找指定的字体文件。 总的来说,当遇到“recipe terminated with fatal error: spawn latexmk enoent”的错误时,我们需要仔细检查LaTeX文件中的字体配置,并根据实际情况采取相应的措施来解决问题。通过以上方法,相信你应该能够顺利解决这个问题。https://www.imooc.com/article/343644
13.配置VScode+Latex(Recipeterminatedwithfatalerror:spawn配置VScode+Latex (Recipe terminated with fatal error: spawn xelatex ENOENT),程序员大本营,技术文章内容聚合第一站。https://www.pianshen.com/article/66961308137/
14.MechanicallyDiverseGelswithEqualSolventContentACSTo validate the concept ofGgelvariation at constantQeq, we synthesize a library of brush elastomers with systematically varied [nsc,ng,nx] combinationsGgelis not reported for fragile gels due to large error. Even though knowing the architectural parameters is vital for understanding molecular mechahttps://pubs.acs.org/doi/10.1021/acscentsci.2c00472
15.Solved:SRCREV="${AUTOREV}"ErrorinNXPYoctoRev.LF5.15I got a related problem with nxp-demo-experience repo. If you looked at demo-experience-demo.bb recipe you can see SRCREV_model = "${AUTOREV}". If you have a network issue or you tried to building offline, this recipe is trying to access githun page and you chttp://community.nxp.com/t5/i-MX-Processors/SRCREV-quot-AUTOREV-quot-Error-in-NXP-Yocto-Rev-LF5-15-52-2-1-0/td-p/1562439
16.IntroductiontoExperimentalQuantumMeasurementwithIntroduction to Experimental Quantum Measurement with Superconducting Qubits Mahdi Naghiloo, Murch Lab Washington University in St. Louis, April 2019 Abstract—Quantum technology has been rapidly growing due to its potential revolutionary applications. In particular, superconducting qubits provide a strong http://arxiv.org/pdf/1904.09291v1
17.error#5078:Unrecognizedtoken'?'skippedI have taken one function from press numerical recipees and milenko@milenkons:~/pauel$ ifort -c assert_eq.f90 assert_eq.f90(10): error #5078:https://community.intel.com/t5/Intel-Fortran-Compiler/error-5078-Unrecognized-token-skipped/m-p/759847
18.[Bugc/69866]New:lto1:internalcompilererror:inaddterminated. /files/work/acr/wip_elibos/elibos_toolchains/gcc-arm/gcc-arm-none-eabi-5.3.0-a/bin/../lib/gcc/arm-none-eabi/5.3.0/../../error: lto-wrapper failed collect2: error: ld returned 1 exit status ../../../os/common/ports/ARMCMx/compilers/GCC/rules.mk:238: recipe https://gcc.gnu.org/pipermail/gcc-bugs/2016-February/535939.html
19.DOTA2自定义地图发布Will stop ALL hints with this name chat_new_message: the specified channel contains new dota_hud_error_message reason ( byte ) message ( string ) dota_action_success dota_startingrecipe ( byte ) toggle ( bool ) dota_quick_buy_changed item ( string ) recipe ( bytehttps://www.dota2.com.cn/wiki/Dota_2_Workshop_Tools/Scripting/Built-In_Engine_Events.htm
20.传说中16天记住7000考研单词的文本1.WithmyownearsI286. The miracle mirrors a horrible error made by the terrorists in the terrible territory. 这683. The thermal therapy terminated after the terminal germ seminar. 热疗在期末细菌研讨会后终止了714. The recipe recipient transiently made the conscientious alien client unconscious. 烹饪法接受https://www.newsmth.net/bbsanc.php?path=/groups/literal.faq/EnglishWorld/resources/books/swewe/7000&ap=1292
21.hasterminatedunexpectedlyduringstartupwithexitcodeBut only 15 days back, exactly after I upgraded to macOS Sierra,when i opened virtual box, this error appeared for the 1st time: "The virtual machine 'Windows7' has terminated unexpectedly during startup with exit code 1 (0x1)." https://forums.virtualbox.org/viewtopic.php?t=80328
22.CommandLineKungFu:April2009with bash but is a real pain in the uh neck in Windows cmd.exe. But, saddled Try putting the above recipe into your /etc/profile file next April Fool's Day and watch yourBigger than that will either push you into negative territory, or outright give you an error http://blog.commandlinekungfu.com/2009/04/