UnknownHostException on SRV domain
Closed this issue ยท 9 comments
Using a SRV DNS to connect to bungeecord LuckPerms gives the following UnknownHostException:
[SEVERE] redis.clients.jedis.shaded.HostAndPort getLocalHostQuietly SEVERE: cant resolve localhost address java.net.UnknownHostException: {SERVER_DOMAIN_HIDDEN}: {SERVER_DOMAIN_HIDDEN}: No address associated with hostname at java.net.InetAddress.getLocalHost(InetAddress.java:1505) at redis.clients.jedis.shaded.HostAndPort.getLocalHostQuietly(HostAndPort.java:105) at redis.clients.jedis.shaded.HostAndPort.<clinit>(HostAndPort.java:12) at redis.clients.jedis.shaded.JedisFactory.<init>(JedisFactory.java:37) at redis.clients.jedis.shaded.JedisPool.<init>(JedisPool.java:185) at redis.clients.jedis.shaded.JedisPool.<init>(JedisPool.java:162) at redis.clients.jedis.shaded.JedisPool.<init>(JedisPool.java:92) at me.lucko.luckperms.common.messaging.RedisMessagingService.init(RedisMessagingService.java:58) at me.lucko.luckperms.common.messaging.MessagingFactory.getServiceFor(MessagingFactory.java:67) at me.lucko.luckperms.bungee.messaging.BungeeMessagingFactory.getServiceFor(BungeeMessagingFactory.java:53) at me.lucko.luckperms.common.messaging.MessagingFactory.getInstance(MessagingFactory.java:53) at me.lucko.luckperms.bungee.LPBungeePlugin.onEnable(LPBungeePlugin.java:163) at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:227) at net.md_5.bungee.BungeeCord.start(BungeeCord.java:266) at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:56) at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15) Caused by: java.net.UnknownHostException: mc.mineblock.it: No address associated with hostname at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getLocalHost(InetAddress.java:1500) ... 15 more
Is there a way to solve this?
was this after you configured lp ?
did you use localhost ip's in the bungeecord config?
In the bungeecord config i use local ip but in the error stacktrace it gives me my domain (address java.net.UnknownHostException: mc.mydomain.com: mc.mydomain.com: No address associated with hostname)
This error relates to your redis connection info, not BungeeCord.
Change the redis ip in the LP config to the direct address of your redis server.
I'm afraid I know as much as you do.
[SEVERE] redis.clients.jedis.shaded.HostAndPort getLocalHostQuietly SEVERE: cant resolve localhost address java.net.UnknownHostException: {SERVER_DOMAIN_HIDDEN}: {SERVER_DOMAIN_HIDDEN}: No address associated with hostname at java.net.InetAddress.getLocalHost(InetAddress.java:1505) at
That error is being thrown by the Redis driver, not LuckPerms.
If you're using localhost at the moment, try setting the address to the external ip of the server? Or try 127.0.0.1
or "localhost"
, or vice versa.
Since now i'm using 127.0.0.1
, i'm trying the other options and i let you know
I tried also localhost
and and external address like ftp.mydomain.com
that is an A DNS and also my external numeric address and i get always the same error.
I found this that seams the same problem on the jedis repo https://github.com/xetorthio/jedis/issues/1424
that is used by RedisBungee
Then as I said, this is an issue with the Redis driver (which I do not maintain), not LuckPerms.
There's nothing I can do to fix things at my end, since the issue isn't caused by LP.
Disclaimer: I'm totally unfamiliar with these topics, so if anybody knows better, please correct me.
When Jedis sees "localhost", it gets smart and switches to using the hostname you've set for your computer. At some point, you appear to have set yours to "mc.mineblock.it." This domain is not magically found and selected; it has to be set. I assume you're using a VPS or dedicated server. Is it possible you've followed some sort of guide and edited /etc/hostname? I have essentially zero knowledge or experience with Linux, so I don't really know the details here.
The changes made to fix the issue you linked would help, but a new version containing the fix apparently hasn't been released yet. Instead, I suggest you try to figure out how the hostname got set and then reset it back to "localhost" or something.