La mia casella vagrant in esecuzione (ubuntu, su un host di OS X Mavericks) è stata eseguita correttamente.Aggiunta di port forwarding su una casella vagrant esistente
Sto cercando di impostare pgAdmin dall'host e sto avendo problemi ad aprire una nuova porta per il traffico sql.
ho aggiunto una linea alla mia Vagrantfile (l'ultimo):
config.vm.network "forwarded_port", guest: 3000, host: 8080 # http
config.vm.network :forwarded_port, guest: 35729, host: 35729
config.vm.network "forwarded_port", guest: 5432, host: 7001 # postgres
ho corse vagabondo disposizione e rimbalzò la casella Vagrant più volte. Quando si riavvia il nuovo port forwarding non è in elenco:
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 3000 => 8080 (adapter 1)
default: 35729 => 35729 (adapter 1)
default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
Curl dà una risposta negativa anche:
➜ ~ curl -v 'http://localhost:7001/'
* Adding handle: conn: 0x7fde1a004400
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fde1a004400) send_pipe: 1, recv_pipe: 0
* About to connect() to localhost port 7001 (#0)
* Trying ::1...
* Trying 127.0.0.1...
* Trying fe80::1...
* Failed connect to localhost:7001; Connection refused
* Closing connection 0
curl: (7) Failed connect to localhost:7001; Connection refused
Related posts:
Vagrant Port Forwarding not working
Cannot connect to Postgres running on VM from host machine using MD5 method
Grazie Brian, ho provato l'opzione di ricarica ma non andare. Volevo evitare di apportare modifiche al di fuori del file vagabondo, se possibile. Se non riesco a trovare qualcos'altro, lo proverò. – ardochhigh
La configurazione manuale in virtualbox lo ha fatto – ardochhigh