Page 1 of 1

OpenOutput: Server Socket failed to send: 10060

Posted: Tue Nov 26, 2019 11:24 am
by mdufault
Hello all,

A strange issue came up recently in the same environment I was working successfully and I can't figure why. When I click the Run button in PowerShell Studio to launch my project, it hang for a minute or so and then give a popup saying:

Title: "ScriptDriver"
Message: "OpenOutput: Server Socket failed to send: 10060"

Then I click the OK button, it hang for another minute or so and the project launch with no error or issue. Also, no event log entry is generated when I get the error. Finally, I already rebuilt the software cache, just in case it could be related.

The funny part is that it doesn't happen if I click the "Run in Console" button, but all output is redirected to the console window.

Any thoughts?

Environment:
PowerShell Studio 2019
Version 5.6.170
Windows 10 Enterprise, 1803, 64 bits

Thank you in advance,

Michel

Re: OpenOutput: Server Socket failed to send: 10060

Posted: Wed Nov 27, 2019 10:51 am
by brittneyr
It appears something might be blocking the connection to that socket. Please try rebooting your system and let us know if the problem persists.

Re: OpenOutput: Server Socket failed to send: 10060

Posted: Wed Nov 27, 2019 11:23 am
by mdufault
Thank you for your reply Brittney. The computer has been rebooted and the issue is still there. I don't know what that socket is or means, all my projects give me this error now but are working fine when I run them outside of PowerShell Studio.

Any other ideas?

Thank you in advance,

Michel

Re: OpenOutput: Server Socket failed to send: 10060

Posted: Wed Nov 27, 2019 11:46 am
by Alexander Riedel
First of all, the cache has nothing to do with that and running in the console is a completely different mechanism.

PowerShell Studio uses a very basic tcp/ip communication on a local port to communicate with our powershell host (scriptdriver).
Normally that is not something that fails without a completely fried TCP/IP stack (you would likely not have internet connection) or a third part firewall or antivirus blocking local host connections.
If you installed or updated something like that recently, you should look into that.

This communication can fail on the sending or on the receiving side, the error message would not indicate that.
I would like you to download and install PrimalScript and use that to run a script. It uses the same mechanism as PowerShell Studio, but they do not interfere with one another.
If that works it would tell us it is a PowerShell Studio problem. If it also fails it is a local machine problem.
That would help to determine where to look next.

Would you be able to do that?

Re: OpenOutput: Server Socket failed to send: 10060

Posted: Thu Nov 28, 2019 7:25 am
by mdufault
Thank you Alexander for your quick reply. Has you suggested, I have tested a few scripts with the trial version of PrimalScript and I got the same behavior. That means that my issue is caused by something else than the PowerShell Studio environment. I have then disabled my Windows Defender Firewall to do another test and it finally works. So now that we nailed it down to the local firewall, would you please let me know for which executable and ports (inbound/outbound) I should have exceptions? I did some tests but I have not been successful so far.

Thank you in advance and have a good day,

Michel

Re: OpenOutput: Server Socket failed to send: 10060

Posted: Thu Nov 28, 2019 8:04 am
by Alexander Riedel
The preferred ports for PrimalScript are 1030 one way and 1031 another way. PowerShell Studio (I think) uses 1060 and 1061. But it can be randomized if the preferred ports are used or you run a script while debugging another.
The installer adds firewall exceptions, which probably have been either removed or overridden on your machine.
2019-11-28_8-00-20.jpg
2019-11-28_8-00-20.jpg (237.15 KiB) Viewed 20729 times
I suggest to check on that and add them if necessary. It is quite alright to restrict this to local connections only if you do not need or want remote debugging.