Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rsync daemon unable to bind in WSL2 #5222

Closed
srana2000 opened this issue May 17, 2020 · 5 comments
Closed

rsync daemon unable to bind in WSL2 #5222

srana2000 opened this issue May 17, 2020 · 5 comments

Comments

@srana2000
Copy link

srana2000 commented May 17, 2020

I upgraded my Windows 10 Pro to latest 2004 (Microsoft Windows [Version 10.0.19041.264]).
I then upgraded my WSL 1 Ubuntu 18.04 to WSL 2.

Now when I start rsync it exits with following log

2020/05/17 16:01:38 [11] rsyncd version 3.1.2 starting, listening on port 8730
2020/05/17 16:01:48 [26] rsyncd version 3.1.2 starting, listening on port 8730
2020/05/17 16:01:48 [26] bind() failed: Address already in use (address-family 2)
2020/05/17 16:01:48 [26] unable to bind any inbound sockets on port 8730
2020/05/17 16:01:48 [26] rsync error: error in socket IO (code 10) at socket.c(555) [Receiver=3.1.2]

Checking I found that wslhost.exe is binding to the port.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\WINDOWS\system32> Get-Process -Id (Get-NetTCPConnection -LocalPort 8730).OwningProcess

Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
-------  ------    -----      -----     ------     --  -- -----------
     95       6      948       3060       0.02   1104   2 wslhost

It was working perfectly since past two years and after upgrading to WSL2 this problem started coming. If I reboot the machine wslhost is not using that port. I tried with different port and it is same. How can I fix it.

@onomatopellan
Copy link

Did you try rsync --address 0.0.0.0?

@srana2000
Copy link
Author

Did you try rsync --address 0.0.0.0?
When rsync is started as Service I never specified IP address. It uses the machine IP.

@onomatopellan
Copy link

I think as a service it loads config from /etc/default/rsync

You can try editing the file modifying the line:
RSYNC_OPTS='--address=0.0.0.0'

@johtop
Copy link

johtop commented Sep 22, 2020

Did you try rsync --address 0.0.0.0?
When rsync is started as Service I never specified IP address. It uses the machine IP.

srana2000, did you solve the problem?

@ghost
Copy link

ghost commented Oct 12, 2020

This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-open it.

Thank you!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants