Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port Forwarding Issue with vagrant on Windows 8.1 #5838

Closed
Kenny-Stimson opened this issue Jun 16, 2015 · 29 comments
Closed

Port Forwarding Issue with vagrant on Windows 8.1 #5838

Kenny-Stimson opened this issue Jun 16, 2015 · 29 comments

Comments

@Kenny-Stimson
Copy link

I am able to hit the port when I target the machine directly, but attempting to use localhost fails with an ERR_CONNECTION_REFUSED message. Firewall is off completely, and these commands are being run with administrator privileges.

Versioning Info:
Vagrant: 1.7.2
VMware Workstation: 11.1.0 build-2496824

Vagrantfile:

Vagrant.configure("2") do |config|

  # Core Configurations
  config.vm.box            = "rcs_class_d_oel66_1.3.4"                                 # Specify the Vagrant Base Box by name
  config.vm.host_name      = "wcc.rcs.dev"                                             # Specify a hostname for the virtual machine
  config.ssh.forward_agent = true                                                      # Forward ssh keys
  config.ssh.forward_x11   = true                                                      # Forward X11
  config.vm.network "forwarded_port", guest: 7001, host: 7001, host_ip: "127.0.0.1"    # Forward WebLogic Admin Console Port
  config.vm.network "forwarded_port", guest: 16200, host: 16200, host_ip: "127.0.0.1"  # Forward WCC Port
  config.vm.network "forwarded_port", guest: 4444, host: 4444, host_ip: "127.0.0.1"    # Forward RIDC Port

  # Provisioning
  config.vm.provision "shell", path: "setup.sh"

  # VMWare specific
  config.vm.provider "vmware_workstation" do |v|
    v.vmx["memsize"] = "4096"
    v.vmx["numvcpus"] = "2"
    v.vmx["ethernet0.virtualDev"] = "vmxnet3"
  end

end

running:

==> default: Attempting graceful shutdown of VM...
==> default: Waiting for the VMX process to go away...
==> default: Verifying vmnet devices are healthy...
==> default: Preparing network adapters...
==> default: Starting the VMware VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 192.168.88.157:22
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Forwarding ports...
    default: -- 7001 => 7001
    default: -- 16200 => 16200
    default: -- 4444 => 4444
    default: -- 22 => 2222
==> default: Setting hostname...
==> default: Configuring network adapters within the VM...
==> default: Waiting for HGFS kernel module to load...
==> default: Enabling and configuring shared folders...
    default: -- D:/workspace/rcs_vagrant_projects/starters/wcc: /vagrant
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: to force provisioning. Provisioners marked to run always will still run.

