Closed andileco closed 2 years ago
@andileco not surprising. we are still working through what things we need to change to reach full M1 support.
@pirog happy to be a test subject if you need someone to manually try fixes.
@andileco nice. definitely will take advantage of that.
we will be working on M1 support, specifically for the Pantheon recipe over the next two weeks!
I'm currently on Pantheon and also running into troubles with the database. Attempting to run the exact same project on my Macbook Air M1, I can seemingly pull the database fine with lando pull
but when I attempt to clear the site cache, I get this error:
If I attempt to just visit the site, I get this error:
It's the same errors everytime I try to re-pull and re-visit the site or re-clear the cache.
I've tried to rebuild the app. I've repulled multiple times thinking maybe it messed up somehow. I've tried with Docker 3.6 and 4.1 (I saw an issue where some people suggested there were improvements to mysql M1 compatibility in an rc2 branch that I believe has been committed as of the latest Docker version). More info here: https://github.com/docker/for-mac/issues/5389
Another thing I've noticed is that dropping tables is extremely slow. If I try to repull, it will first try to drop all tables and this goes at a snail's pace, maybe 1 small table every 10 seconds and some of the larger tables taking multiple minutes. Considering my site has over 900 tables, it can take quite a while just for the tables to get dropped. Running a lando destroy
is far faster than waiting for tables to get dropped.
A third thing I've noticed, unrelated to databases, is that file syncing also takes forever. I ran a lando pull -d=none -f=live -c=none
overnight and it wasn't finished by the time I woke up. In fact, it was in the middle of pulling these automated excel sheets on our site and it was at 4000 out of 32000 excel files, with each file being maybe like 50kb. Not a huge export by any means but it still took over 8 hours to not even be close to finishing. Not sure how many images it managed to pull before this which I imagine would take even longer.
I'm running into the same problem. Any update on this one?
Something we hope to resolve in the next few weeks
Thanks for the update @pirog ! Thank you and the team for all the hard work and appreciate the efforts towards supporting m1.
It might be that we need an arm64 database for m1. This is from docker's notes on apple silicon: "In particular, the mysql image is not available for ARM64. You can work around this issue by using a mariadb image. However, attempts to run Intel-based containers on Apple Silicon machines under emulation can crash as qemu sometimes fails to run the container. In addition, filesystem change notification APIs (inotify) do not work under qemu emulation...In summary, running Intel-based containers on Arm-based machines should be regarded as “best effort” only."
mariadb has arm64 version ready. tried this, https://hub.docker.com/r/arm64v8/mariadb/ but got an error with "/launch.sh: line 10: /entrypoint.sh: No such file or directory" in container. (but I barely know what I'm doing)
Alec's notes from chatting with Pirog about implementation here:
Normal integrations...
Panthon integration...
To do this task...
$(options.data):/bitnami/mariadb
config in the mariadb builder.js, swap out for /var/lib/mysql.Merged; this will be in the next Lando release (3.6.0) which should be coming out tomorrow.
I'm still getting this error after today's release (I'm on a arm64 mac) when I try to import database (db-import):
Error response from daemon: Container 56daa31cc7ba12739dd81a21817a4c28429966d4f5a5b1cc682d7115e4bd4ca5 is not running Starting project_database_1 ... done
also, when I run lando drush cr
I get this:
In Connection.php line 190:
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known
In Connection.php line 190:
PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known
@paulogabriel did you do a destroy and start after you upgraded?
@labboy0276 I did it all from scratch just to be sure... deleted the local repo, cloned it again, lando start for the first time then.
@labboy0276 and yes, destroyed it as well before cloning/starting again
@paulogabriel can you trying setting edge and cache to false in your lando file via:
recipe: pantheon
config:
framework: PANTHEON_SITE_FRAMEWORK
id: PANTHEON_SITE_ID
site: PANTHEON_SITE_MACHINE_NAME
edge: false
cache: false
@labboy0276 I get this:
Starting project_database_1 ... done
Starting project_index_1 ... done
Starting project_appserver_1 ... done
Starting project_appserver_nginx_1 ... done
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
and keeps going
@paulogabriel what do your logs say lando logs -s database
@labboy0276
database_1 | userperms 01:03:43.42 WARN ==> Only the root user can reset permissions! This is probably ok though...
database_1 | loadkeys 01:03:43.64 WARN ==> Only the root user can load ssh keys! This is probably ok though...
database_1 | lando 01:03:43.67 INFO ==> Lando handing off to: docker-entrypoint.sh mysqld
database_1 | lando 01:03:43.69 DEBUG ==> Running command with exec...
database_1 | /lando-entrypoint.sh: 83: exec: docker-entrypoint.sh: not found
database_1 | userperms 01:09:50.73 WARN ==> Only the root user can reset permissions! This is probably ok though...
database_1 | loadkeys 01:09:50.86 WARN ==> Only the root user can load ssh keys! This is probably ok though...
database_1 | lando 01:09:50.89 INFO ==> Lando handing off to: docker-entrypoint.sh mysqld
database_1 | lando 01:09:50.91 DEBUG ==> Running command with exec...
database_1 | /lando-entrypoint.sh: 83: exec: docker-entrypoint.sh: not found
database_1 | userperms 01:21:06.88 WARN ==> Only the root user can reset permissions! This is probably ok though...
database_1 | loadkeys 01:21:06.98 WARN ==> Only the root user can load ssh keys! This is probably ok though...
database_1 | lando 01:21:07.00 INFO ==> Lando handing off to: docker-entrypoint.sh mysqld
database_1 | lando 01:21:07.01 DEBUG ==> Running command with exec...
database_1 | /lando-entrypoint.sh: 83: exec: docker-entrypoint.sh: not found
database_1 | userperms 02:07:30.78 WARN ==> Only the root user can reset permissions! This is probably ok though...
database_1 | loadkeys 02:07:30.88 WARN ==> Only the root user can load ssh keys! This is probably ok though...
database_1 | lando 02:07:30.90 INFO ==> Lando handing off to: docker-entrypoint.sh mysqld
database_1 | lando 02:07:30.91 DEBUG ==> Running command with exec...
database_1 | /lando-entrypoint.sh: 83: exec: docker-entrypoint.sh: not found
database_1 | userperms 02:33:13.25 WARN ==> Only the root user can reset permissions! This is probably ok though...
database_1 | loadkeys 02:33:13.45 WARN ==> Only the root user can load ssh keys! This is probably ok though...
database_1 | lando 02:33:13.49 INFO ==> Lando handing off to: docker-entrypoint.sh mysqld
database_1 | lando 02:33:13.51 DEBUG ==> Running command with exec...
database_1 | /lando-entrypoint.sh: 83: exec: docker-entrypoint.sh: not found
database_1 | userperms 02:34:26.86 WARN ==> Only the root user can reset permissions! This is probably ok though...
database_1 | loadkeys 02:34:27.08 WARN ==> Only the root user can load ssh keys! This is probably ok though...
database_1 | lando 02:34:27.14 INFO ==> Lando handing off to: docker-entrypoint.sh mysqld
database_1 | lando 02:34:27.22 DEBUG ==> Running command with exec...
database_1 | /lando-entrypoint.sh: 83: exec: docker-entrypoint.sh: not found
database_1 | userperms 02:35:05.11 WARN ==> Only the root user can reset permissions! This is probably ok though...
database_1 | loadkeys 02:35:05.29 WARN ==> Only the root user can load ssh keys! This is probably ok though...
database_1 | lando 02:35:05.34 INFO ==> Lando handing off to: docker-entrypoint.sh mysqld
database_1 | lando 02:35:05.37 DEBUG ==> Running command with exec...
database_1 | /lando-entrypoint.sh: 83: exec: docker-entrypoint.sh: not found
database_1 | userperms 16:12:23.48 WARN ==> Only the root user can reset permissions! This is probably ok though...
database_1 | loadkeys 16:12:23.62 WARN ==> Only the root user can load ssh keys! This is probably ok though...
database_1 | lando 16:12:23.65 INFO ==> Lando handing off to: docker-entrypoint.sh mysqld
database_1 | lando 16:12:23.67 DEBUG ==> Running command with exec...
database_1 | /lando-entrypoint.sh: 83: exec: docker-entrypoint.sh: not found
@paulogabriel can you post the whole log from the beginning please
@labboy0276 sure! here:
Attaching to project_database_1
database_1 |
database_1 |
database_1 |
database_1 | STARTING UP
database_1 |
database_1 | ██ █████ ███ ██ ██████ ██████
database_1 | ██ ██ ██ ████ ██ ██ ██ ██ ██
database_1 | ██ ███████ ██ ██ ██ ██ ██ ██ ██
database_1 | ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
database_1 | ███████ ██ ██ ██ ████ ██████ ██████
database_1 |
database_1 | The best local development tool in the galaxy!
database_1 |
database_1 |
database_1 | ===============================================================
database_1 |
database_1 |
database_1 | userperms 01:03:43.42 WARN ==> Only the root user can reset permissions! This is probably ok though...
database_1 | loadkeys 01:03:43.64 WARN ==> Only the root user can load ssh keys! This is probably ok though...
database_1 | lando 01:03:43.67 INFO ==> Lando handing off to: docker-entrypoint.sh mysqld
database_1 | lando 01:03:43.69 DEBUG ==> Running command with exec...
database_1 | /lando-entrypoint.sh: 83: exec: docker-entrypoint.sh: not found
database_1 | userperms 01:09:50.73 WARN ==> Only the root user can reset permissions! This is probably ok though...
database_1 | loadkeys 01:09:50.86 WARN ==> Only the root user can load ssh keys! This is probably ok though...
database_1 | lando 01:09:50.89 INFO ==> Lando handing off to: docker-entrypoint.sh mysqld
database_1 | lando 01:09:50.91 DEBUG ==> Running command with exec...
database_1 | /lando-entrypoint.sh: 83: exec: docker-entrypoint.sh: not found
database_1 | userperms 01:21:06.88 WARN ==> Only the root user can reset permissions! This is probably ok though...
database_1 | loadkeys 01:21:06.98 WARN ==> Only the root user can load ssh keys! This is probably ok though...
database_1 | lando 01:21:07.00 INFO ==> Lando handing off to: docker-entrypoint.sh mysqld
database_1 | lando 01:21:07.01 DEBUG ==> Running command with exec...
database_1 | /lando-entrypoint.sh: 83: exec: docker-entrypoint.sh: not found
database_1 | userperms 02:07:30.78 WARN ==> Only the root user can reset permissions! This is probably ok though...
database_1 | loadkeys 02:07:30.88 WARN ==> Only the root user can load ssh keys! This is probably ok though...
database_1 | lando 02:07:30.90 INFO ==> Lando handing off to: docker-entrypoint.sh mysqld
database_1 | lando 02:07:30.91 DEBUG ==> Running command with exec...
database_1 | /lando-entrypoint.sh: 83: exec: docker-entrypoint.sh: not found
database_1 | userperms 02:33:13.25 WARN ==> Only the root user can reset permissions! This is probably ok though...
database_1 | loadkeys 02:33:13.45 WARN ==> Only the root user can load ssh keys! This is probably ok though...
database_1 | lando 02:33:13.49 INFO ==> Lando handing off to: docker-entrypoint.sh mysqld
database_1 | lando 02:33:13.51 DEBUG ==> Running command with exec...
database_1 | /lando-entrypoint.sh: 83: exec: docker-entrypoint.sh: not found
database_1 | userperms 02:34:26.86 WARN ==> Only the root user can reset permissions! This is probably ok though...
database_1 | loadkeys 02:34:27.08 WARN ==> Only the root user can load ssh keys! This is probably ok though...
database_1 | lando 02:34:27.14 INFO ==> Lando handing off to: docker-entrypoint.sh mysqld
database_1 | lando 02:34:27.22 DEBUG ==> Running command with exec...
database_1 | /lando-entrypoint.sh: 83: exec: docker-entrypoint.sh: not found
database_1 | userperms 02:35:05.11 WARN ==> Only the root user can reset permissions! This is probably ok though...
database_1 | loadkeys 02:35:05.29 WARN ==> Only the root user can load ssh keys! This is probably ok though...
database_1 | lando 02:35:05.34 INFO ==> Lando handing off to: docker-entrypoint.sh mysqld
database_1 | lando 02:35:05.37 DEBUG ==> Running command with exec...
database_1 | /lando-entrypoint.sh: 83: exec: docker-entrypoint.sh: not found
database_1 | userperms 16:12:23.48 WARN ==> Only the root user can reset permissions! This is probably ok though...
database_1 | loadkeys 16:12:23.62 WARN ==> Only the root user can load ssh keys! This is probably ok though...
database_1 | lando 16:12:23.65 INFO ==> Lando handing off to: docker-entrypoint.sh mysqld
database_1 | lando 16:12:23.67 DEBUG ==> Running command with exec...
database_1 | /lando-entrypoint.sh: 83: exec: docker-entrypoint.sh: not found
So far haven't been able to replicate this issue @paulogabriel on my M1; I suspect that this may be an issue specific to your installation, but I'll see if I can track down a mechanism for why this might occur.
@reynoldsalec thank you for looking into this!
@labboy0276 @reynoldsalec I just found out my problem was caused by a set of configuration in my lando.base file. I adjusted them and now database is being imported!!
@paulogabriel nice! Out of curiosity, what was in your config file that seemed to be the problem?
@reynoldsalec
services:
database:
overrides:
image: bitnami/mariadb:10.4.12
That makes total sense, thanks for clarifying @paulogabriel!
@paulogabriel what setting are you using now?
@nkathiresshan I'm deleting that setting I commented above.
Tell us about your setup
What is your lando version and operating system? (note that the older your version the less likely we are to reply)
Machine: MacBook Pro, BiG Sur v 11.5.2, Apple M1, 16GB memory Docker: 3.6.0 (packaged with Lando) Lando: 3.3.2
Tell us about your
.lando.yml
*pantheon.yml"
Tell us about the command you were running
After I run
lando rebuild -y
orlando start
, the database basically immediately stops (I see this in the Docker dashboard), sometimes before even accessing the site, sometimes it will let me touch one or two pages before the container stops. I also stops in the middle of alando pull
- in this case, it generates an error like, "ERROR 2013 (HY000) at line 4753: Lost connection to MySQL server during query".Tell us about the error you got
Other than the error during the database pull, there's no error, the database just stops. If I click into the database container, I see this:
Tell us generally about your bug
This basically happens on all my Pantheon sites. SOMETIMES I can get the database to be stable for a few minutes by basically running a lot of Docker restarts,
lando destroy
,lando rebuild -y
,lando start
, but it doesn't seem like there's a perfect sequence of these commands that works every time.Tell us more
Does this bug prevent you from using lando? YES