Node Can't connect to vagrant box

左心房为你撑大大i 提交于 2019-12-11 18:27:05

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!