Plugins can't connect to databases on Oracle Cloud

My Oracle Cloud DB setup is chalked making it very hard to use it as a testing environment.
If I use 127.0.0.1 as the db host: allows me to create databases, plugins can't connect to them If I use 172.18.0.1 as the db host: same as above If I use FQDN as the db host: There was an error while trying to connect to the host or while executing a query: "SQLSTATE[HY000] [2002] No route to host (Connection: dynamic, SQL: SELECT 1 FROM dual)"
On my other server I was able to use the FQDN and it worked just fine. Not sure what I'm doing wrong this time. Just to go down the list: - Yes I tried updating my panel and wings - Yes I gave the user perms with grant option - Yes I am configuring the correct database information in my plugin(s) - Yes I opened port 3306 - Yes I configured the oracle cloud subnet to allow port 3306
59 Replies
Admincraft Meta
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close !close !solved !answered
Requested by jerichotorrent#0
Ashank
Ashank3w ago
Holdup what's the setup? also wym chalked Don't use fqdn use the 10.xxx.xxx whatever IP from oracle that you see in the u unth login MOTD It's all natted to that If you're using oracle internal stuff use that ip Also wait... What are you tryna do Add an OCI hosted SQL server to ptero?
Torrent
TorrentOP3w ago
How fix this
No description
No description
Torrent
TorrentOP3w ago
I installed pterodactyl on Oracle cloud like… a really long time ago. Never messed with databases on it until recently, and it seems any ip I use doesn’t work.
ProGamingDk
ProGamingDk3w ago
did you try and add that as a mysql user?
Torrent
TorrentOP3w ago
No but I will, should it be like CREATE USER ‘Oracle bullshit’@‘10.0.0.143’ IDENTIFIED BY ‘password’?
ProGamingDk
ProGamingDk3w ago
you see the thing
No description
Torrent
TorrentOP3w ago
And then assuming that user is what goes in the db host page as the one creating the database?
ProGamingDk
ProGamingDk3w ago
create and give permissions
Torrent
TorrentOP3w ago
I will try
ProGamingDk
ProGamingDk3w ago
could also just dump the old pterodactylhost user and allow that host to use it
Ashank
Ashank3w ago
Check bind address on my cnf.ini Yes. Do u have panel and db installed on different servers? If not make sure the bind port in my.cnf or whatever is 0.0.0.0 and your user is connected to the right IP
Torrent
TorrentOP3w ago
it's all on the same server
Torrent
TorrentOP3w ago
we made progress
No description
Ashank
Ashank3w ago
Yup, internal IPs
Torrent
TorrentOP3w ago
what doing wrong now
No description
No description
Torrent
TorrentOP3w ago
in the plugin I've tried that IP, 127.0.0.1, and 172.18.0.1 all to no avail
Ashank
Ashank3w ago
Connect with whatever the db in ptero tells u to iirc Take connection strings from there
Torrent
TorrentOP3w ago
that's what am doing
No description
No description
Ashank
Ashank3w ago
Damn
Torrent
TorrentOP3w ago
:( @ProGamingDk help
Ashank
Ashank3w ago
Mind sending me a full config or smth cuz wtf
Admincraft Meta
We have uploaded your file to a paste service for better readability
Paste services are more mobile friendly and easier to read than just posting a file
Requested by jerichotorrent
Ashank
Ashank3w ago
Remove last line for customizing driver thingy I don't think u need it
Skullians
Skullians3w ago
free db creds
Torrent
TorrentOP3w ago
You can have em😩 Did that, no difference “Failed to communicate with host” So there’s some deeper issue
Ashank
Ashank3w ago
Oh oops Use the external ip In ur connections Try that out, it should get routed right
Torrent
TorrentOP3w ago
Ok so private ip in db host, external/public ip in plugin connections? I’ll try it Was fishing all day >_< My question is why wouldn’t using 127.0.0.1 work like on any other host? Genuinely curious same error
Ashank
Ashank3w ago
IP routing stuff, I think u can fix it with IPtables I just forgot how
Torrent
TorrentOP3w ago
:(
duolingo se acerca
iptables -A INPUT -p tcp -i ens3 --dport 15522 ! -s 127.0.0.1 -j DROP
iptables -A INPUT -p tcp -i ens3 --dport 15522 ! -s 127.0.0.1 -j DROP
That's my rule for blocking all incomming connections from the outside but allow local
Ashank
Ashank3w ago
Try making a db with luckperms to see if that's an issue
Torrent
TorrentOP3w ago
I tried multiple plugins it’s all chalked
Ashank
Ashank3w ago
GG!
Torrent
TorrentOP2w ago
Anyone got any other suggestions?
Tamz
Tamz2w ago
oh is the port open via ufw? i had a similar issue with postgres it was because ptero didn’t open the 3306 port once i opened it. connected fine
Torrent
TorrentOP2w ago
yep, even tried with ufw disabled no dice
Tamz
Tamz2w ago
if you do ufw status is it showing up there?
Torrent
TorrentOP2w ago
yep
Tamz
Tamz2w ago
hmm
Torrent
TorrentOP2w ago
3306 allow anywhere
Torrent
TorrentOP2w ago
this is the db I'm testing on
No description
Torrent
TorrentOP2w ago
trying with the external IP now as Ashank suggested but no diff
Tamz
Tamz2w ago
ah ptero db i uh did my postgres In a ptero instance so that’s a bit diff
Torrent
TorrentOP2w ago
I'm not opposed to trying that atp never had this issue before though and I've installed ptero on like 6 different machines
Tamz
Tamz2w ago
idrk how you would do that. if there even is a mysql egg for pterodactyl oh shit this is through oracle cloud? :thonk:
Torrent
TorrentOP2w ago
yes lol my problem here
Tamz
Tamz2w ago
yeah damn hmm odd question, have you tried to connect to the mysql db to see if itll accept You as a connection?
Torrent
TorrentOP2w ago
You mean with MySQL cli?? Yeah I can connect to it locally in ssh That’s what’s weird about it
Tamz
Tamz2w ago
no that if you are able to connect from your pc remotely to mysql? or well its on the 10.0.0 which is internal so probably not
Torrent
TorrentOP2w ago
well let me try it with the public IP and see if I can
Snow Kit
Snow Kit2w ago
I would probably suggest running something like tcpdump -i any port 3306 and checking to make sure all the packets are hitting the database and that the database is actually replying you're also mentioning 172.18.0.1, but are you sure that your pterodactyl_nw0 interface is on that IP?
Torrent
TorrentOP2w ago
WTF I FIXED IT BUT IT WAS SUPER DUMB This is what I had to do Database host -> 172.18.0.1 Had to use that for an endpoint to connect to in the plugin configs Had to give perms in MySQL cli for the user on each docker ip (ex: 172.18.0.3) on each server the dbs were to connect to Then had to give specific perms for the database user itself
ProGamingDk
ProGamingDk2w ago
Wasnt that what i told you to do 😭
Torrent
TorrentOP2w ago
Doubt If you did, I did not fucking understand it at all Brain hurty
ProGamingDk
ProGamingDk2w ago
Pretty sure i did in the vc but whatever kek
Torrent
TorrentOP2w ago
!resolved !solved
Admincraft Meta
Closed post!
Your post has been marked as solved!
Requested by jerichotorrent#0

Did you find this page helpful?