lando / pantheon

The Official Lando Pantheon plugin.
https://docs.lando.dev/pantheon
GNU General Public License v3.0
11 stars 18 forks source link

`lando pull` does not download DB, hangs at 0 B/s #60

Closed chrisrikli closed 2 years ago

chrisrikli commented 5 years ago

Tell us about your setup MacOS 10.14.4 (18E226) Lando v3.0.0-rc.15

Tell us about your .lando.yml

name: mypantheonsite
recipe: pantheon
config:
  framework: drupal
  site: mypantheonsite
  id: <redacted>
proxy:
  pma:
    - pma.mypantheonsite.lndo.site
services:
  pma:
    type: phpmyadmin
    hosts:
      - database
  search:
    type: solr:5.5
    core: mypantheonsite
    config:
      conf: sites/all/modules/apachesolr/solr-conf/solr-5.x

pantheon.yml:

api_version: 1
php_version: 5.6

Tell us about the command you were running

> lando pull --code=none
? Choose a Pantheon account myaccount@domain.com
? Pull database from? live
? Pull files from? none

# Pantheon login etc
Pulling database from live...
live.12345@appserver.live.12345.drush.in's password:    0 B 0:00:01 [   0 B/s] [<=>                                                                                0 B 0:00:48 [   0 B/s] [<=>

Tell us about the error you got

No error is received; the clock just runs.

Tell us generally about your bug

Once I updated lando past RC2 this started happening on all of my lando containers. I've destroyed and rebuilt, changed Pantheon terminus tokens, reinstalling Lando, reinstalling Docker, etc.

Tell us more

Seeing this on all of my lando+Pantheon setups post RC2 upgrade.

gcalex5 commented 5 years ago

I have this behavior with my lando as well. copy/paste your dashboard password and then hit enter/return. Same when prompted for files if you're trying to do that as well.

chrisrikli commented 5 years ago

Hi @gcalex5 unfortunately that isn't the issue; I've entered that password when directed to do so.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions and please check out this if you are wondering why we auto close issues.

pirog commented 5 years ago

unstale

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions and please check out this if you are wondering why we auto close issues.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions and please check out this if you are wondering why we auto close issues.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions and please check out this if you are wondering why we auto close issues.

rjbain commented 4 years ago

I'm having this problem too.

rjbain commented 4 years ago

I was on lando v3.0.0-rc.20 and tried upgrading to v3.0.0-rc.22, but it didn't help. This issue started when I upgraded to rc.2. Also, when I made that upgrade I began getting prompted for my Pantheon dashboard password, which I never had before.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions and please check out this if you are wondering why we auto close issues.

antrecu commented 4 years ago

Can confirm issue is present on v3.0.0-rc.23 MacOs 10.13.6

aimhighagency commented 4 years ago

Having this issue as well. Everything was working fine - then started getting this issue when trying to pull the DB:

Pulling database from dev... 0 B 0:00:01 [ 0 B/s] [<=> ] 0 B 0:00:02 [ 0 B/s] [<=> ] 0 B 0:00:03 [ 0 B/s] [<=> ] ERROR 1064 (42000) at line 40: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mysqldump: Couldn't execute 'SELECT COLUMN_NAME, JSON_EXTR' at line 1 1.88KiB 0:00:03 [ 500 B/s] [<=> ]

Seems similar to: https://github.com/lando/lando/issues/1315 https://github.com/lando/lando/issues/335

But not quite the same.

Any thoughts?

sattley commented 3 years ago

I had a similar issue. Figured I'd add what worked for me on the off chance anyone is still having this issue.

barrettbaffert commented 3 years ago

I created an SSH key with no passphrase and added it to Pantheon's dashboard. When the SSH key had a passphrase lando pull didn't work. Once I created a key with no passphrase it worked.

This worked for me too, thanks!

TwisterMc commented 3 years ago

I'm to able to get this to work right. Did everyone have to update their SSH config file on the Mac? I'm using multiple SSH keys so maybe that's my issue. Just wondering.

