Skip to content

Exception in thread "main" java.net.UnknownHostException #81

@muchemiphilip

Description

@muchemiphilip

Why am i getting this error when i try to connect to my Zookeeper after starting the docker-compose...
And i can't connect to my labs_control-center_1 using localhost:9021

Connecting to zookeeper:2181
Exception in thread "main" java.net.UnknownHostException: zookeeper: Name or service not known
at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:929)
at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1519)
at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:848)
at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1509)
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1368)
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1302)
at org.apache.zookeeper.client.StaticHostProvider.(StaticHostProvider.java:61)
at org.apache.zookeeper.ZooKeeper.(ZooKeeper.java:445)
at org.apache.zookeeper.ZooKeeperMain.connectToZK(ZooKeeperMain.java:281)
at org.apache.zookeeper.ZooKeeperMain.(ZooKeeperMain.java:296)
at org.apache.zookeeper.ZooKeeperMain.main(ZooKeeperMain.java:289)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions