Home>
[Question]

I wanted to create a development environment dedicated to PHP. "I created it as I learned from dot installation, but I can't connect to cyberduck.
Please tell us what works and how it works. . .

[Background]

In order to learn PHP, I learned how to build a development environment in "Installing a Local Development Environment [macOS]" of dot installation.

These all went well, but in "MyVagrant" we created a new directory to build a development environment different from "MyCentOS", and made a new connection to Cyberduck in the same way as the learning video.

"Connection failed
Operation timed out (Connection timed out). The connection attempt was rejected. The server may be down or the network settings may be incorrect. . "

comes out and I cannot connect.

[What you know]

● Two directories are created in MyVagrant as shown below.

・ HOME/MyVagrant/MyCentOS/
・ HOME/MyVagrant/MyCentOS2/

● Setting IP: 192.168.33.11 (It will be different from MyCentOS IP.)

● The vagrant file has no # as shown below.
"Config.vm.network" private_network ", ip:" 192.168.33.11 ""

● The original MyCentOS can be connected.

● When connecting a new connection, it is done in the manner of a dot installation video.

・ Select SFTP
・ Server: 192.168.33.11
・ Port: 22
User name/path: vagrant
・ Add to keychain

・ ping -c 10 result of yahoo.co.jp
[vagrant @ localhost ~] $ping -c 10 yahoo.co.jp
PING yahoo.co.jp (182.22.59.229) 56 (84) bytes of data.
64 bytes from f1.top.vip.ssk.yahoo.co.jp (182.22.59.229): icmp_seq = 1 ttl = 63 time = 10.9 ms
64 bytes from f1.top.vip.ssk.yahoo.co.jp (182.22.59.229): icmp_seq = 2 ttl = 63 time = 19.9 ms
64 bytes from f1.top.vip.ssk.yahoo.co.jp (182.22.59.229): icmp_seq = 3 ttl = 63 time = 9.22 ms
64 bytes from f1.top.vip.ssk.yahoo.co.jp (182.22.59.229): icmp_seq = 4 ttl = 63 time = 18.7 ms
64 bytes from f1.top.vip.ssk.yahoo.co.jp (182.22.59.229): icmp_seq = 5 ttl = 63 time = 18.1 ms
64 bytes from f1.top.vip.ssk.yahoo.co.jp (182.22.59.229): icmp_seq = 6 ttl = 63 time = 9.68 ms
64 bytes from f1.top.vip.ssk.yahoo.co.jp (182.22.59.229): icmp_seq = 7 ttl = 63 time = 9.33 ms
64 bytes from f1.top.vip.ssk.yahoo.co.jp (182.22.59.229): icmp_seq = 8 ttl = 63 time = 15.7 ms
64 bytes from f1.top.vip.ssk.yahoo.co.jp (182.22.59.229): icmp_seq = 9 ttl = 63 time = 18.1 ms
64 bytes from f1.top.vip.ssk.yahoo.co.jp (182.22.59.229): icmp_seq = 10 ttl = 63 time = 15.3 ms

--- yahoo.co.jp ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9048ms
rtt min/avg/max/mdev = 9.223/14.529/19.956/4.093 ms

・ Mac's firewall (Settings>Security&Privacy>Firewall) was turned off.

・ Login result with vagrant ssh
*-2: MyCentOS2 *$vagrant ssh
Last login: Thu Nov 28 00:26:15 2019 from 10.0.2.2
[vagrant @ localhost ~] $

-Login result with ssh [email protected]
*-2: MyCentOS2 *$ssh [email protected]
ssh: connect to host 192.168.33.11 port 22: Operation timed out

・ Check with ip addr
[vagrant @ localhost ~] $ip addr
1: lo:mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00: 00: 00: 00: 00: 00 brd 00: 00: 00: 00: 00: 00
inet 127.0.0.1/8 scope host lo
inet6 :: 1/128 scope host
valid_lft forever preferred_lft forever
2: eth0:mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08: 00: 27: 40: 17: 62 brd ff: ff: ff: ff: ff: ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0
inet6 fe80 :: a00: 27ff: fe40: 1762/64 scope link
valid_lft forever preferred_lft forever

・ Version of vagrant
* -2: MyCentOS2 * $vagrant version
Installed Version: 2.2.6
Latest Version: 2.2.6

You're running an up-to-date version of Vagrant!

・ Number of files in Cyberduck
MyCentOS1

MyCentOS2

Thanks for your cooperation.

  • Answer # 1

    It seems that private_network setting specified in Vagrantfile is not reflected in Ubuntu.
    Use the following procedure to recreate it.

    cd MyCentOs2
    vagrant destory → Enter "y" when asked if you want to delete
    vagrant up

  • Answer # 2

    How about pinging, whether firewalld is dropped, and whether the firewall related software of the host OS is dropped or not.