Port forwarding problems

Discussion in 'Parallels Provider for Vagrant' started by plambert, Sep 20, 2014.

  1. plambert

    plambert Bit poster

    Messages:
    2
    I'm trying to use Parallels with Vagrant. I have Parallels Desktop for Mac version 10, and have brought up my vm with services running in it on ports 8080 and 9200. They work fine from within the VM.

    However, with this in my Vagrantfile:

    # Kibana
    config.vm.network "forwarded_port", guest: 8080, host: 8080
    # Elasticsearch
    config.vm.network "forwarded_port", guest: 9200, host: 9200

    I can connect to localhost:8080 and localhost:9200 on the host OS X system, but I cannot get any response. It eventually times out.

    OSX-HOST$ curl -v http://localhost:9200/
    * Adding handle: conn: 0x7fdfdb804000
    * Adding handle: send: 0
    * Adding handle: recv: 0
    * Curl_addHandleToPipeline: length: 1
    * - Conn 0 (0x7fdfdb804000) send_pipe: 1, recv_pipe: 0
    * About to connect() to localhost port 9200 (#0)
    * Trying ::1...
    * Trying 127.0.0.1...
    * Connected to localhost (127.0.0.1) port 9200 (#0)
    > GET / HTTP/1.1
    > User-Agent: curl/7.30.0
    > Host: localhost:9200
    > Accept: */*
    >

    ... then it sits a long time before timing out ...

    However it works fine from on the host:

    OSX-HOST$ vagrant ssh
    Last login: Sat Sep 20 00:14:49 2014 from 10.211.55.1
    Welcome to your Vagrant-built virtual machine.
    [vagrant@localhost ~]$ curl http://localhost:9200/
    ...plenty of output here...

    What am I doing wrong?

    Paul
     
  2. Hi, Paul.

    1) Is this issue reproduced only for your Elasticsearch service? E.q. is connection to Kibana (port 8080) working fine?
    2) Have you tried to reboot the VM (vagrant reload)? Does the issue still exist?
     
    Last edited by a moderator: Sep 22, 2014
  3. plambert

    plambert Bit poster

    Messages:
    2
    Neither port forwarding works. I have reloaded the VM and even (eventually for other reasons) restarted my machine. Still no go. :(

    Paul
     
  4. Strange... I tested port forwarding with accessing a simple website on apache/nginx and it is working fine.

    Seems like you have a special case. Could you please provide more information about your virtual environment?
    I would be grateful for any Vagrantfile details if possible (box name, provision scripts/cookbooks/etc.)

    P.s. By the way, is iptables (or another firewall) configured on your guest system? Have you tried to stop it and check again?
     

Share This Page