解决elasticsearch:Exception BindTransportException[Failed to bind to [9300-9400]]

短命女 2022-05-11 07:22 263阅读 0赞

Linux7.4使用elasticsearch2.2.1启动报错:

  1. [2018-09-20 23:24:17,887][INFO ][node ] [Paibo] starting ...
  2. 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];
  3. Likely root cause: java.net.BindException: Cannot assign requested address
  4. at sun.nio.ch.Net.bind0(Native Method)
  5. at sun.nio.ch.Net.bind(Net.java:444)
  6. at sun.nio.ch.Net.bind(Net.java:436)
  7. at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
  8. at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
  9. at org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193)
  10. at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:391)
  11. at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:315)
  12. at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)
  13. at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
  14. at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
  15. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  16. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  17. at java.lang.Thread.run(Thread.java:745)
  18. Refer to the log for complete error details.

原因:

  1. 配置文件/.../elasticsearch-2.2.1/config/elasticsearch.yml
  2. network.host不对
  3. 度娘博客有的说用:0.0.0.0,有的说用127.0.0.1,实操发现:没用!不排除环境不一样等未知问题。

解法:

  1. 改为当前服务器内网ip即可(实操使用阿里云服务器)
  2. 另:改为127.0.0.1,报错解决,但http无法访问。

发表评论

表情:
评论列表 (有 0 条评论,263人围观)

还没有评论,来说两句吧...

相关阅读