brook icon indicating copy to clipboard operation
brook copied to clipboard

listen tcp :1093: an attempt was made to access a socket in a way forbidden by its access permissions

Open HIDE-r opened this issue 2 years ago • 5 comments

我在Windows平台上,连接的时候总是发生 image 我查端口也没看到这个端口被占用。 image 怎么解决这个问题呢?

感觉我在enable WSL之前没出现这个问题,昨天刚弄了一下WSL, 不知道会不会有关系

HIDE-r avatar Nov 07 '21 05:11 HIDE-r

https://www.google.com/search?q=-baidu%20isten+tcp+%3A%3A+an+attempt+was+made+to+access+a+socket+in+a+way+forbidden+by+its+access+permissions

On Sun, Nov 7, 2021 at 1:36 PM HIDE @.***> wrote:

我在Windows平台上,连接的时候总是发生 [image: image] https://user-images.githubusercontent.com/51672711/140633689-f4ddb6d4-46ce-4a74-822d-a8eb5d7f0b53.png 我查端口也没看到这个端口被占用。 [image: image] https://user-images.githubusercontent.com/51672711/140633729-265cd3df-31d3-4841-a748-8be6f462682f.png 怎么解决这个问题呢?

感觉我在enable WSL之前没出现这个问题,昨天刚弄了一下WSL, 不知道会不会有关系

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/txthinking/brook/issues/899, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJPFT44HCAKXF4LAMSQS5TUKYF6NANCNFSM5HQNKH4A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

txthinking avatar Nov 07 '21 06:11 txthinking

已经解决这个问题了。确实是与WSL2有关系

这个命令可以看到tcp 端口排除范围,

> netsh interface ipv4 show excludedportrange protocol=tcp
协议 tcp 端口排除范围
 
开始端口    结束端口
----------    --------
      1026        1125

可以看到1093 这个端口在这个排除范围内。这个是由于我开启了WSL2,所以默认开了Hyper-V, 系统默认会分配给一些保留端口供Hyper-V使用。

解决方案: https://www.cnblogs.com/xwgli/p/13609041.html https://segmentfault.com/a/1190000022338199

HIDE-r avatar Nov 08 '21 02:11 HIDE-r

https://stackoverflow.com/questions/15619921/an-attempt-was-made-to-access-a-socket-in-a-way-forbidden-by-its-access-permissi

txthinking avatar Apr 16 '22 07:04 txthinking

端口能否可配置?WSL或者Hyper-V使用还是挺常见的,尤其是开发环境中。

Tint0ri avatar May 28 '22 06:05 Tint0ri

有道理 by unknown

txthinking-bot avatar May 28 '22 08:05 txthinking-bot

v20240214

txthinking avatar Jan 14 '24 11:01 txthinking