I created a new vapor project with Fluent and I'm having trouble connecting to my mysql instance on my Synology server. I tried a different db management app with the same credentials and connection settings and it works fine. This use to work on my MacBook Pro M1 before that died. Now I'm on a 2018 MBP with i9. Here's the error:
[ ERROR ] Opening new connection for pool failed: connect(descriptor:addr:size:): No route to host (errno: 65) [database-id: mysql, request-id: 88507221-099C-4786-85D9-5BF6207652EC]
[ WARNING ] connect(descriptor:addr:size:): No route to host (errno: 65) [request-id: 88507221-099C-4786-85D9-5BF6207652EC]
Just to confirm - you're running the Vapor app on macOS (not in Docker or a virtualised system) and you can connect via a DB management app on the same system?
I’m running from xcode on 2018 MacBook Pro with i9. The db is served from synology connected to the same local network. The db management software hat works is also on the same MBP. For some reason fluent can’t connect. Vapor/Fluent worked before when I was using an M1 MBP.
I did another test with a cloud db and it's working. I now suspect that it didn't respect my port configuration as i'm not using the standard 3306 on my synology. Any idea what I can do to fix? Like I mentioned, this was working on my previous MBP.
And second, what's the hostname you're using? Is it synology.local or similar? It might be because the hostname can't be discovered if it's only available via Bonjour for instance
[ ERROR ] Opening new connection for pool failed: connect(descriptor:addr:size:): No route to host (errno: 65) [database-id: mysql, request-id: 93C4FF7D-1183-43F8-B78B-9BE1FFE6BD93]
[ WARNING ] connect(descriptor:addr:size:): No route to host (errno: 65) [request-id: 93C4FF7D-1183-43F8-B78B-9BE1FFE6BD93]
If you can connect on the same machine via IP with a different client there's no reason why that shouldn't work with Vapor. Do you get the exact same error message when using an IP address
I agree it should work with Vapor as well, but for some reason it doesn't. For sanity check, I tried connecting via TablePlus again a few times and it all connected just fine.