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
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
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?
How fix this
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.
did you try and add that as a mysql user?
No but I will, should it be like
CREATE USER ‘Oracle bullshit’@‘10.0.0.143’ IDENTIFIED BY ‘password’
?you see the thing
And then assuming that user is what goes in the db host page as the one creating the database?
create and give permissions
I will try
could also just dump the old pterodactylhost user and allow that host to use it
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
it's all on the same server
we made progress
Yup, internal IPs
what doing wrong now
in the plugin I've tried that IP, 127.0.0.1, and 172.18.0.1
all to no avail
Connect with whatever the db in ptero tells u to iirc
Take connection strings from there
that's what am doing
Damn
:(
@ProGamingDk help
Mind sending me a full config or smth cuz wtf
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
database.yml
Requested by jerichotorrent
Remove last line for customizing driver thingy
I don't think u need it
free db creds
You can have em😩
Did that, no difference
“Failed to communicate with host”
So there’s some deeper issue
Oh oops
Use the external ip
In ur connections
Try that out, it should get routed right
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
IP routing stuff, I think u can fix it with IPtables I just forgot how
:(
That's my rule for blocking all incomming connections from the outside but allow local
Try making a db with luckperms to see if that's an issue
I tried multiple plugins it’s all chalked
GG!
Anyone got any other suggestions?
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
yep, even tried with ufw disabled
no dice
if you do ufw status is it showing up there?
yep
hmm
3306 allow anywhere
this is the db I'm testing on
trying with the external IP now as Ashank suggested
but no diff
ah ptero db
i uh did my postgres In a ptero instance so that’s a bit diff
I'm not opposed to trying that atp
never had this issue before though
and I've installed ptero on like 6 different machines
idrk how you would do that. if there even is a mysql egg for pterodactyl
oh shit this is through oracle cloud?
:thonk:
yes lol
my problem here
yeah damn hmm
odd question, have you tried to connect to the mysql db to see if itll accept You as a connection?
You mean with MySQL cli?? Yeah I can connect to it locally in ssh
That’s what’s weird about it
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
well let me try it with the public IP and see if I can
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?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
Wasnt that what i told you to do 😭
Doubt
If you did, I did not fucking understand it at all
Brain hurty
Pretty sure i did in the vc but whatever kek
!resolved
!solved
Closed post!
Your post has been marked as solved!
Requested by jerichotorrent#0