vitodeploy / vito

The Ultimate Server Management Tool
https://vitodeploy.com
GNU Affero General Public License v3.0
872 stars 149 forks source link

Adding new server via provider ssh Key #272

Closed iantearle closed 3 weeks ago

iantearle commented 1 month ago

Upon creating a server on DigitalOcean I got a grey modal pop up with Error 500. Subsequent attempts at creating a server result in a red message "Provider Error: DigitalOcean SSH Key".

My digital ocean account appears to have an unfinished droplet created.

I can't seem to ssh on as Vito user either. I can using my ssh keys onto as root.

saeedvaziry commented 1 month ago

You need to delete the existing key on your DO dashboard

paligiannis commented 1 month ago

I have the same issue. Tried a couple of times and refreshed the correlated key but the issue persist. Any solution? @saeedvaziry

erenilhan commented 4 weeks ago

I have the same issue :/ I'm tried of everything but no solution yet.

saeedvaziry commented 4 weeks ago

Will try to reproduce it

saeedvaziry commented 4 weeks ago

Still looks like working to me, @erenilhan @paligiannis @iantearle can you you write the exact steps to reproduce?

erenilhan commented 4 weeks ago

I deleted all keys and ssh from Digitalocean.

Screenshot 2024-08-16 at 10 27 10 PM Screenshot 2024-08-16 at 10 27 28 PM Screenshot 2024-08-16 at 10 27 40 PM Screenshot 2024-08-16 at 10 28 15 PM Screenshot 2024-08-16 at 10 30 29 PM

First click Screenshot 2024-08-16 at 10 30 36 PM

Second click

Screenshot 2024-08-16 at 10 30 55 PM

but ssh is here

Screenshot 2024-08-16 at 10 33 57 PM
saeedvaziry commented 3 weeks ago

@erenilhan the "First click" screenshot is unavailable and I can't see.

The second error makes sense because the key already exists due to first attempt error.

erenilhan commented 3 weeks ago

Ah, sorry, the first click was about the server error. First click

image

@saeedvaziry

saeedvaziry commented 3 weeks ago

@erenilhan can you create a server on DO manually? From DO UI

erenilhan commented 3 weeks ago

Yes, I tried and it created a new one. I also tried with another account, but same. no logs except what you see in the screenshot

paligiannis commented 3 weeks ago

@erenilhan I have exactly the same issues. I tried also from 2 different accounts with the same results. Also, adding SSH to DO didn't make a difference. Also, no other logs produced. Only 'Provider Error: DigitalOcean SSH Key'. Is there any other way to troubleshoot?

erenilhan commented 3 weeks ago

still the same for me, I will reinstall and debug locally. it works for Hertzner but not for DO. @paligiannis

paligiannis commented 3 weeks ago

@erenilhan I tried with Hetzner, works perfectly and fast! Why to use DO? Hetzner also seems to be cheaper and faster (my opinion) I am also sticked to DO but I need alternatives. Now running about 250-300 servers using K8S and Hetzner is a good alternative.

iantearle commented 3 weeks ago

@saeedvaziry I just spun up a new server and installation. Started a fresh, still the same errors as screenshotted above. I also tried adding an existing key in DO to Vito. When I do so I get this: Screenshot 2024-08-20 at 14 38 13

iantearle commented 3 weeks ago

Equally looking through the security logs droplet.create is immediately followed by a droplet.destroy. Is it self destroying on any error?

saeedvaziry commented 3 weeks ago

@iantearle if vito deosn't get the expected response codes it will consider a failure and will try to drop the droplet to avoid costs.

my guess is the plan maybe doesn't exist. will try again to reproduce.

also @iantearle, on the 500 error you got, you should be able to see logs on laravel.log file.

iantearle commented 3 weeks ago

@saeedvaziry that's exactly where I was heading: two notable lines:

[2024-08-20 13:33:08] production.ERROR: Failed to create server on DigitalOcean {"id":"unprocessable_entity","message":"The image you selected is no longer available"} 
[2024-08-20 13:37:59] production.ERROR: Undefined array key "8.2" {"userId":1,"exception":"[object] (ErrorException(code: 0): Undefined array key \"8.2\" at /home/vito/vito/app/Models/Service.php:52)

Let me know if you want a full dump of the logs #64 lines.

erenilhan commented 3 weeks ago

@iantearle I also got this message yesterday, but when I changed the image and the version of ubuntu it worked. but interestingly I never got the error (image error) that I got after creating the server.

iantearle commented 3 weeks ago

@saeedvaziry @erenilhan interestingly, went up the list to 2GB server and dropped the PHP version to 8.1 and its starting to install. At least I have a different screen, still waiting... Screenshot 2024-08-20 at 15 06 57

saeedvaziry commented 3 weeks ago

I thought the image ids issue has been resolved in #271

I don't think it is related to the PHP version tho

saeedvaziry commented 3 weeks ago

Alright now I see :)

Although the PR merged but we haven't released the new version of Vito yet.

Soon will release the next version to fix all these.

iantearle commented 3 weeks ago

@saeedvaziry no problem. Glad we all worked it out in the end. Thank you so much for your support on this.

saeedvaziry commented 3 weeks ago

I'd raise a separate issue for the php 8.2 thingy. Hard to follow

saeedvaziry commented 3 weeks ago

Update to 1.10.0, the problem should be gone!

paligiannis commented 3 weeks ago

Thanks for the 1.10.0. Basically I'm unable to update to the latest 1.10. I run the command update and I get the following: Vito updated successfully to 1.9.1! 🎉 but latest is 1.10. Any troubleshooting?