System.Net.Sockets spookyness
Hello! :
I've been tasked with updating our web app backend to .net 6 and I am almost done. However, while it was working fine locally and on our Dev environment, I've hit a wall when trying to deploy in our QA environment. Here's what's happening :
- Running our app on our QA environment gives me an error I don't get on other environment
- OSes :
- Dev environment runs on Windows Server 2012 R2 ;
- QA runs on Windows Server 2016 ;
- Local is Windows 10 Pro
- When trying to connect to other processes, I get the following exception : System.PlatformNotSupportedException: 'Operation is not supported on this platform.'
- Exception is triggered by System.Net.Sockets.UnixDomainSocketEndPoint
- My research seems to indicate that Windows Server 2016 does not support UDS. But it isn't supported by Windows Server 2012 R2 either, where the build runs without any problem
I can't get try to run in debug on WS2012 R2, since VS 2022 isn't compatible with it. But I guess this is due to what it decides to try and call via the Kestrel Server, which only has port registration on Listen(int 32) if the config specifies IP and Port, and ListenAnyIP if the config has a port, but no specific IP. So, Listen UnixSocket(...) is never explicitly called.
Anyone faced something similar and know what could be happening here?
Thanks!
36 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
yeah that would be what I'd like too haha, but what is weird is that it runs without a hitch on Windows Server 2012 R2
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
yeah, though right now I doubt my company would be willing to tear down most of our infrastructure given that, due to sucky circumstances, I am the whole backend department hahaha
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
how tho. sc query afunix returns nothing on those server.
I only have it locally, since I run latest win 10 pro + wsl 2
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Hum I don't think so. We got the same Runtimes / SDKs on both machines, with the only difference currently is that we have 6.0.401 in QA and 6.0.400 in dev.
Anyway, thanks for taking time to think through this too. Appreciated
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Well, the unix domains socket are only on build > 17063. WS2016 = 14339, so no support :\
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Yeah, but I don't need unix socket, and I don't ask for unix socket specifically in the code either, hence why I'm lost currently.
Same thing :
Microsoft Windows [Version 10.0.14393]
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Well, I'm not sure since I inherited that code, but my educated guess is that we got IPC pipes in there.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
That's our current settings for the kestrel
No "ListenUnixSockets" here. But let me check again if there's anything I can put to prevent the selection of those
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
yeah I know, but I don't know why it does that, or what I can do to explicitly tell kestrel that those ports sockets are not available and to not try them.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Ok, I'll take some time to look into that avenue. Thanks!
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
fuck
FUCK
I found it
your naming thing put me on the right path
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
not type
naming. There were overload of configuration above my screenshot
and lo and behold :
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
someone didn't do their homework :
I was stubbornly looking at the kestrel in Program
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
yeah I was looking for that! Even did a search
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
but it was hidden in a nuget
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
yeah def, I had no log to look at, only one line with no error. Thanks for you help, made me look at things just at the right angles.