aspagarino commented 3 years ago

Not sure if this can help... I got the same issue, but when I got "stuck" with the download phase I noticed the terminal was trying to ask for my passphrase (it flashed for a few seconds before showing the 0 progress bar), I just typed in and the download moved forward successfully.

So rather than creating a new key with no passphrase try to key in the passphrase on the terminal when the download is "stuck" and see if it moves forward.

TwisterMc commented 3 years ago

I figured out the issue for me. My access level on Pantheon wasn't high enough. I had the admin bump me up to a higher level and everything worked great.

astaiglesia commented 3 years ago

Not sure if this can help... I got the same issue, but when I got "stuck" with the download phase I noticed the terminal was trying to ask for my passphrase (it flashed for a few seconds before showing the 0 progress bar), I just typed in and the download moved forward successfully.

So rather than creating a new key with no passphrase try to key in the passphrase on the terminal when the download is "stuck" and see if it moves forward.

^^ I noticed the same thing but didn't know what to make of it until I saw your post. Thanks!!

kopepasah commented 3 years ago

Not sure if this can help... I got the same issue, but when I got "stuck" with the download phase I noticed the terminal was trying to ask for my passphrase (it flashed for a few seconds before showing the 0 progress bar), I just typed in and the download moved forward successfully.

So rather than creating a new key with no passphrase try to key in the passphrase on the terminal when the download is "stuck" and see if it moves forward.

This workaround does indeed pull the database. Thanks!

infn8 commented 2 years ago

I wanted to take a moment to share what worked for me in order to fix this. The long and short of it is that the comment from @sattley is what did it but there is more to it than just that.

SSH Key

Follow the Pantheon docs to create and add an SSH key to your dashboard. Do yourself a favour and name it something other than just id_rsa so that you know what key on your machine is for what platform. For me and this mini guide I used:

~/.ssh/id_pantheon

but after this you need to do 2 things.

  1. Setup your Computer's SSH config to use that particular SSH key whatever connecting to Pantheon servers
  2. Accept that key's fingerprint

SSH config

edit your ssh config file. it is very likely at:

~/.ssh/config

just add the section

# Pantheon
Host *.drush.in
    IdentityFile ~/.ssh/id_pantheon

Pantheon uses the domain drush.in for all their infrastructure so that's why it looks like that. From now on when you're system is attempting any SSH based communication it will attempt to use this key. Now you need to force it to except the fingerprint because the lando pull command will not stop partway through and ask you.

SSH Fingerprint

If you're like me and you have your continuous integration pipeline actually do all the talking to the Pantheon servers. You have no reason to have checked out the git repository. That is a job for my CI servers in my opinion. you'll need to do this to force your system to prompt you to accept the unique fingerprint of the SSH key you just generated. just make a new directory somewhere you do not intend to keep

mkdir ~/deleteme
cd ~/deleteme

You'll need to get the information to clone your repository. Log into your pantheon dashboard and go to the site you are looking to pull. Look in the top right find the Connection Info button

Screen Shot 2022-08-24 at 9 30 38 AM

In the pop-up that happens look for the SSH Clone URL section and copy the terminal command

Screen Shot 2022-08-24 at 9 34 01 AM

When you run that:

git clone ssh://codeserver.dev.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx@codeserver.dev.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.drush.in:2222/~/repository.git -b master sitename

your system should prompt you to accept the fingerprint of your SSH key. Answer yes to that prompt.

Terminus

It hasn't been explicitly spelled out on this thread so it's worth noting that U need to have the Pantheon command line tool terminus installed and authenticated as your user.

Have you tried turning it off and on again?

Have you tried turning it off and on again

For me I needed to log out of terminus, log back in, do a system restart and run lando start again.

terminus auth:logout

Then I had to generate a new machine token to authenticate again.

terminus auth:login --machine-token=xxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

after ALL that I did a system restart and then

lando start

