Open addisonElliott opened 6 years ago
There is a simple workaround. "netstat" does work from powershell, I recomend creating an bash alias such as:
alias netstat="powershell.exe netstat"
Then you you can invoke netstat from bash and it will actually run it from powershell!!
That's a great idea actually! I would've never thought of that in a million years.
Let me try that tonight and see how it works, but that definitely helps.
Issue should be fixed in v1.5.0 of node-netstat. I am going to submit a PR to update the package JSON so that is used as a minimum, and then will close this issue.
@bubbathump Thanks for your insight, it was extremely helpful!
Ran into another problem that will cause this package to not be usable on WSL. Using Windows netstat command provides PID values on Windows side but WSL has another set of PIDs that do not match up.
Doing some research, it doesn't seem like there is an easy way to map between these PIDs. It seems that we will just have to wait for lsof or netstat support on WSL.
is-mongodb-running always returns that no instances are running when mongod is started using WSL. Additionally, if mongod is started from Windows, then it will also not report any instances running.
WSL does not support
netstat
orlsof
yet. Therefore, the PID can be retrieved fromps
command but the port is not found for the PID.Microsoft has said they are working on the issue and hopefully a future release will support
netstat
andlsof
. https://github.com/Microsoft/WSL/issues/2249