TCP connection error , port 443 N: Connect failed errno=13

I will make a try tomorrow, my first thought is similar issue to this one

Btw, if you change the line ./mylegacyapp to use curl command, does it work?