As you can see from the following netstat output, the designated ports are not bound at all.


Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:135            rcs_dell_1:0           LISTENING       836
  TCP    0.0.0.0:443            rcs_dell_1:0           LISTENING       6380
  TCP    0.0.0.0:445            rcs_dell_1:0           LISTENING       4
  TCP    0.0.0.0:554            rcs_dell_1:0           LISTENING       4200
  TCP    0.0.0.0:623            rcs_dell_1:0           LISTENING       3928
  TCP    0.0.0.0:902            rcs_dell_1:0           LISTENING       5884
  TCP    0.0.0.0:912            rcs_dell_1:0           LISTENING       5884
  TCP    0.0.0.0:1521           rcs_dell_1:0           LISTENING       5464
  TCP    0.0.0.0:2869           rcs_dell_1:0           LISTENING       4
  TCP    0.0.0.0:5357           rcs_dell_1:0           LISTENING       4
  TCP    0.0.0.0:5987           rcs_dell_1:0           LISTENING       11228
  TCP    0.0.0.0:7779           rcs_dell_1:0           LISTENING       4
  TCP    0.0.0.0:8080           rcs_dell_1:0           LISTENING       5464
  TCP    0.0.0.0:8888           rcs_dell_1:0           LISTENING       4
  TCP    0.0.0.0:10243          rcs_dell_1:0           LISTENING       4
  TCP    0.0.0.0:16992          rcs_dell_1:0           LISTENING       3928
  TCP    0.0.0.0:17500          rcs_dell_1:0           LISTENING       3596
  TCP    0.0.0.0:17500          rcs_dell_1:0           LISTENING       2088
  TCP    0.0.0.0:49152          rcs_dell_1:0           LISTENING       652
  TCP    0.0.0.0:49153          rcs_dell_1:0           LISTENING       1036
  TCP    0.0.0.0:49154          rcs_dell_1:0           LISTENING       1124
  TCP    0.0.0.0:49155          rcs_dell_1:0           LISTENING       1796
  TCP    0.0.0.0:49159          rcs_dell_1:0           LISTENING       712
  TCP    0.0.0.0:49357          rcs_dell_1:0           LISTENING       5340
  TCP    0.0.0.0:49358          rcs_dell_1:0           LISTENING       704
  TCP    0.0.0.0:57789          rcs_dell_1:0           LISTENING       9628
  TCP    10.1.1.202:139         rcs_dell_1:0           LISTENING       4
  TCP    10.1.1.202:60811       msnbot-65-52-108-233:https  ESTABLISHED     7828
  TCP    10.1.1.202:60866       ash-ra1-1a:https       ESTABLISHED     2088
  TCP    10.1.1.202:60867       server-54-192-88-87:https  CLOSE_WAIT      2088
  TCP    10.1.1.202:60868       ec2-23-23-162-116:https  CLOSE_WAIT      2088
  TCP    10.1.1.202:60869       sjd-rd12-8c:https      ESTABLISHED     3596
  TCP    10.1.1.202:60898       ec2-174-129-210-139:https  CLOSE_WAIT      5028
  TCP    10.1.1.202:60899       ec2-174-129-210-139:https  CLOSE_WAIT      5028
  TCP    10.1.1.202:61000       server-54-230-90-84:https  CLOSE_WAIT      3596
  TCP    10.1.1.202:61021       www:http               ESTABLISHED     2472
  TCP    10.1.1.202:61054       ec2-23-23-116-168:https  CLOSE_WAIT      5028
  TCP    10.1.1.202:61055       ec2-23-23-116-168:https  CLOSE_WAIT      5028
  TCP    10.1.1.202:61189       server-54-192-88-87:https  CLOSE_WAIT      2088
  TCP    10.1.1.202:62371       server-54-192-88-87:https  CLOSE_WAIT      3596
  TCP    10.1.1.202:62469       server-205-251-253-43:https  CLOSE_WAIT      2088
  TCP    10.1.1.202:62470       ec2-54-243-114-48:https  CLOSE_WAIT      2088
  TCP    10.1.1.202:62471       ec2-54-243-114-48:https  CLOSE_WAIT      2088
  TCP    10.1.1.202:62472       ec2-54-243-114-48:https  CLOSE_WAIT      2088
  TCP    10.1.1.202:62473       ec2-54-243-114-48:https  CLOSE_WAIT      2088
  TCP    10.1.1.202:62486       server-54-230-90-84:https  CLOSE_WAIT      2088
  TCP    10.1.1.202:62487       ec2-23-23-169-227:https  CLOSE_WAIT      2088
  TCP    10.1.1.202:62742       192.30.252.90:https    ESTABLISHED     2472
  TCP    10.1.1.202:62769       server-205-251-253-43:https  CLOSE_WAIT      2088
  TCP    10.1.1.202:62770       ec2-54-83-205-141:https  CLOSE_WAIT      2088
  TCP    10.1.1.202:62793       live:https             ESTABLISHED     2472
  TCP    10.1.1.202:62949       lb:https               TIME_WAIT       0
  TCP    10.1.1.202:62950       lb:https               ESTABLISHED     2472
  TCP    10.1.1.202:62955       proxy-111-1-atlnet:https  ESTABLISHED     2472
  TCP    127.0.0.1:443          rcs_dell_1:50623       ESTABLISHED     6380
  TCP    127.0.0.1:443          rcs_dell_1:62598       FIN_WAIT_2      6380
  TCP    127.0.0.1:515          rcs_dell_1:0           LISTENING       9512
  TCP    127.0.0.1:8307         rcs_dell_1:0           LISTENING       6380
  TCP    127.0.0.1:10001        rcs_dell_1:0           LISTENING       1952
  TCP    127.0.0.1:17600        rcs_dell_1:0           LISTENING       2088
  TCP    127.0.0.1:17603        rcs_dell_1:0           LISTENING       2088
  TCP    127.0.0.1:19872        rcs_dell_1:54925       ESTABLISHED     2088
  TCP    127.0.0.1:19872        rcs_dell_1:54935       ESTABLISHED     3596
  TCP    127.0.0.1:23402        rcs_dell_1:0           LISTENING       10292
  TCP    127.0.0.1:43227        rcs_dell_1:0           LISTENING       5292
  TCP    127.0.0.1:49156        rcs_dell_1:0           LISTENING       1872
  TCP    127.0.0.1:49158        rcs_dell_1:0           LISTENING       2136
  TCP    127.0.0.1:49349        rcs_dell_1:0           LISTENING       5464
  TCP    127.0.0.1:49436        rcs_dell_1:0           LISTENING       3928
  TCP    127.0.0.1:50605        rcs_dell_1:50606       ESTABLISHED     10704
  TCP    127.0.0.1:50606        rcs_dell_1:50605       ESTABLISHED     10704
  TCP    127.0.0.1:50623        rcs_dell_1:https       ESTABLISHED     10704
  TCP    127.0.0.1:51389        rcs_dell_1:51390       ESTABLISHED     6380
  TCP    127.0.0.1:51390        rcs_dell_1:51389       ESTABLISHED     6380
  TCP    127.0.0.1:54925        rcs_dell_1:19872       ESTABLISHED     2088
  TCP    127.0.0.1:54935        rcs_dell_1:19872       ESTABLISHED     3596
  TCP    127.0.0.1:55280        rcs_dell_1:55281       ESTABLISHED     2088
  TCP    127.0.0.1:55281        rcs_dell_1:55280       ESTABLISHED     2088
  TCP    127.0.0.1:62598        rcs_dell_1:https       CLOSE_WAIT      10704
  TCP    127.0.0.1:62951        rcs_dell_1:16992       TIME_WAIT       0
  TCP    127.0.0.1:62952        rcs_dell_1:16992       TIME_WAIT       0
  TCP    127.0.0.1:62953        rcs_dell_1:16992       TIME_WAIT       0
  TCP    127.0.0.1:62954        rcs_dell_1:16992       TIME_WAIT       0
  TCP    192.168.42.1:139       rcs_dell_1:0           LISTENING       4
  TCP    192.168.50.1:139       rcs_dell_1:0           LISTENING       4
  TCP    192.168.88.1:139       rcs_dell_1:0           LISTENING       4
  TCP    [::]:135               rcs_dell_1:0           LISTENING       836
  TCP    [::]:443               rcs_dell_1:0           LISTENING       6380
  TCP    [::]:445               rcs_dell_1:0           LISTENING       4
  TCP    [::]:554               rcs_dell_1:0           LISTENING       4200
  TCP    [::]:623               rcs_dell_1:0           LISTENING       3928
  TCP    [::]:1521              rcs_dell_1:0           LISTENING       5464
  TCP    [::]:2869              rcs_dell_1:0           LISTENING       4
  TCP    [::]:3587              rcs_dell_1:0           LISTENING       8800
  TCP    [::]:5357              rcs_dell_1:0           LISTENING       4
  TCP    [::]:5987              rcs_dell_1:0           LISTENING       11228
  TCP    [::]:7779              rcs_dell_1:0           LISTENING       4
  TCP    [::]:8080              rcs_dell_1:0           LISTENING       5464
  TCP    [::]:8888              rcs_dell_1:0           LISTENING       4
  TCP    [::]:10243             rcs_dell_1:0           LISTENING       4
  TCP    [::]:16992             rcs_dell_1:0           LISTENING       3928
  TCP    [::]:49152             rcs_dell_1:0           LISTENING       652
  TCP    [::]:49153             rcs_dell_1:0           LISTENING       1036
  TCP    [::]:49154             rcs_dell_1:0           LISTENING       1124
  TCP    [::]:49155             rcs_dell_1:0           LISTENING       1796
  TCP    [::]:49159             rcs_dell_1:0           LISTENING       712
  TCP    [::]:49357             rcs_dell_1:0           LISTENING       5340
  TCP    [::]:49358             rcs_dell_1:0           LISTENING       704
  TCP    [::]:57789             rcs_dell_1:0           LISTENING       9628
  TCP    [::1]:1521             rcs_dell_1:54836       ESTABLISHED     5464
  TCP    [::1]:8307             rcs_dell_1:0           LISTENING       6380
  TCP    [::1]:8307             rcs_dell_1:50624       ESTABLISHED     6380
  TCP    [::1]:8307             rcs_dell_1:62599       TIME_WAIT       0
  TCP    [::1]:49435            rcs_dell_1:0           LISTENING       9680
  TCP    [::1]:50624            rcs_dell_1:8307        ESTABLISHED     6380
  TCP    [::1]:54836            rcs_dell_1:1521        ESTABLISHED     5340
  TCP    [::1]:60789            rcs_dell_1:60791       ESTABLISHED     3928
  TCP    [::1]:60791            rcs_dell_1:60789       ESTABLISHED     3928
  UDP    0.0.0.0:500            *:*                                    1124
  UDP    0.0.0.0:3544           *:*                                    1124
  UDP    0.0.0.0:3702           *:*                                    3904
  UDP    0.0.0.0:3702           *:*                                    3904
  UDP    0.0.0.0:3702           *:*                                    1204
  UDP    0.0.0.0:3702           *:*                                    1928
  UDP    0.0.0.0:3702           *:*                                    1204
  UDP    0.0.0.0:3702           *:*                                    1928
  UDP    0.0.0.0:4500           *:*                                    1124
  UDP    0.0.0.0:5004           *:*                                    4200
  UDP    0.0.0.0:5005           *:*                                    4200
  UDP    0.0.0.0:5353           *:*                                    2472
  UDP    0.0.0.0:5353           *:*                                    2472
  UDP    0.0.0.0:5353           *:*                                    2472
  UDP    0.0.0.0:5353           *:*                                    2472
  UDP    0.0.0.0:5353           *:*                                    2472
  UDP    0.0.0.0:5353           *:*                                    2472
  UDP    0.0.0.0:5353           *:*                                    2472
  UDP    0.0.0.0:5353           *:*                                    2472
  UDP    0.0.0.0:5353           *:*                                    2472
  UDP    0.0.0.0:5355           *:*                                    1572
  UDP    0.0.0.0:17500          *:*                                    3596
  UDP    0.0.0.0:17500          *:*                                    2088
  UDP    0.0.0.0:49433          *:*                                    1928
  UDP    0.0.0.0:52842          *:*                                    2472
  UDP    0.0.0.0:53259          *:*                                    2472
  UDP    0.0.0.0:56253          *:*                                    1204
  UDP    0.0.0.0:56447          *:*                                    1796
  UDP    0.0.0.0:58042          *:*                                    2472
  UDP    0.0.0.0:61051          *:*                                    3904
  UDP    10.1.1.202:137         *:*                                    4
  UDP    10.1.1.202:138         *:*                                    4
  UDP    10.1.1.202:1900        *:*                                    1928
  UDP    10.1.1.202:56251       *:*                                    1928
  UDP    10.1.1.202:65096       *:*                                    1124
  UDP    127.0.0.1:1900         *:*                                    1928
  UDP    127.0.0.1:48300        *:*                                    10292
  UDP    127.0.0.1:56252        *:*                                    1928
  UDP    192.168.42.1:137       *:*                                    4
  UDP    192.168.42.1:138       *:*                                    4
  UDP    192.168.42.1:1900      *:*                                    1928
  UDP    192.168.50.1:137       *:*                                    4
  UDP    192.168.50.1:138       *:*                                    4
  UDP    192.168.50.1:1900      *:*                                    1928
  UDP    192.168.88.1:137       *:*                                    4
  UDP    192.168.88.1:138       *:*                                    4
  UDP    192.168.88.1:1900      *:*                                    1928
  UDP    [::]:500               *:*                                    1124
  UDP    [::]:3540              *:*                                    8800
  UDP    [::]:3702              *:*                                    1204
  UDP    [::]:3702              *:*                                    1928
  UDP    [::]:3702              *:*                                    1928
  UDP    [::]:3702              *:*                                    3904
  UDP    [::]:3702              *:*                                    1204
  UDP    [::]:3702              *:*                                    3904
  UDP    [::]:4500              *:*                                    1124
  UDP    [::]:5004              *:*                                    4200
  UDP    [::]:5005              *:*                                    4200
  UDP    [::]:5353              *:*                                    2472
  UDP    [::]:5353              *:*                                    2472
  UDP    [::]:5353              *:*                                    2472
  UDP    [::]:5353              *:*                                    2472
  UDP    [::]:5353              *:*                                    2472
  UDP    [::]:5355              *:*                                    1572
  UDP    [::]:49434             *:*                                    1928
  UDP    [::]:56254             *:*                                    1204
  UDP    [::]:61052             *:*                                    3904
  UDP    [::1]:1900             *:*                                    1928
  UDP    [::1]:56250            *:*                                    1928
  UDP    [fe80::49ef:c53:3535:98fa%14]:1900  *:*                                    1928
  UDP    [fe80::d402:4280:2b16:a880%31]:546  *:*                                    1036
  UDP    [fe80::d402:4280:2b16:a880%31]:1900  *:*                                    1928
  UDP    [fe80::d8df:3ff5:be08:3780%3]:1900  *:*                                    1928
  UDP    [fe80::d8df:3ff5:be08:3780%3]:56249  *:*                                    1928
  UDP    [fe80::fcc7:44cc:f68e:f236%15]:546  *:*                                    1036
  UDP    [fe80::fcc7:44cc:f68e:f236%15]:1900  *:*                                    1928

