lando / platformsh

The Official Platform.sh Lando Plugin
https://docs.lando.dev/platformsh
GNU General Public License v3.0
6 stars 4 forks source link

Problems starting Platform.sh recipe: "fatal: unable to lock supervise/lock: temporary failure" #53

Closed jasonevines closed 2 years ago

jasonevines commented 3 years ago

Tell us about your setup

v.3.1.2 on Mac OS X Big Sur

Tell us about your .lando.yml

(Files renamed not to be hidden and to use .txt extension so I can upload them to GitHub)

.lando.yml .lando.upstream.yml .platform.app.yaml

(Files renamed to use .txt extension so I can upload them to GitHub)

.platform/services.yaml .platform/routes.yaml

Tell us about the command you were running

lando init --source cwd --recipe platformsh
lando start -vvv

Tell us about the error you got

Logs from the "db" service:

lando-logs-db-service.txt

Logs from the "app" service:

lando-logs-app-service.txt

Tell us generally about your bug

I'm trying to boot up the Lando Platform.sh recipe from an existing Drupal 8 Composer codebase. I ran "lando init --source platformsh" in another folder, copied the Platform.sh config files and the Lando config files to the existing project, and then modified as demonstrated in the attachments.

Judging only from the output on the command line, everything appears to go fine; no errors are reported. And all package installations and compilations appear to finish successfully.

But in the logs for every service using Platform.sh images, lines like "runsv app: fatal: unable to lock supervise/lock: temporary failure" repeat a bunch of times. And in the logs for the app service, this error appears: "ERROR Unable to render template /etc/nginx/nginx.conf".

The practical effect is that relationships like the database are inaccessible, so the Lando app is unusable.

jasonevines commented 3 years ago

FYI, when I boot up from the folder where I had ran "lando init --source platformsh," without modifying anything, all the services start fine. This is even though they all produce the same error messages in their logs as what I provided in the first post of this thread.

jasonevines commented 3 years ago

The problem appears to have related to using MariaDB 10.5. Switching to MariaDB 10.4 makes the Lando app work fine.

I had tried switching from 10.5 back to 10.4 previously, but I had neglected to destroy the Lando app after updating the services.yaml config file. I just rebuilt, which turned out not to be sufficient.

It would be nice to be able to use 10.5, but that's not as critical of an issue.

simonkey commented 3 years ago

We've the problem for multiple projects. The container get's stuck at Waiting for /run/shared/agent.sock to be ready....

@pirog This is the error before it get's stuck:

platformsh-prepare 14:30:46.80 DEBUG ==> Waiting for /run/shared/agent.sock to be ready...
Traceback (most recent call last):
  File "/helpers/psh-fake-rpc.py", line 1, in <module>
    from gevent.monkey import patch_all;
ImportError: No module named gevent.monkey

And then a timeout happens.

pirog commented 3 years ago

@ralt do you have any insight on ImportError: No module named gevent.monkey do we need to update our fake RpcServer at all with new or updated deps? This is the server currently:

from gevent.monkey import patch_all;
patch_all();
from gevent_jsonrpc import RpcServer;
import json;
RpcServer(
    "/run/shared/agent.sock",
    "foo",
    root=None,
    root_factory=lambda c,a: c.send(json.dumps({"jsonrpc":"2.0","result":True,"id": json.loads(c.recv(1024))["id"]})))._accepter_greenlet.get();
simonkey commented 3 years ago

@pirog Is there any update about the solution of this issue?

reynoldsalec commented 2 years ago

I believe the root issue here is Mariadb:10.5, which has been a longstanding issue on Lando: #63

Closing as a dup, since progress has continued on that ticket.