1. ホーム
  2. Qt

elasticsearchを解決する。例外 BindTransportException [9300-9400]へのバインドに失敗しました]。

2022-02-20 16:33:08
<パス

Linux 7.4 boot error with elasticsearch 2.2.1.

[2018-09-20 23:24:17,887][INFO ][node ] [Paibo] starting ...
Exception in thread "main" BindTransportException[Failed to bind to [9300-9400]]; nested: ChannelException[Failed to bind to: /192.168 .0.1:9400]; nested: BindException[Cannot assign requested address];
Likely root cause: java.net.BindException: Cannot assign requested address
        Net.bind0(Native Method) at sun.nio.ch.
        Net.bind(Net.java:444) at sun.nio.ch.
        bind(Net.java:436) at sun.nio.ch.Net.bind(Net.java:436)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
        at org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193)
        at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:391)
        at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:315)
        at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)
        at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
        at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Refer to the log for complete error details.


原因

The configuration file /... /elasticsearch-2.2.1/config/elasticsearch.yml
network.host is not correct

Some blogs say to use: 0.0.0.0, some say to use 127.0.0.1, but I found: useless! Do not exclude the environment is different and other unknown problems.


解決策

changed to the current server intranet ip can be (practical use of Ali cloud server)

Also: change to 127.0.0.1, the error is solved, but the http is not accessible.