For comparison, here is the vm's netstat output. As you can see, there _are_ entries for the desired ports, although they seem rather circuitous.

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       Timer
tcp        0      0 *:43843                     *:*                         LISTEN      off (0.00/0/0)
tcp        0      0 wcc.rcs.dev:16200           *:*                         LISTEN      off (0.00/0/0)
tcp        0      0 192.168.88.157:16200        *:*                         LISTEN      off (0.00/0/0)
tcp        0      0 *:sunrpc                    *:*                         LISTEN      off (0.00/0/0)
tcp        0      0 *:ncube-lm                  *:*                         LISTEN      off (0.00/0/0)
tcp        0      0 wcc.rcs.dev:freeciv         *:*                         LISTEN      off (0.00/0/0)
tcp        0      0 *:ssh                       *:*                         LISTEN      off (0.00/0/0)
tcp        0      0 192.168.88.15:afs3-callback *:*                         LISTEN      off (0.00/0/0)
tcp        0      0 wcc.rcs.dev:afs3-callback   *:*                         LISTEN      off (0.00/0/0)
tcp        0      0 *:krb524                    *:*                         LISTEN      off (0.00/0/0)
tcp        0      0 wcc.rcs.dev:55807           wcc.rcs.dev:ncube-lm        ESTABLISHED off (0.00/0/0)
tcp        0      0 192.168.88.157:45899        192.168.88.157:16200        ESTABLISHED off (0.00/0/0)
tcp        0      0 192.168.88.157:16200        192.168.88.157:45899        ESTABLISHED off (0.00/0/0)
tcp        0      0 wcc.rcs.dev:ncube-lm        wcc.rcs.dev:55806           ESTABLISHED keepalive (6734.99/0/0)
tcp        0      0 wcc.rcs.dev:55691           wcc.rcs.dev:ncube-lm        ESTABLISHED off (0.00/0/0)
tcp        0      0 192.168.88.157:45902        192.168.88.157:16200        ESTABLISHED off (0.00/0/0)
tcp        0      0 192.168.88.157:39015        192.168.88.15:afs3-callback ESTABLISHED off (0.00/0/0)
tcp        0      0 wcc.rcs.dev:55802           wcc.rcs.dev:ncube-lm        ESTABLISHED off (0.00/0/0)
tcp        0      0 wcc.rcs.dev:ncube-lm        wcc.rcs.dev:55691           ESTABLISHED keepalive (6653.07/0/0)
tcp        0      0 192.168.88.15:afs3-callback 192.168.88.157:39015        ESTABLISHED off (0.00/0/0)
tcp        0      0 192.168.88.157:39046        192.168.88.15:afs3-callback ESTABLISHED off (0.00/0/0)
tcp        0      0 wcc.rcs.dev:ncube-lm        wcc.rcs.dev:55802           ESTABLISHED keepalive (6734.99/0/0)
tcp        0      0 192.168.88.157:39047        192.168.88.15:afs3-callback ESTABLISHED off (0.00/0/0)
tcp        0      0 192.168.88.15:afs3-callback 192.168.88.157:39008        ESTABLISHED off (0.00/0/0)
tcp        0      0 wcc.rcs.dev:55806           wcc.rcs.dev:ncube-lm        ESTABLISHED off (0.00/0/0)
tcp        0      0 192.168.88.157:16200        192.168.88.157:45902        ESTABLISHED off (0.00/0/0)
tcp        0      0 192.168.88.15:afs3-callback 192.168.88.157:39046        ESTABLISHED off (0.00/0/0)
tcp        0      0 192.168.88.15:afs3-callback 192.168.88.157:39047        ESTABLISHED off (0.00/0/0)
tcp        0      0 192.168.88.15:afs3-callback 192.168.88.157:39026        ESTABLISHED off (0.00/0/0)
tcp        0      0 192.168.88.157:39008        192.168.88.15:afs3-callback ESTABLISHED off (0.00/0/0)
tcp        0      0 wcc.rcs.dev:ncube-lm        wcc.rcs.dev:55807           ESTABLISHED keepalive (6734.99/0/0)
tcp        0     96 192.168.88.157:ssh          192.168.88.1:63012          ESTABLISHED on (0.20/0/0)
tcp        0      0 192.168.88.157:39026        192.168.88.15:afs3-callback ESTABLISHED off (0.00/0/0)
tcp        0      0 *:sunrpc                    *:*                         LISTEN      off (0.00/0/0)
tcp        0      0 *:33503                     *:*                         LISTEN      off (0.00/0/0)
udp        0      0 *:843                       *:*                                     off (0.00/0/0)
udp        0      0 wcc.rcs.dev:864             *:*                                     off (0.00/0/0)
udp        0      0 wcc.rcs.dev:60796           *:*                                     off (0.00/0/0)
udp        0      0 *:bootpc                    *:*                                     off (0.00/0/0)
udp        0      0 *:sunrpc                    *:*                                     off (0.00/0/0)
udp        0      0 *:51354                     *:*                                     off (0.00/0/0)
udp        0      0 *:843                       *:*                                     off (0.00/0/0)
udp        0      0 *:59001                     *:*                                     off (0.00/0/0)
udp        0      0 *:sunrpc                    *:*                                     off (0.00/0/0)
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node Path
unix  2      [ ACC ]     STREAM     LISTENING     11080  @/var/run/hald/dbus-3FGGtvnYbZ
unix  2      [ ACC ]     STREAM     LISTENING     10897  /var/run/rpcbind.sock
unix  2      [ ACC ]     STREAM     LISTENING     7457   @/com/ubuntu/upstart
unix  2      [ ACC ]     STREAM     LISTENING     11874  /var/run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     15273  /tmp/.java_pid5184.tmp
unix  2      [ ACC ]     STREAM     LISTENING     12244  /var/tmp/.oracle/s#3475.1
unix  2      [ ACC ]     STREAM     LISTENING     12245  /var/tmp/.oracle/s#3475.2
unix  2      [ ]         DGRAM                    7758   @/org/kernel/udev/udevd
unix  2      [ ACC ]     STREAM     LISTENING     17705  /tmp/.java_pid5580.tmp
unix  2      [ ]         DGRAM                    11961  @/org/freedesktop/hal/udev_event
unix  6      [ ]         DGRAM                    11701  /dev/log
unix  2      [ ACC ]     STREAM     LISTENING     11082  @/var/run/hald/dbus-h58IgQknd2
unix  3      [ ]         STREAM     CONNECTED     11183  @/var/run/hald/dbus-3FGGtvnYbZ
unix  2      [ ]         STREAM     CONNECTED     17537  
unix  3      [ ]         DGRAM                    7775   
unix  3      [ ]         STREAM     CONNECTED     11015  
unix  2      [ ]         DGRAM                    15095  
unix  3      [ ]         STREAM     CONNECTED     11081  
unix  3      [ ]         STREAM     CONNECTED     11011  
unix  3      [ ]         STREAM     CONNECTED     23138  
unix  2      [ ]         STREAM     CONNECTED     18532  
unix  3      [ ]         STREAM     CONNECTED     12123  
unix  2      [ ]         STREAM     CONNECTED     18494  
unix  3      [ ]         STREAM     CONNECTED     11167  
unix  3      [ ]         STREAM     CONNECTED     11012  
unix  2      [ ]         DGRAM                    10925  
unix  3      [ ]         STREAM     CONNECTED     23137  
unix  3      [ ]         STREAM     CONNECTED     11941  /var/run/dbus/system_bus_socket
unix  3      [ ]         DGRAM                    7776   
unix  3      [ ]         STREAM     CONNECTED     11085  @/var/run/hald/dbus-h58IgQknd2
unix  3      [ ]         STREAM     CONNECTED     11960  
unix  2      [ ]         STREAM     CONNECTED     15092  
unix  2      [ ]         DGRAM                    14779  
unix  3      [ ]         STREAM     CONNECTED     11877  /var/run/dbus/system_bus_socket
unix  2      [ ]         STREAM     CONNECTED     17711  
unix  2      [ ]         STREAM     CONNECTED     15501  
unix  3      [ ]         STREAM     CONNECTED     12111  @/var/run/hald/dbus-3FGGtvnYbZ
unix  2      [ ]         DGRAM                    23134  
@Kenny-Stimson
Copy link
Author

