문제

Windows XP SP2에서 최신 Cygwin 버전의 rsync를 실행하려고 하면 다음 오류가 발생합니다.두 로컬 동기화를 모두 시도할 때 오류가 발생합니다(즉:로컬 하드 디스크의 소스 및 대상만) 및 원격 동기화(openssh 패키지의 "-e ssh" 사용).수정/해결 방법에 대한 조언이 있으십니까?

bash-3.2$ rsync -a dir1 dir2
rsync: Failed to dup/close: Socket operation on non-socket (108)
rsync error: error in IPC code (code 14) at /home/lapo/packaging/tmp/rsync-2.6.9/pipe.c(143) [receiver=2.6.9]
rsync: read error: Connection reset by peer (104)
rsync error: error in IPC code (code 14) at /home/lapo/packaging/tmp/rsync-2.6.9/io.c(604) [sender=2.6.9]
도움이 되었습니까?

해결책

귀하의 질문에 대한 답변은 아니지만 제가 찾은 내용은 다음과 같습니다. 델타 사본 Cygwin을 사용하는 것보다 훨씬 더 나은 선택이 될 수 있습니다.일반 rsync 데몬에도 연결됩니다.

다른 팁

rsync를 차단하는 것이 있을 수 있습니다.제 경우에는 NOD32 바이러스 백신입니다.다음과 같이 'gdb'에서 rsync를 실행하여 이를 확인할 수 있습니다.

$ gdb --args /usr/bin/rsync -a somedir/ anotherdir
GNU gdb 6.8.0.20080328-cvs (cygwin-special)
.....
(no debugging symbols found)
(gdb) run 

gdb가 시작된 후 "run" 명령을 확인하세요.다음과 같은 출력이 표시됩니다.

Starting program: /usr/bin/rsync -a somedir/ anotherdir
.....
(no debugging symbols found)
warning: NOD32 protected [MSAFD Tcpip [TCP/IP]]
warning: NOD32 protected [MSAFD Tcpip [UDP/IP]]
warning: NOD32 protected [MSAFD Tcpip [RAW/IP]]
warning: NOD32 protected [RSVP UDP Service Provider]
warning: NOD32 protected [RSVP TCP Service Provider]
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
[New thread 1508.0x720]
[New thread 1508.0xeb0]
[New thread 1508.0x54c]
rsync: Failed to dup/close: Socket operation on non-socket
(108)
rsync error: error in IPC code (code 14) at
/home/lapo/packaging/rsync-3.0.4-1/src/rsync-3.0.4/pipe.c(147)
[receiver=3.0.4] 

따라서 해당 바이러스 스캐너(NOD32)의 제외 목록에 rsync를 추가해야 합니다.

c:\cygwin\bin sync.exe

Cygwin의 오랜 파이프 구현 버그로 인해 SSH 연결을 통해 rsync를 사용하는 경우 rsync가 중단됩니다.

Cygwin v.1.7 rsync를 사용하여 많은 데이터를 전송하는 신뢰할 수 있는 유일한 방법은 rsync 프로토콜을 사용하여 rsync 데몬에 연결하는 것 같습니다.DeltaCopy는 이 메서드를 둘러싼 예쁜 래퍼입니다.

일부 사용자는 Unix 측의 Windows에서 데이터를 가져오는 대신 SSH를 통해 Windows에서 Unix로 데이터를 푸시하는 데 성공한 것으로 보입니다.하지만 우리 경험에 따르면 그것도 신뢰할 수 없습니다.

cygwin, rsync, ssh 및 Pipe/Hang/stall에 대한 Google을 검색하면 이 문제에 대한 자세한 정보를 찾을 수 있습니다.

나는 이것이 Winsock 오류라는 것을 발견했습니다.Sierra Wireless Aircard(875U)용 ATT Communcations Manager(버전 6.12.0046.0) 설치부터 문제가 시작되는 것을 확인했습니다.Communications Manager를 제거하면 rsync 오류가 사라집니다.

@akaihola의 조언을 따른 후 발견했습니다. 이것 동일한 문제에 대한 해결책이 담긴 블로그 게시물입니다.여기에 솔루션을 게시했지만 크레딧은 다음과 같습니다. 마크 아브라모비츠

cygrunsrv --install "rsyncd" --path /usr/bin/rsync --args "--daemon --no-detach" --desc "Starts a rsync daemon for accepting incoming rsync connections" --disp "Rsync Daemon" --type auto

물론 rsync를 사용하는 Cygwin이 필요합니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top