Closed leonk closed 7 years ago
Hmmm, I re-ran the init
a few times, and now seem to have the default
database setup. But Drupal is still unable to connect to it. It looks like mysql-server
has not been installed.
@leonk please post the output of fin sysinfo
here
███ OS & BASICS
Darwin Leons-MacBook-Pro.local 16.1.0 Darwin Kernel Version 16.1.0: Wed Oct 19 20:31:56 PDT 2016; root:xnu-3789.21.4~4/RELEASE_X86_64 x86_64
fin version: 0.11.8
███ INSTANCES
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
docksal - virtualbox Running tcp://192.168.64.100:2376 v1.12.3
███ DOCKER
DOCKER_HOST:
Docker: Client:
Version: 1.12.3
API version: 1.24
Go version: go1.6.3
Git commit: 6b644ec
Built: Wed Oct 26 23:26:11 2016
OS/Arch: darwin/amd64
Server:
Version: 1.12.3
API version: 1.24
Go version: go1.6.3
Git commit: 6b644ec
Built: Wed Oct 26 23:26:11 2016
OS/Arch: linux/amd64
███ DOCKER COMPOSE
Docker Compose: docker-compose version 1.8.0, build f3628c7
docker-py version: 1.9.0
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.2h 3 May 2016
███ DOCKER MACHINE
docker-machine version 0.8.2, build e18a919
███ VIRTUAL BOX
5.1.10r112026
███ NETWORK INTERFACES
Name: vboxnet0
GUID: 786f6276-656e-4074-8000-0a0027000000
DHCP: Disabled
IPAddress: 192.168.33.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:00
MediumType: Ethernet
Status: Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet0
Name: vboxnet1
GUID: 786f6276-656e-4174-8000-0a0027000001
DHCP: Disabled
IPAddress: 192.168.57.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:01
MediumType: Ethernet
Status: Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet1
Name: vboxnet2
GUID: 786f6276-656e-4274-8000-0a0027000002
DHCP: Disabled
IPAddress: 192.168.19.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:02
MediumType: Ethernet
Status: Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet2
Name: vboxnet3
GUID: 786f6276-656e-4374-8000-0a0027000003
DHCP: Disabled
IPAddress: 192.168.88.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:03
MediumType: Ethernet
Status: Up
VBoxNetworkName: HostInterfaceNetworking-vboxnet3
Name: vboxnet4
GUID: 786f6276-656e-4474-8000-0a0027000004
DHCP: Disabled
IPAddress: 33.33.33.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:04
MediumType: Ethernet
Status: Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet4
Name: vboxnet5
GUID: 786f6276-656e-4574-8000-0a0027000005
DHCP: Disabled
IPAddress: 192.168.64.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:05
MediumType: Ethernet
Status: Up
VBoxNetworkName: HostInterfaceNetworking-vboxnet5
Name: vboxnet6
GUID: 786f6276-656e-4674-8000-0a0027000006
DHCP: Disabled
IPAddress: 192.168.30.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:06
MediumType: Ethernet
Status: Up
VBoxNetworkName: HostInterfaceNetworking-vboxnet6```
I can't connect to mysql from the bash either (but I can from the host when running fin sqlc
)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
docker@cli:/var/www$```
If you can connect to the db via fin sqlc
, then it's up and running.
When you re-run fin init
for this project, what do you get in the output?
WARNING: No kernel memory limit support
Step 1 Initializing local project configuration...
/Users/leonkessler/Sites/mirum/drupal8/docroot/sites/default/settings.local.php already in place.
Step 2 Recreating services...
WARNING: No kernel memory limit support
Removing containers...
Stopping drupal8_web_1 ... done
Stopping drupal8_cli_1 ... done
Stopping drupal8_db_1 ... done
Removing drupal8_web_1 ... done
Removing drupal8_cli_1 ... done
Removing drupal8_db_1 ... done
Removing network drupal8_default
Removing volume drupal8_project_root
Volume docksal_ssh_agent is external, skipping
Removing volume drupal8_host_home
Starting services...
Creating network "drupal8_default" with the default driver
Creating volume "drupal8_project_root" with local driver
Creating volume "drupal8_host_home" with local driver
Creating drupal8_cli_1
Creating drupal8_db_1
Creating drupal8_web_1
Changing user id in cli to 501 to match host user id...
Resetting permissions on /var/www...
Restarting php daemon...
Connected vhost-proxy to "drupal8_default" network.
Waiting 10s for MySQL to start...
Step 3 Installing site...
WARNING: No kernel memory limit support
You are about to DROP all tables in your 'default' database. Do you want to continue? (y/n): y
Starting Drupal installation. This takes a while. Consider using the --notify global option. [ok]
Installation complete. User name: admin User password: zyJvAevHqB [ok]
Congratulations, you installed Drupal! [status]
real 2m59.433s
user 0m0.279s
sys 0m0.133s
DONE! Open http://drupal8.docksal in your browser to verify the setup.
When I go to http://drupal8.docksal I firstly don't have a proper vhost setup (so I get the home directory). Once I go to my site's folder I get
Warning: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known
Looks like you are trying to access the site via your local stack (i.e. 127.0.0.1) and not the one provided by Docksal.
Name resolution and virtual host configuration is handled automatically by Docksal on Mac.
ping drupal8.docksal
?
Should resolve to 192.168.64.100
automatically:
PING drupal8.docksal (192.168.64.100): 56 data bytes
64 bytes from 192.168.64.100: icmp_seq=0 ttl=64 time=0.256 ms
Also, please post output from fin docker ps
WARNING: No kernel memory limit support
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e0c57ebea19f docksal/web:1.0-apache2.2 "/opt/startup.sh apac" 56 minutes ago Up 56 minutes 80/tcp, 443/tcp drupal8_web_1
19c1fc934a4e docksal/db:1.0-mysql-5.5 "/entrypoint.sh mysql" 56 minutes ago Up 56 minutes 0.0.0.0:32773->3306/tcp drupal8_db_1
6c76aaf48aaa docksal/cli:1.0-php7 "/opt/startup.sh gosu" 56 minutes ago Up 56 minutes 22/tcp, 9000/tcp drupal8_cli_1
d970e7cd4ce6 docksal/ssh-agent:1.0 "/run.sh ssh-agent" 9 hours ago Up 9 hours docksal-ssh-agent
25b87e36deb0 docksal/dns:1.0 "/opt/entrypoint.sh s" 9 hours ago Up 9 hours 127.0.0.1:53->53/udp docksal-dns
035b8df54ea6 docksal/vhost-proxy:1.0 "supervisord -n" 9 hours ago Up 9 hours 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp docksal-vhost-proxy
drupal8.docksal points to 127.0.0.1 for me, if I setup a host entry to 192.168.64.100
I get a 503 nginx error.
There may be two reasons as for why drupal8.docksal
points to 127.0.0.1
for you:
/etc/hosts
. Remove it if so.Ah yes I think I did switch over to docker for mac. I had issues before running fin init
Step 1 Initializing local project configuration...
/Users/leonkessler/Sites/mirum/drupal8/docroot/sites/default/settings.local.php already in place.
Step 2 Recreating services...
Removing containers...
Stopping drupal8_db_1 ... done
Removing drupal8_db_1 ... done
Removing network drupal8_default
Removing volume drupal8_project_root
Volume docksal_ssh_agent is external, skipping
Removing volume drupal8_host_home
Starting services...
Creating network "drupal8_default" with the default driver
Creating volume "drupal8_project_root" with local driver
Creating volume "drupal8_host_home" with local driver
Creating drupal8_db_1
Creating drupal8_cli_1
ERROR: for cli Cannot create container for service cli: no such file or directory
ERROR: Encountered errors while bringing up the project.
moved to a new post
Closing as outdated. Feel free to reopen if necessary.
Can anyone point me in the direction of the documentation for this issue?
You've tried Docker for Mac with Docksal and did not switch back properly. If so, please follow the instructions here
The link doesn't work anymore.
@jasonglisson See here http://docs.docksal.io/en/master/getting-started/env-setup-native/
I ran through the setup:
Installed docker and docksal: https://github.com/docksal/docksal/blob/develop/docs/env-setup.md Then cloned this repo, and ran
fin init
Everything ran fine, no reported errors. However no database is setup (there should be one called
default
). Not sure if there is some configuration I'm missing.