Can I get a status update? Or is there any way I can assist?

@PoetikDragon
Copy link

I am having this same problem. I tracked it down to the vmnetnat.conf file. The forwarded ports are not being written to this file during vagrant up/reload. You can see this in vagrant up --debug and look for the section about the Windows NAT configuration file.

I am able to manually add the forwarded port to this file in VMware Workstation from Edit > Virtual Network Editor ... > NAT. When I do, the port forwarding works.

Here is a diff comparing the file set by vagrant with the changes made inside VMware Workstation. Notice the entire [incomingtcp] section is missing.

https://www.diffchecker.com/qoazuggp

@dragon788
Copy link
Contributor

@PoetikDragon One thing to watch for, if you open the Network Editor at ALL while a VM controlled by Vagrant is running it typically destroys the Vagrant initiated changes. So adding/changing one port will clobber all the other ports Vagrant set up.

@PoetikDragon
Copy link

@dragon788 Vagrant is not setting up any ports - the entire [incomingtcp] section is deleted by vagrant during up.

Supposedly this has been fixed, since it was mentioned in another issue and closed:
#5600

I'm going to try the latest version and find out.

@PoetikDragon
Copy link

Update: I reinstalled vagrant and vmware a few days ago and that seemed to do the trick! The [incomingtcp] section was present after vagrant up and I could successfully go to the forwarded port.

