elasticSearch 报错:runtime error: invalid memory address or nil pointer dereference

elasticSearch · Fecmall · 于 5年前 发布 · 2666 次阅读

报错:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa68ac3]

这是因为elasticSearch的 net host有问题, 回去看elasticSearch的启动是否有问题

这是某位的启动日志

[root@izj6c9ucnwnm673q0fiv6cz zhiliao_Adm]# su elasticsearch  -c "/usr/local/elasticsearch/bin/elasticsearch "                                                                                                                                     sticsearch/bin/elasticsearch "
[2018-11-15T14:30:05,617][INFO ][o.e.n.Node               ] [node-1] initializin                                                                                                                                        g ...
[2018-11-15T14:30:05,687][INFO ][o.e.e.NodeEnvironment    ] [node-1] using [1] d                                                                                                                                        ata paths, mounts [[/ (rootfs)]], net usable_space [26.6gb], net total_space [39                                                                                                                                        .2gb], types [rootfs]
[2018-11-15T14:30:05,687][INFO ][o.e.e.NodeEnvironment    ] [node-1] heap size [                                                                                                                                        123.7mb], compressed ordinary object pointers [true]
[2018-11-15T14:30:05,688][INFO ][o.e.n.Node               ] [node-1] node name [                                                                                                                                        node-1], node ID [sTsm0-keRceqB-EL-0Majw]
[2018-11-15T14:30:05,688][INFO ][o.e.n.Node               ] [node-1] version[6.4                                                                                                                                        .3], pid[26650], build[default/tar/fe40335/2018-10-30T23:17:19.084789Z], OS[Linu                                                                                                                                        x/3.10.0-693.2.2.el7.x86_64/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-B                                                                                                                                        it Server VM/1.8.0_66/25.66-b17]
[2018-11-15T14:30:05,689][INFO ][o.e.n.Node               ] [node-1] JVM argumen                                                                                                                                        ts [-Xms256m, -Xmx64m, -Xms128m, -Xmx128m, -XX:+UseConcMarkSweepGC, -XX:CMSIniti                                                                                                                                        atingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTou                                                                                                                                        ch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -                                                                                                                                        XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOpti                                                                                                                                        mization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookE                                                                                                                                        nabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch.z0v                                                                                                                                        Apbx5, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=log                                                                                                                                        s/hs_err_pid%p.log, -XX:+PrintGCDetails, -XX:+PrintGCDateStamps, -XX:+PrintTenur                                                                                                                                        ingDistribution, -XX:+PrintGCApplicationStoppedTime, -Xloggc:logs/gc.log, -XX:+U                                                                                                                                        seGCLogFileRotation, -XX:NumberOfGCLogFiles=32, -XX:GCLogFileSize=64m, -Des.path                                                                                                                                        .home=/usr/local/elasticsearch, -Des.path.conf=/usr/local/elasticsearch/config,                                                                                                                                         -Des.distribution.flavor=default, -Des.distribution.type=tar]
[2018-11-15T14:30:07,856][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [aggs-matrix-stats]
[2018-11-15T14:30:07,856][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [analysis-common]
[2018-11-15T14:30:07,856][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [ingest-common]
[2018-11-15T14:30:07,856][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [lang-expression]
[2018-11-15T14:30:07,856][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [lang-mustache]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [lang-painless]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [mapper-extras]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [parent-join]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [percolator]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [rank-eval]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [reindex]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [repository-url]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [transport-netty4]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [tribe]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [x-pack-core]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [x-pack-deprecation]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [x-pack-graph]
[2018-11-15T14:30:07,857][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [x-pack-logstash]
[2018-11-15T14:30:07,858][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [x-pack-ml]
[2018-11-15T14:30:07,858][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [x-pack-monitoring]
[2018-11-15T14:30:07,858][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [x-pack-rollup]
[2018-11-15T14:30:07,858][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [x-pack-security]
[2018-11-15T14:30:07,858][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [x-pack-sql]
[2018-11-15T14:30:07,858][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [x-pack-upgrade]
[2018-11-15T14:30:07,858][INFO ][o.e.p.PluginsService     ] [node-1] loaded modu                                                                                                                                        le [x-pack-watcher]
[2018-11-15T14:30:07,858][INFO ][o.e.p.PluginsService     ] [node-1] no plugins                                                                                                                                         loaded
[2018-11-15T14:30:11,590][INFO ][o.e.x.s.a.s.FileRolesStore] [node-1] parsed [0]                                                                                                                                         roles from file [/usr/local/elasticsearch/config/roles.yml]
[2018-11-15T14:30:12,020][INFO ][o.e.x.m.j.p.l.CppLogMessageHandler] [controller                                                                                                                                        /26705] [Main.cc@109] controller (64 bit): Version 6.4.3 (Build 7a0781676dd492)                                                                                                                                         Copyright (c) 2018 Elasticsearch BV
[2018-11-15T14:30:12,362][DEBUG][o.e.a.ActionModule       ] Using REST wrapper f                                                                                                                                        rom plugin org.elasticsearch.xpack.security.Security
[2018-11-15T14:30:12,598][INFO ][o.e.d.DiscoveryModule    ] [node-1] using disco                                                                                                                                        very type [zen]
[2018-11-15T14:30:13,387][INFO ][o.e.n.Node               ] [node-1] initialized
[2018-11-15T14:30:13,387][INFO ][o.e.n.Node               ] [node-1] starting ..                                                                                                                                        .
[2018-11-15T14:30:13,620][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [n                                                                                                                                        ode-1] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: BindTransportException[Failed to b                                                                                                                                        ind to [9300-9400]]; nested: BindException[Cannot assign requested address];
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:140                                                                                                                                        ) ~[elasticsearch-6.4.3.jar:6.4.3]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:                                                                                                                                        127) ~[elasticsearch-6.4.3.jar:6.4.3]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwar                                                                                                                                        eCommand.java:86) ~[elasticsearch-6.4.3.jar:6.4.3]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:1                                                                                                                                        24) ~[elasticsearch-cli-6.4.3.jar:6.4.3]
        at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-c                                                                                                                                        li-6.4.3.jar:6.4.3]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93)                                                                                                                                         ~[elasticsearch-6.4.3.jar:6.4.3]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86)                                                                                                                                         ~[elasticsearch-6.4.3.jar:6.4.3]
Caused by: org.elasticsearch.transport.BindTransportException: Failed to bind to                                                                                                                                         [9300-9400]
        at org.elasticsearch.transport.TcpTransport.bindToPort(TcpTransport.java                                                                                                                                        :821) ~[elasticsearch-6.4.3.jar:6.4.3]
        at org.elasticsearch.transport.TcpTransport.bindServer(TcpTransport.java                                                                                                                                        :786) ~[elasticsearch-6.4.3.jar:6.4.3]
        at org.elasticsearch.transport.netty4.Netty4Transport.doStart(Netty4Tran                                                                                                                                        sport.java:134) ~[?:?]
        at org.elasticsearch.xpack.core.security.transport.netty4.SecurityNetty4                                                                                                                                        Transport.doStart(SecurityNetty4Transport.java:87) ~[?:?]
        at org.elasticsearch.xpack.security.transport.netty4.SecurityNetty4Serve                                                                                                                                        rTransport.doStart(SecurityNetty4ServerTransport.java:41) ~[?:?]
        at org.elasticsearch.common.component.AbstractLifecycleComponent.start(A                                                                                                                                        bstractLifecycleComponent.java:66) ~[elasticsearch-6.4.3.jar:6.4.3]
        at org.elasticsearch.transport.TransportService.doStart(TransportService                                                                                                                                        .java:217) ~[elasticsearch-6.4.3.jar:6.4.3]
        at org.elasticsearch.common.component.AbstractLifecycleComponent.start(A                                                                                                                                        bstractLifecycleComponent.java:66) ~[elasticsearch-6.4.3.jar:6.4.3]
        at org.elasticsearch.node.Node.start(Node.java:667) ~[elasticsearch-6.4.                                                                                                                                        3.jar:6.4.3]
        at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:265) ~[ela                                                                                                                                        sticsearch-6.4.3.jar:6.4.3]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:335) ~[elas                                                                                                                                        ticsearch-6.4.3.jar:6.4.3]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136                                                                                                                                        ) ~[elasticsearch-6.4.3.jar:6.4.3]
        ... 6 more
Caused by: java.net.BindException: Cannot assign requested address
        at sun.nio.ch.Net.bind0(Native Method) ~[?:?]
        at sun.nio.ch.Net.bind(Net.java:433) ~[?:?]
        at sun.nio.ch.Net.bind(Net.java:425) ~[?:?]
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:                                                                                                                                        223) ~[?:?]
        at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSo                                                                                                                                        cketChannel.java:128) ~[?:?]
        at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.                                                                                                                                        java:558) ~[?:?]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChann                                                                                                                                        elPipeline.java:1283) ~[?:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractCha                                                                                                                                        nnelHandlerContext.java:501) ~[?:?]
        at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHa                                                                                                                                        ndlerContext.java:486) ~[?:?]
        at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.j                                                                                                                                        ava:989) ~[?:?]
        at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:254) ~[?:?                                                                                                                                        ]
        at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:365                                                                                                                                        ) ~[?:?]
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEv                                                                                                                                        entExecutor.java:163) ~[?:?]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(Single                                                                                                                                        ThreadEventExecutor.java:403) ~[?:?]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463) ~[?:?]
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThread                                                                                                                                        EventExecutor.java:858) ~[?:?]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_66]
[2018-11-15T14:30:14,428][INFO ][o.e.n.Node               ] [node-1] stopping ..                                                                                                                                        .
[2018-11-15T14:30:14,432][INFO ][o.e.n.Node               ] [node-1] stopped
[2018-11-15T14:30:14,432][INFO ][o.e.n.Node               ] [node-1] closing ...
[2018-11-15T14:30:14,464][INFO ][o.e.n.Node               ] [node-1] closed
 uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: BindTransportException[Failed to b                                                                                                                                        ind to [9300-9400]]; nested: BindException[Cannot assign requested address];

https://elasticsearch.cn/question/1755

修改一下 elasticsearch.yml配置信息 文件的 network.host

改成(下面的ip改成你的连接ip,如果是本地不需要改动)

network.host: 127.0.0.1

重新启动elasticSearch

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics