美文网首页
ngrinder-agent运行脚本时提示NoClassDefF

ngrinder-agent运行脚本时提示NoClassDefF

作者: 逗小豆zz | 来源:发表于2019-10-11 00:58 被阅读0次

ngrinder-agent部署到目标机器后,通过sh run_agent.sh启动。

通过ngrinder-controller界面启动测试脚本,查看agent终端,发现运行测试出现一下错误:

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class java.net.InetAddress
        at ch.qos.logback.core.util.ContextUtil.getLocalHostName(ContextUtil.java:32)
        at ch.qos.logback.core.util.ContextUtil.addHostNameAsProperty(ContextUtil.java:41)
        at ch.qos.logback.classic.joran.action.ConfigurationAction.begin(ConfigurationAction.java:48)
        at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:276)
        at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:148)
        at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:130)
        at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50)
        at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:147)
        at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:133)
        at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:96)
        at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:55)
        at net.grinder.engine.process.GrinderProcess.configureLogging(GrinderProcess.java:257)
        at net.grinder.engine.process.GrinderProcess.<init>(GrinderProcess.java:141)
        at net.grinder.engine.process.WorkerProcessEntryPoint.run(WorkerProcessEntryPoint.java:78)
        at net.grinder.engine.process.WorkerProcessEntryPoint.main(WorkerProcessEntryPoint.java:60)

解决方法:
/etc/resolv.conf配置文件中,添加nameserver

nameserver 192.168.3.1

或为网卡添加DNS配置,重启网络:

systemctl restart network

再次执行run_agent.sh脚本启动测试代理后,可正常运行性能测试脚本。

相关文章

网友评论

      本文标题:ngrinder-agent运行脚本时提示NoClassDefF

      本文链接:https://www.haomeiwen.com/subject/jsmzpctx.html