4

I have an application with a server written in F# and serve web files using suave. I remote login using powershell into another machine in the network to run the application (The application is also in one of the network drives). I do that because that machine have access to third party APIs needed for the server. Now when I do [IPAddress_Of_Remote_Machine]/[html_file] or [name_of_pc]/[html_file] then chrome is waiting forever and doesn't ever return the webpage. This wasn't happening before and I ran into this problem recently. I opened a different port and used it instead of the default one 80. This made things work but the problem keeps showing up after a couple of days. I don't think it's a firewall issue but I'm clueless to why this is happening.

When running netstat -an, this is what I get (I hid the IP address):

enter image description here

As you can see all of the connections are either in CLOSE_WAIT or ESTABLISHED but not LISTENING. All of these TCP connections is probably because I have PhantomJS and two other APIs running in the application as well. However the loop back address is also open on the same port 5959: enter image description here

I'm not sure what is difference between these two but when using PortQryUI to query the remote server it returns a success!

enter image description here

I have already made an inbound rule for port 5959 on the server so it should be allowed. The web page is stuck at Waiting for [name_of_pc]. Also, sometimes this problem disappears and everything works fine.

What is the potential problem behind this? Why would this happen all of a sudden?

UPDATE:

I re-ran the application today and it's working correctly. It could be that something is dynamically set within the firewall? Not really sure what is going on. The machine I'm running the server on has a bunch of applications running on it as well so maybe there is an external process that is affecting it?

I made a hello world app with Suave and deployed it on the network drive to test if it's going to work. I opened inbound rule for port 6001 enter image description here

Then I ran the app: enter image description here

However, it's still not working and this time it says the site cannot be reached when I do: http://[name_of_pc]:6001.

enter image description here

4

1 回答 1

1

将此移至答案以便可以关闭:

你能发布你的 suave cfg 的绑定部分吗?我猜您知道那在哪里,因为您使用的是非标准端口,但如果您不需要,请搜索 HttpBinding。我怀疑你会发现它指向 127.0.0.1,这对于远程访问来说不够好。您可以尝试将其更改为 0.0.0.0 或服务器的实际 IP 地址。我会先尝试 0.0.0.0 因为它提供的灵活性

于 2017-08-03T15:59:01.240 回答