once that is running you can FINALLY

lando pull

And you should have everything authenticated. Easy peasy

just works

ben-hamelin commented 1 year ago

Wanted to comment here that I ran into this today after upgrading to Lando 3.8.1 - logging out of terminus and generating the new machine token, logging back in, lando start as noted above did work for me. I'm guessing something in the lando update and rebuild maybe caused this since I'd previously had no issues pulling DB down on this site over the last few weeks. In any case thanks all!

infn8 commented 1 year ago

@ben-hamelin Is this still an issue for you?

ben-hamelin commented 1 year ago

@infn8 No, the last few times I've run a pull it has worked fine.

infn8 commented 1 year ago

@ben-hamelin any idea how you fixed it? I have a colleague also not able to fix this and any clues are helpful.

ben-hamelin commented 1 year ago

@infn8 I updated to latest version of Lando, and rebuilt the project. I may have done a full lando destroy I can't recall, but I would try that. Also don't overlook the earlier solutions about terminus auth:logout to be sure the Pantheon session is fresh.

infn8 commented 1 year ago

Thanks. I appreciate that. We've tried all of that. I'm gonna try some other things. I think we may be looking at having to uninstall and reinstall all of the tooling probably including PHP and lando itself. Once we fix it I'll update here.

gotplitz commented 1 year ago

I wanted to take a moment to share what worked for me in order to fix this. The long and short of it is that the comment from @sattley is what did it but there is more to it than just that.

SSH Key

Follow the Pantheon docs to create and add an SSH key to your dashboard. Do yourself a favour and name it something other than just id_rsa so that you know what key on your machine is for what platform. For me and this mini guide I used:

~/.ssh/id_pantheon

but after this you need to do 2 things.

  1. Setup your Computer's SSH config to use that particular SSH key whatever connecting to Pantheon servers
  2. Accept that key's fingerprint

SSH config

edit your ssh config file. it is very likely at:

~/.ssh/config

just add the section

# Pantheon
Host *.drush.in
  IdentityFile ~/.ssh/id_pantheon

Pantheon uses the domain drush.in for all their infrastructure so that's why it looks like that. From now on when you're system is attempting any SSH based communication it will attempt to use this key. Now you need to force it to except the fingerprint because the lando pull command will not stop partway through and ask you.

SSH Fingerprint

If you're like me and you have your continuous integration pipeline actually do all the talking to the Pantheon servers. You have no reason to have checked out the git repository. That is a job for my CI servers in my opinion. you'll need to do this to force your system to prompt you to accept the unique fingerprint of the SSH key you just generated. just make a new directory somewhere you do not intend to keep

mkdir ~/deleteme
cd ~/deleteme

You'll need to get the information to clone your repository. Log into your pantheon dashboard and go to the site you are looking to pull. Look in the top right find the Connection Info button

Screen Shot 2022-08-24 at 9 30 38 AM

In the pop-up that happens look for the SSH Clone URL section and copy the terminal command

Screen Shot 2022-08-24 at 9 34 01 AM

When you run that:

git clone ssh://codeserver.dev.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx@codeserver.dev.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.drush.in:2222/~/repository.git -b master sitename

your system should prompt you to accept the fingerprint of your SSH key. Answer yes to that prompt.

Terminus

It hasn't been explicitly spelled out on this thread so it's worth noting that U need to have the Pantheon command line tool terminus installed and authenticated as your user.

Have you tried turning it off and on again?

Have you tried turning it off and on again Have you tried turning it off and on again

For me I needed to log out of terminus, log back in, do a system restart and run lando start again.

terminus auth:logout

Then I had to generate a new machine token to authenticate again.

terminus auth:login --machine-token=xxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

after ALL that I did a system restart and then

lando start

once that is running you can FINALLY

lando pull

And you should have everything authenticated. Easy peasy

just works just works

Hey, I just want to say thanks, I have been struggling for 2 days on this because I have to make a full fresh reinstallation of my OS...now all is working with your answer.