The bad news - I destroyed and recreated my environment a few times while reorganizing a project. I did not change the Vagrantfile or puphpet config at all. It is once again deleting the [incomingtcp] section again during vagrant up. :(

EDIT: The plot thickens. I uninstalled git, vmware, and vagrant. After reinstalling I did vagrant up and once again port forwarding works fine. No changes were made to the project at all.

@dragon788
Copy link
Contributor

@PoetikDragon are you by chance running your 'vagrant up' inside of a Git BASH session, or do you use the Windows cmd.exe or Powershell?

@a-zen
Copy link

a-zen commented Nov 9, 2015

I got the same problem here. Forwarded Ports are not accessible under Windows. I used to start the machine via a zsh session from a cygwin installation. I just tried using plain cmd.exe as admin but the result is the same. Even so vagrant prints out the forwarded ports, non of them are accessible.

@icasimpan
Copy link

Hi,

Just trying to help out. Have you tried using bash instead of zsh in Cygwin
to run vagrant up? I'm using Cygwin too but with bash and I don't have
problems with forwarded ports.

On Mon, Nov 9, 2015 at 5:22 PM, Alex notifications@github.com wrote:

I got the same problem here. Forwarded Ports are not accessible under
Windows. I used to start the machine via a zsh session from a cygwin
installation. I just tried using plain cmd.exe as admin but the result is
the same. Even so vagrant prints out the forwarded ports, non of them are
accessible.


Reply to this email directly or view it on GitHub
#5838 (comment).

Ismael Angelo A. Casimpan Jr.
ismael.angelo@casimpan.com

@a-zen
Copy link

a-zen commented Nov 9, 2015

@icasimpan just tried this with the same result. Also plain cmd.exe made no difference. I would be surprised if the shell had that much influence. I'm running on Windows 8.1 with Vagrant 1.7.4 .

@dragon788
Copy link
Contributor

With your vagrant halted, open VMware Workstation go into the network
editor and click defaults. This will reset and reinstall all the VMware
network adapters. Then try performing a vagrant up after closing out work
station and see if it works again. I'm not sure what is breaking yours, are
you using any plugins outside of the VMware Workstation? Can you also post
your vagrantfile?
On Nov 9, 2015 3:34 AM, "Alex" notifications@github.com wrote:

@icasimpan https://github.com/icasimpan just tried this with the same
result. Also plain cmd.exe made no difference. I would be surprised if the
shell had that much influence.


Reply to this email directly or view it on GitHub
#5838 (comment).

@a-zen
Copy link

a-zen commented Nov 10, 2015

@dragon788 I tried it, but it doesn't change anything.
My Vagrantfile: https://gist.github.com/a-zen/509312831f119a160bc0
Also the debug output of vagrant up: https://gist.github.com/a-zen/8a9ed98cf788d688f7d4

@dragon788
Copy link
Contributor

Have you tried disabling all plugins like Berkshelf and Bundler? Does it
have the same issues on a different box with a fresh install of workstation
and vagrant?

On Tue, Nov 10, 2015 at 2:11 AM, Alex notifications@github.com wrote:

@dragon788 https://github.com/dragon788 I tried it, but it doesn't
change anything.
My Vagrantfile: https://gist.github.com/a-zen/509312831f119a160bc0
Also the debug output of vagrant up:
https://gist.github.com/a-zen/8a9ed98cf788d688f7d4


Reply to this email directly or view it on GitHub
#5838 (comment).

@a-zen
Copy link

a-zen commented Nov 13, 2015

@dragon788 I now used hashicorp/precise64 and reinstalled Vagrant. No luck either.

@dragon788
Copy link
Contributor

@a-zen @PoetikDragon Are you using version 1.7.2 or 1.7.4 of Vagrant and what version of the vagrant-vmware-workstation plugin?

@PoetikDragon
Copy link

This issue is ongoing though now my machine is Windows 10.

@dragon788 I updated everything this week, so now I have Vagrant 1.8.1, VMWare Workstation 12.1.0, and provider plugin version 4.0.6.

I was having better luck with the new install, the problem being intermittent instead of constant. I even thought I had figured out a work around - it seemed that rebooting the machine would allow port forwarding to work on the first "vagrant up." I have since found that is not true. I did not change anything in vagrant, vmware, the plugin, the vagrantfile, or the virtual machine but I did a "vagrant reload" when it was working fine and now can't get it to port forward at all, no matter how many times I reboot or up/halt or reload.

@dragon788
Copy link
Contributor

Claire, if you open your C:\ProgramData\VMware\vmnetnat.conf file you
should have [incomingtcp] and [incomingudp] sections. Can you paste from
the first of these that shows up until the end of the file?

On Sat, Jan 16, 2016 at 5:07 PM, Claire Matthews notifications@github.com
wrote:

This issue is ongoing though now my machine is Windows 10.

@dragon788 https://github.com/dragon788 I updated everything this week,
so now I have Vagrant 1.8.1, VMWare Workstation 12.1.0, and provider plugin
version 4.0.6.

I was having better luck with the new install, the problem being
intermittent instead of constant. I even thought I had figured out a work
around - it seemed that rebooting the machine would allow port forwarding
to work on the first "vagrant up." I have since found that is not true. I
did not change anything in vagrant, vmware, the plugin, the vagrantfile, or
the virtual machine but I did a "vagrant reload" when it was working fine
and now can't get it to port forward at all, no matter how many times I
reboot or up/halt or reload.


Reply to this email directly or view it on GitHub
#5838 (comment).

@PoetikDragon
Copy link

@dragon788 Yes, I have both of those sections - [incomingtcp] is no longer being deleted from the file. (Yay)

[incomingtcp]
# Use these with care - anyone can enter into your virtual machine through these...

# FTP (both active and passive FTP is always enabled)
#      ftp localhost 8887
#8887 = 192.168.27.128:21

# WEB (make sure that if you are using named webhosting, names point to
#     your host, not to guest... And if you are forwarding port other
#     than 80 make sure that your server copes with mismatched port 
#     number in Host: header)
#      lynx http://localhost:8888
#8888 = 192.168.27.128:80

# SSH
#      ssh -p 8889 root@localhost
#8889 = 192.168.27.128:22
# VAGRANT-BEGIN: C:\Vhosts\uscss\.vagrant\machines\default\vmware_workstation\b29c9161-33ad-4b3c-b557-c6ac8ef0a4bc\ubuntu1404.vmx
8080 = 192.168.220.128:80
2222 = 192.168.220.128:22
# VAGRANT-END: C:\Vhosts\uscss\.vagrant\machines\default\vmware_workstation\b29c9161-33ad-4b3c-b557-c6ac8ef0a4bc\ubuntu1404.vmx

[incomingudp]
# UDP port forwarding example
#6000 = 192.168.27.128:6001

[PrivilegedTCP]
autodetect = 1

[PrivilegedUDP]
autodetect = 1

@kylemacfarlane
Copy link

I'm running into this problem as well.

First up don't use Workstation 12.1.0 as vmnat.exe keeps crashing in that version (which completely kills network access on the guest - not just the port forwarding). On the VMware forums they say it's a known bug but they don't seem to be in a rush to fix it. You can confirm whether or not VMware NAT Service is crashing on your system by looking in the Windows system log.

So uninstall 12.1.0 and do a clean install of 12.0.1. For me port forwarding will then work fine until I do a vagrant destroy which will cause ports to be cleaned up from vmnetnat.conf. Now this is where the bug starts. Any vagrant up that tries to readd the same ports doesn't succeed at doing so. Merely resetting vmnetnat.conf to a clean install doesn't work either and the only fix I've found so far is to uninstall and reinstall all of VMware again. Thus there must be somewhere else that VMware is storing port info.

I'm having tons of problems with VMware compared to Virtualbox and this bug and the required constant reinstalls are making debugging hard as hell. If this can't be fixed in a week or two I will probably have to get a refund because so far VMware is unusable with Vagrant.

@kylemacfarlane
Copy link

I think the problem is a dodgy string replace on the contents of vmnetnat.conf. For example the default for [incomingtcp] is the following:

nbdsTimeout = 3


[incomingtcp]
# Use these with care - anyone can enter into your virtual machine through these...

# FTP (both active and passive FTP is always enabled)
#      ftp localhost 8887
#8887 = 192.168.27.128:21

# WEB (make sure that if you are using named webhosting, names point to
#     your host, not to guest... And if you are forwarding port other
#     than 80 make sure that your server copes with mismatched port 
#     number in Host: header)
#      lynx http://localhost:8888
#8888 = 192.168.27.128:80

# SSH
#      ssh -p 8889 root@localhost
#8889 = 192.168.27.128:22

[incomingudp]

Which vagrant up replaces with:

nbdsTimeout = 3




[incomingudp]

Now if I start filling in the space with random stuff like:

nbdsTimeout = 3


[incomingtcp]
# pass

[incomingudp]

And try another vagrant up I actually get some working but terribly mangled and repeated output:

nbdsTimeout = 3


[incomingtcp]
# pass
# VAGRANT-BEGIN: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
443 = 192.168.6.128:443
# VAGRANT-END: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
# VAGRANT-BEGIN: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
# VAGRANT-BEGIN: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
443 = 192.168.6.128:443
# VAGRANT-END: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
5433 = 192.168.6.128:5432
# VAGRANT-END: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
# VAGRANT-BEGIN: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
443 = 192.168.6.128:443
# VAGRANT-END: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
# VAGRANT-BEGIN: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
# VAGRANT-BEGIN: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
443 = 192.168.6.128:443
# VAGRANT-END: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
# VAGRANT-BEGIN: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
# VAGRANT-BEGIN: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
443 = 192.168.6.128:443
# VAGRANT-END: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
5433 = 192.168.6.128:5432
# VAGRANT-END: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
# VAGRANT-BEGIN: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
443 = 192.168.6.128:443
# VAGRANT-END: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
2222 = 192.168.6.128:22
# VAGRANT-END: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
# VAGRANT-BEGIN: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
443 = 192.168.6.128:443
# VAGRANT-END: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
# VAGRANT-BEGIN: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
# VAGRANT-BEGIN: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
443 = 192.168.6.128:443
# VAGRANT-END: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
5433 = 192.168.6.128:5432
# VAGRANT-END: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
# VAGRANT-BEGIN: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
443 = 192.168.6.128:443
# VAGRANT-END: C:\Users\Kyle\Documents\git\site\.vagrant\machines\default\vmware_workstation[incomingtcp]
# pass
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
bc619f8-c1fa-4ea1-a9e2-acabf612257a\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx

[incomingudp]

Surely these kind of outputs can only be the result of a fragile string replace? Why not parse the conf like an ini file instead?

For reference here is the full default file from Workstation 12.0.1. Was it formatted differently in older versions of Workstation?

# Windows NAT configuration file

[host]

# NAT gateway address
ip = 192.168.154.2/24
hostMAC = 00:50:56:C0:00:08

# enable configuration; disabled by default for security reasons
#configport = 33445

# VMnet device if not specified on command line
device = vmnet8

# Allow PORT/EPRT FTP commands (they need incoming TCP stream...)
activeFTP = 1

# Allows the source to have any OUI.  Turn this one if you change the OUI
# in the MAC address of your virtual machines.
allowAnyOUI = 1

# Controls if (TCP) connections should be reset when the adapter
# they are bound to goes down.
resetConnectionOnLinkDown = 1

# Controls if (TCP) connections should be reset when guest TCP packet's
# destination is the NAT's IP itself.
resetConnectionOnDestLocalHost = 1

# Controls if enable ipv6 for NAT mode
natIp6Enable = 0

# Controls if set ipv6 prefix for NAT mode
natIp6Prefix = fd15:4ba5:5a2b:1008::/64

[tcp]
# Value of timeout in TCP TIME_WAIT state, in seconds
timeWaitTimeout = 30

[udp]
# Timeout in seconds, 0 = no timeout, default = 30; real value might
# be up to 100% longer
timeout = 30

[dns]
# This section applies only to Windows.
#
# Policy to use for DNS forwarding.  Accepted values include order,
# rotate, burst.
#
# order: send one DNS request at a time in order of the name servers
# rotate: send one DNS request at a time, rotate through the DNS servers
# burst: send to three servers and wait for the first one to respond
policy = order

# Timeout in seconds before retrying DNS request.
timeout = 2

# Retries before giving up on DNS request
retries = 3

# Automatically detect the DNS servers (not supported in Windows NT)
autodetect = 1

# List of DNS servers to use.  Up to three may be specified
#nameserver1 = 198.41.0.4
#nameserver2 = 192.36.148.17
#nameserver3 = 202.12.27.33

[netbios]

# Timeout for NBNS queries.
nbnsTimeout = 2

# Number of retries for each NBNS query.
nbnsRetries = 3

# Timeout for NBDS queries.
nbdsTimeout = 3

[incomingtcp]
# Use these with care - anyone can enter into your virtual machine through these...

# FTP (both active and passive FTP is always enabled)
#      ftp localhost 8887
#8887 = 192.168.27.128:21

# WEB (make sure that if you are using named webhosting, names point to
#     your host, not to guest... And if you are forwarding port other
#     than 80 make sure that your server copes with mismatched port 
#     number in Host: header)
#      lynx http://localhost:8888
#8888 = 192.168.27.128:80

# SSH
#      ssh -p 8889 root@localhost
#8889 = 192.168.27.128:22

[incomingudp]
# UDP port forwarding example
#6000 = 192.168.27.128:6001

[PrivilegedTCP]
autodetect = 1

[PrivilegedUDP]
autodetect = 1

@kylemacfarlane
Copy link

I believe the cause of this bug is hyphens in the path to the Vagrantfile.

First overwrite the [incomingtcp] section of your vmnetnat.conf with the clean install from my comment above. Then restart the VM NAT service to clear out any ports already forwarded.

Then create a Vagrantfile with forwarded ports in a directory like C:\Users\Kyle\Documents\git\vagranttest\ Do vagrant up, halt, reload, etc and everything will work fine.

Now create a Vagrantfile with forwarded ports in a directory with a hypen like C:\Users\Kyle\Documents\git\vagrant-test\. Do a vagrant up and now things get weird. Sometimes the entire [incomingtcp] section is deleted, sometimes it's not but no ports are forwarded, and sometimes ports are forwarded but the output is mangled like:

# VAGRANT-BEGIN: C:\Users\Kyle\Documents\git\vagrant-test\.vagrant\machines\default\vmware_workstation
# VAGRANT-BEGIN: C:\Users\Kyle\Documents\git\vagrant-test\.vagrant\machines\default\vmware_workstation[14022f9-2f59-400a-ae19-7f3ac64bf761\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
2222 = 192.168.6.132:22
# VAGRANT-END: C:\Users\Kyle\Documents\git\vagrant-test\.vagrant\machines\default\vmware_workstation[14022f9-2f59-400a-ae19-7f3ac64bf761\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
[14022f9-2f59-400a-ae19-7f3ac64bf761\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx
558 = 192.168.6.132:558
# VAGRANT-END: C:\Users\Kyle\Documents\git\vagrant-test\.vagrant\machines\default\vmware_workstation
[14022f9-2f59-400a-ae19-7f3ac64bf761\packer-centos-7.0-x86_64-vmware-vagrant-nocm-1438941939.vmx

Even if your forwarded ports aren't already broken they will be soon as each vagrant up/halt/destroy will corrupt your vmnetnat.conf more and more.

Looking at the paths of other people in this thread:

  • @Kenny-Stimson = unknown, but he as a hyphen in is name at least
  • @a-zen = C:/Users/zena/dev/elastic-test/Vagrantfile from their debug output above
  • @PoetikDragon = unknown, but she does have a repo called obloquy-api that contains a Vagrantfile

@dragon788
Copy link
Contributor

Another thought that just struck me, how many folks here are using Git(Hub) for Windows and/or Git Bash on their systems, and did you allow it to add the executables to the system path? I believe there are versions of at least git and ssh, and if it is prepending itself to the path, if there is a ruby.exe or anything else that Vagrant is looking for, it could be finding the wrong one if it's not a hardcoded path.

@chrisroberts
Copy link
Member

Hi. The latest release of the vmware plugin includes a fix that should resolve this issue:

https://github.com/hashicorp/vagrant-plugin-changelog/blob/master/vagrant-vmware-changelog.md#4011-august-29-2016

If the issue persists after updating, please let me know. Thanks!

@kylemacfarlane
Copy link

kylemacfarlane commented Sep 28, 2016

It seems fixed to me. I upgraded to VMWare 12.5, Vagrant 1.8.5, and vagrant-vmware 4.0.11 and haven't seen the hyphen related problem since.

@chrisroberts
Copy link
Member

Great, thanks for the confirmation!

@ilude
Copy link

ilude commented Nov 16, 2016

This issue is not fixed! Reproduced on two separate machines:

vagrant 1.8.7
vagrant-vmware-workstation (4.0.14)
VMWare Workstation Pro 12.5.2 build-4638234
Windows 7 Pro

Its related to the vagrant guid for the box. Created a box that was assigned a guid of 1c6766aa-9f5e-4a84-9ab3-ab68adf3b2da

After booting could not access the mapped ports on localhost. But using the ip assigned to the box was able to access services on the guest. Looking at C:\ProgramData\VMware\vmnetnat.conf the entire [incomingtcp] was missing from the file.

halted the vagrant box.

Opened the VMware Virtual Network Editor and Reset Defaults, to restore the [incomingtcp] back to C:\ProgramData\VMware\vmnetnat.conf

After that we performed the following:

Renamed the directory .vagrant\machines\default\vmware_workstation\1c6766aa-9f5e-4a84-9ab3-ab68adf3b2da to .vagrant\machines\default\vmware_workstation\cc6766aa-9f5e-4a84-9ab3-ab68adf3b2da (note the only char changed is the first char from a 1 to a c). We then updated the paths in .vagrant\machines\default\vmware_workstation\action_provision and .vagrant\machines\default\vmware_workstation\id to contain the new directory name.

And then re-upped the vagrant box. Box came up and port forwarding was functioning and the C:\ProgramData\VMware\vmnetnat.conf file contained the expected [incomingtcp] section and data.

My coworker and I expect that the vagrant-vmware-workstation plugin is attempting to edit the C:\ProgramData\VMware\vmnetnat.conf file and failing. We have also seen it write to this file with extra line feeds on the comment lines that wrap the port forwarding sections. Our best guess, since we cannot review the code is that the code to edit the vmnetnat.conf is somehow getting screwed up by the backslash and its being interpreted as a control/escape character.

Once the vmnetnat.conf file is messed up its pretty much messed up for good and the only way to get back to a working state is to reset theVMware Virtual Network Editor defaults.

@kylemacfarlane
Copy link

For what it's worth I still haven't seen this bug since upgrading but then again I've only been using the same 1-3 boxes recently.

My original suspicion for the bug was that it was a text replace bug like a badly escaped regex as hyphens have special meanings in regex. "\1" also has special meaning.

@ilude
Copy link

ilude commented Nov 17, 2016

That's our suspicion as well. Its using a regex to parse the # VAGRANT-BEGIN: and # VAGRANT-ENDS and replace the block between. Kinda feels like the old "you can't parse HTML with a regex" problem. But without seeing the code its just a guess.

Whatever it is, its not fixed with just a vagrant reload as stated here: https://www.vagrantup.com/docs/vmware/known-issues.html

And as stated once the vmnetnat.conf file is messed up its unlikely to be fixed, except for resetting the virtual networking default because the [incomingtcp] header is completely removed.

@doctapp
Copy link

doctapp commented Oct 3, 2017

Same problem with C:\ProgramData\VMware\vmnetnat.conf getting corrupted by vagrant 2.0.0 using VMware Workstation Pro 12 on Windows 10 x64. Tried fix from @ilude but failed.

Any idea?

Thanks

@ghost
Copy link

ghost commented Mar 31, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests