Kinsta deploy - data could not be sent

I don’t know if the word here is that it’s cool to look for support on using trellis with Kinsta is cool here, but here goes. I know I’ve followed the instructions kindly provided by @ben at How to Use Bedrock and Trellis at the "(WordPress Development)" blog post. I’ve also looked to see if there were any additional threads of people on Trellis using Kinsta, no luck. I’ve done a lot of debugging, everything seems normal except for this issue. Earlier I was having a problem sshing into the server until I added -o PreferredAuthentications=password -o PubkeyAuthentication=no, so that might be relevant.

Anyways, here’s the error I’m getting on deploy:

TASK [Gathering Facts] ***********************************************************************************************************************************************************************
System info:
  Ansible 2.5.2; Darwin
  Trellis version (per changelog): "Enable `fastcgi_cache_background_update` by default"
---------------------------------------------------
SSH Error: data could not be sent to remote host "35.188.253.117". Make sure
this host can be reached over ssh
fatal: [kinsta_staging]: UNREACHABLE! => {"changed": false, "unreachable": true}
        to retry, use: --limit @/Users/josephroberts/localdev/getitatgeddes.com/trellis/deploy.retry

PLAY RECAP ***********************************************************************************************************************************************************************************
kinsta_staging             : ok=1    changed=0    unreachable=1    failed=0

I’ve gone over the setting a few times, and I’m positive they’re all correct, and I’ve ensured I can indeed connect to the server via ssh.

Here’s the verbose output. https://gist.github.com/broskees/f9292357e83d9de8a9f374fd1b1fe4aa

You’re good :slight_smile:

Can you share your trellis/hosts/staging file?

Here ya go:

# Add each host to the [staging] group and to a "type" group such as [web] or [db].
# List each machine only once per [group], even if it will host multiple sites.

kinsta_staging ansible_host=35.188.253.117 ansible_ssh_port=26254 ansible_ssh_pass="{{ vault_ansible_ssh_pass }}"

[web]
kinsta_staging

[staging]
kinsta_staging

Just to confirm, you said that you can still ssh in normally. Have you tried again since the deploy attempt? If you happen to be locked out then it’s possible Kinsta banned your IP, which has happened to me a couple times when setting up Kinsta & Trellis sites. Support is quick to get that lifted.

Oh they whitelisted my IP recently, immediately after it still gives me an error. But yes I can ssh in, but only with -o PreferredAuthentications=password -o PubkeyAuthentication=no added, otherwise it just tries all my keys until the server gets tired of it and locks me out.

What’s your ~/.ssh/config file look like?

Here’s mine:

Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_rsa

Here’s it, I over-complicated it a bit when I didn’t understand ssh keys at all:

# ALL
Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_rsa

# Kinsta
Host 35.188.253.117
  IdentityFile ~/.ssh/id_rsa
  ForwardAgent yes

# GitHub : 'broskees' account
Host github.com-broskees
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_rsa_github_broskees

# Digital Ocean Droplets
# Host IP IP IP IP IP
Host 167.99.80.41 67.205.169.5 167.99.156.176
  IdentityFile ~/.ssh/id_rsa_digitalocean
  ForwardAgent yes

# WPEngine
Host git.wpengine.com
  IdentityFile ~/.ssh/id_rsa_wpengine

# trellis vagrant ssh ssafd
Host syracusesedationandfamilydentistry.test 
  HostName 127.0.0.1
  User vagrant
  Port 2222
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile /Users/josephroberts/localdev/syracusesedationandfamilydentistry.com/trellis/.vagrant/machines/default/virtualbox/private_key
  IdentitiesOnly yes
  LogLevel FATAL
  ForwardAgent yes

Try adding these options to ~/.ssh/config for your Kinsta host, that way you don’t need to pass them from the command line

Yes! This worked. thank you!