shadowsocks / shadowsocks-windows

A C# port of shadowsocks
Other
58.09k stars 16.4k forks source link

System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it #3467

Open nikitaabramenko opened 3 months ago

nikitaabramenko commented 3 months ago

Describe the bug

As in title. System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it

Environment

Steps you have tried

Tried [#2474 ] and [#2449]. Checked firewall settings on the server machine, seems to be ok. Added system proxy on my pc, tried switching off firewall on my pc, didn't work. Tried changing crypto algorithms, didn't work

What did you expect to see?

no errors

What did you see instead?

stated above

Config and error log in detail (with all sensitive info masked)

2024-03-13 18:36:46.9498|DEBUG|Shadowsocks.Controller.TCPHandler|connect to self.events.data.microsoft.com:443
2024-03-13 18:36:47.3420|WARN|Shadowsocks.Controller.TCPHandler|System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it
   at Shadowsocks.Util.Sockets.WrappedSocket.EndConnect(IAsyncResult asyncResult)
   at Shadowsocks.Proxy.DirectConnect.EndConnectDest(IAsyncResult asyncResult)
   at Shadowsocks.Controller.TCPHandler.ConnectCallback(IAsyncResult ar)

Server config (docker-compose.yml file since i am using docker to run the whole thing)

version: '3'
services:
        shadowsocks:
                      image: shadowsocks/shadowsocks-libev:latest
                      environment:
                                        - TZ=Europe/Moscow
                                        - PASSWORD=**********
                                        - METHOD=chacha20-ietf-poly1305
                                        - ARGS=--fast-open
                      ports:
                                        - "8390:8390"
                                        - "8390:8390/udp"
                      restart: unless-stopped
chenshaoju commented 3 months ago

This problem may be caused by the Shadowsocks port of your server not being configured correctly. Please use this third-party detection service to ensure that the port can be accessed normally: https://www.yougetsignal.com/tools/open-ports/

nikitaabramenko commented 3 months ago

This problem may be caused by the Shadowsocks port of your server not being configured correctly. Please use this third-party detection service to ensure that the port can be accessed normally: https://www.yougetsignal.com/tools/open-ports/

Strange. This site says the port is closed, checked the netstat -l | grep 8390 and the output is like that

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:8390            0.0.0.0:*               LISTEN
tcp6       0      0 [::]:8390               [::]:*                  LISTEN
udp        0      0 0.0.0.0:8390            0.0.0.0:*
udp6       0      0 [::]:8390               [::]:*

not really sure what to do about that since i am new to administrating docker and linux