问题
I am not sure if this is the correct place to ask my question, but really I am out of ideas, and my clock is ticking. In short, I got a new machine that I need to make development ready. This project is based on rather old program versions, that is a task to update. In short I have set up the Vagrant (1.8.1) in VirtualBox (5.0.14). Chef (0.10.0) created all dependencies successfully and I can SSH to machine and see all is fine, all services are running as set in VagrantFile.
Vagrant box is latest ubunty/trystu64. My host machine is MacOs HighSierra(10.13.3).
Now, I open for example an mySQL editor (mySQL Workbench) and it connects to the Box, I can see DB and manipulate it.
My problem is with the NodeJS (I think). When I run my tests, it simply refuses to connect to the Box. More precisely, it attempts to connect to 127.0.0.1: 3306 (mySQL) and it errors. While MySQL Workbench performs the same connection without problems.
It seems the port forwarding in Vegrant works fine, as mySQL workbench is being forwarded to a box. Nodejs is not being forwarded, or something. Is it Node doing it? Something else that I need to allow?
I have tried many different things, I have lost count. And always the same issue. Is there something that I can do to Node, so it behaves as mySQL Workbench? Any idea is appreciated.
This identical setup used to work before, but not now.
来源:https://stackoverflow.com/questions/50098176/node-cant-connect-to-vagrant-box