Re: Cassandra failing with "Local host name unknown" even when specifying IP's for listen and rpc addresses

2020-01-17 Thread Erick Ramirez
FWIW there was a long discussion on ASF Slack about this topic earlier this
week (starting here
) with
driftx, exlt & myself and the recommendation was to make the hostname
resolve locally as best practice. Cheers!

On Wed, Jan 15, 2020 at 8:18 AM rammohan ganapavarapu <
rammohanga...@gmail.com> wrote:

> Hi,
>
> I am getting below error when i try to start cassandra processes  even
> when specify rcp_address and listen_address.
>
> CompilerOracle: inline 
> org/apache/cassandra/utils/FastByteOperations$UnsafeOperations.compareTo 
> (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I
> CompilerOracle: inline org/apache/cassandra/utils/vint/VIntCoding.encodeVInt 
> (JI)[B
> Error: Exception thrown by the agent : java.net 
> .MalformedURLException:
>  Local host name unknown: java.net 
> .UnknownHostException:
>  cass-cluster1-844788cc8c-p6lb7: cass-cluster1-844788cc8c-p6lb7: Name does 
> not resolve
> sun.management.AgentConfigurationError: java.net 
> .MalformedURLException:
>  Local host name unknown: java.net 
> .UnknownHostException:
>  cass-cluster1-844788cc8c-p6lb7: cass-cluster1-844788cc8c-p6lb7: Name does 
> not resolve
>   at 
> sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:480)
>   at sun.management.Agent.startAgent(Agent.java:262)
>   at sun.management.Agent.startAgent(Agent.java:452)
> Caused by: java.net 
> .MalformedURLException:
>  Local host name unknown: java.net 
> .UnknownHostException:
>  cass-cluster1-844788cc8c-p6lb7: cass-cluster1-844788cc8c-p6lb7: Name does 
> not resolve
>   at javax.management.remote.JMXServiceURL.(JMXServiceURL.java:289)
>   at javax.management.remote.JMXServiceURL.(JMXServiceURL.java:253)
>   at 
> sun.management.jmxremote.ConnectorBootstrap.exportMBeanServer(ConnectorBootstrap.java:739)
>   at 
> sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:468)
>
> Any idea why C* processes is still trying to resolve hostname even after 
> giving IPs in the config?
>
> It works if i add static host entry in /etc/hosts file but i wanted to 
> understand why it needs to resolve hostsname even after specifying rpc and 
> listen IP addresses.
>
>
> Thanks,
>
> Ram
>
>


Cassandra failing with "Local host name unknown" even when specifying IP's for listen and rpc addresses

2020-01-14 Thread rammohan ganapavarapu
Hi,

I am getting below error when i try to start cassandra processes  even when
specify rcp_address and listen_address.

CompilerOracle: inline
org/apache/cassandra/utils/FastByteOperations$UnsafeOperations.compareTo
(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I
CompilerOracle: inline
org/apache/cassandra/utils/vint/VIntCoding.encodeVInt (JI)[B
Error: Exception thrown by the agent : java.net
.MalformedURLException:
Local host name unknown: java.net
.UnknownHostException:
cass-cluster1-844788cc8c-p6lb7: cass-cluster1-844788cc8c-p6lb7: Name
does not resolve
sun.management.AgentConfigurationError: java.net
.MalformedURLException:
Local host name unknown: java.net
.UnknownHostException:
cass-cluster1-844788cc8c-p6lb7: cass-cluster1-844788cc8c-p6lb7: Name
does not resolve
at 
sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:480)
at sun.management.Agent.startAgent(Agent.java:262)
at sun.management.Agent.startAgent(Agent.java:452)
Caused by: java.net
.MalformedURLException:
Local host name unknown: java.net
.UnknownHostException:
cass-cluster1-844788cc8c-p6lb7: cass-cluster1-844788cc8c-p6lb7: Name
does not resolve
at javax.management.remote.JMXServiceURL.(JMXServiceURL.java:289)
at javax.management.remote.JMXServiceURL.(JMXServiceURL.java:253)
at 
sun.management.jmxremote.ConnectorBootstrap.exportMBeanServer(ConnectorBootstrap.java:739)
at 
sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:468)

Any idea why C* processes is still trying to resolve hostname even
after giving IPs in the config?

It works if i add static host entry in /etc/hosts file but i wanted to
understand why it needs to resolve hostsname even after specifying rpc
and listen IP addresses.


Thanks,

Ram