You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by rammohan ganapavarapu <ra...@gmail.com> on 2020/01/14 21:17:35 UTC

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

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
<https://slack-redir.net/link?url=http%3A%2F%2Fjava.net>.MalformedURLException:
Local host name unknown: java.net
<https://slack-redir.net/link?url=http%3A%2F%2Fjava.net>.UnknownHostException:
cass-cluster1-844788cc8c-p6lb7: cass-cluster1-844788cc8c-p6lb7: Name
does not resolve
sun.management.AgentConfigurationError: java.net
<https://slack-redir.net/link?url=http%3A%2F%2Fjava.net>.MalformedURLException:
Local host name unknown: java.net
<https://slack-redir.net/link?url=http%3A%2F%2Fjava.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
<https://slack-redir.net/link?url=http%3A%2F%2Fjava.net>.MalformedURLException:
Local host name unknown: java.net
<https://slack-redir.net/link?url=http%3A%2F%2Fjava.net>.UnknownHostException:
cass-cluster1-844788cc8c-p6lb7: cass-cluster1-844788cc8c-p6lb7: Name
does not resolve
	at javax.management.remote.JMXServiceURL.<init>(JMXServiceURL.java:289)
	at javax.management.remote.JMXServiceURL.<init>(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

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

Posted by Erick Ramirez <fl...@gmail.com>.
FWIW there was a long discussion on ASF Slack about this topic earlier this
week (starting here
<https://the-asf.slack.com/archives/CJZLTM05A/p1578958181081000>) 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 <
rammohanganap@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 <https://slack-redir.net/link?url=http%3A%2F%2Fjava.net>.MalformedURLException: Local host name unknown: java.net <https://slack-redir.net/link?url=http%3A%2F%2Fjava.net>.UnknownHostException: cass-cluster1-844788cc8c-p6lb7: cass-cluster1-844788cc8c-p6lb7: Name does not resolve
> sun.management.AgentConfigurationError: java.net <https://slack-redir.net/link?url=http%3A%2F%2Fjava.net>.MalformedURLException: Local host name unknown: java.net <https://slack-redir.net/link?url=http%3A%2F%2Fjava.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 <https://slack-redir.net/link?url=http%3A%2F%2Fjava.net>.MalformedURLException: Local host name unknown: java.net <https://slack-redir.net/link?url=http%3A%2F%2Fjava.net>.UnknownHostException: cass-cluster1-844788cc8c-p6lb7: cass-cluster1-844788cc8c-p6lb7: Name does not resolve
> 	at javax.management.remote.JMXServiceURL.<init>(JMXServiceURL.java:289)
> 	at javax.management.remote.JMXServiceURL.<init>(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
>
>