C
C#3y ago
pticrix

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
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
pticrix
pticrixOP3y ago
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
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
pticrix
pticrixOP3y ago
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
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
pticrix
pticrixOP3y ago
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
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
pticrix
pticrixOP3y ago
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
pticrix
pticrixOP3y ago
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
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
pticrix
pticrixOP3y ago
Well, the unix domains socket are only on build > 17063. WS2016 = 14339, so no support :\
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
pticrix
pticrixOP3y ago
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
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
pticrix
pticrixOP3y ago
Well, I'm not sure since I inherited that code, but my educated guess is that we got IPC pipes in there.
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
pticrix
pticrixOP3y ago
That's our current settings for the kestrel
pticrix
pticrixOP3y ago
No "ListenUnixSockets" here. But let me check again if there's anything I can put to prevent the selection of those
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
pticrix
pticrixOP3y ago
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
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
pticrix
pticrixOP3y ago
Ok, I'll take some time to look into that avenue. Thanks!
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
pticrix
pticrixOP3y ago
fuck FUCK I found it your naming thing put me on the right path
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
pticrix
pticrixOP3y ago
not type naming. There were overload of configuration above my screenshot and lo and behold :
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
pticrix
pticrixOP3y ago
someone didn't do their homework :
pticrix
pticrixOP3y ago
I was stubbornly looking at the kestrel in Program
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
pticrix
pticrixOP3y ago
yeah I was looking for that! Even did a search
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
pticrix
pticrixOP3y ago
but it was hidden in a nuget
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
pticrix
pticrixOP3y ago
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.
Want results from more Discord servers?
Add your server