查看“执行日志”错误,显示不出日志
楼主好,我从Github,下载xxl-job,通过创建示例执行器任务,当点击"执行日志“时出错,且日志为空的情况。
错误如下:
2017-07-18 18:28:21,214 - xxl-job-admin - WARN [org.springframework.web.servlet.PageNotFound] - <Request method 'POST' not supported>
java.lang.NullPointerException
at com.xxl.job.core.rpc.netcom.NetComServerFactory.invokeService(NetComServerFactory.java:57)
at com.xxl.job.core.rpc.netcom.jetty.server.JettyServerHandler.doInvoke(JettyServerHandler.java:57)
at com.xxl.job.core.rpc.netcom.jetty.server.JettyServerHandler.handle(JettyServerHandler.java:30)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
之后便进入了
// is end
if (logResult.getContent()!=null && logResult.getContent().getFromLineNum() > logResult.getContent().getToLineNum()) {
XxlJobLog jobLog = xxlJobLogDao.load(logId);
if (jobLog.getHandleCode() > 0) {
logResult.getContent().setEnd(true);
}
}
内容end。显面显示如下:
完整日志如下:
[2017-07-18 06:28:00,924] Artifact xxl-job-executor-example:war: Artifact is deployed successfully
[2017-07-18 06:28:00,924] Artifact xxl-job-executor-example:war: Deploy took 10,734 milliseconds
2017-07-18 18:28:00 xxl-job-executor-example [org.eclipse.jetty.util.log]-[Thread-21]-[initialized]-[186]-[INFO] Logging initialized @15121ms
2017-07-18 18:28:00 xxl-job-executor-example [org.eclipse.jetty.server.Server]-[Thread-21]-[doStart]-[327]-[INFO] jetty-9.2.21.v20170120
2017-07-18 18:28:01 xxl-job-executor-example [org.eclipse.jetty.server.ServerConnector]-[Thread-21]-[doStart]-[266]-[INFO] Started ServerConnector@1d58b566{HTTP/1.1}{0.0.0.0:9999}
2017-07-18 18:28:01 xxl-job-executor-example [org.eclipse.jetty.server.Server]-[Thread-21]-[doStart]-[379]-[INFO] Started @15251ms
2017-07-18 18:28:01 xxl-job-executor-example [com.xxl.job.core.rpc.netcom.jetty.server.JettyServer]-[Thread-21]-[run]-[43]-[INFO] >>>>>>>>>>>> xxl-job jetty server start success at port:9999.
2017-07-18 18:28:02 xxl-job-executor-example [com.xxl.job.core.thread.ExecutorRegistryThread]-[Thread-26]-[run]-[49]-[INFO] >>>>>>>>>>> xxl-job Executor registry success, RegistryParam:RegistryParam{registGroup='EXECUTOR', registryKey='xxl-job-executor-example', registryValue='172.16.41.153:9999'}, registryResult:ReturnT [code=200, msg=null, content=null]
2017-07-18 18:28:12,189 - xxl-job-admin - WARN [org.springframework.web.servlet.PageNotFound] - <No mapping found for HTTP request with URI [/xxl-job-admin/jobgroup/allIdAndAppNameMap] in DispatcherServlet with name 'springmvc'>
2017-07-18 18:28:12,197 - xxl-job-admin - WARN [org.springframework.web.servlet.PageNotFound] - <Request method 'POST' not supported>
2017-07-18 18:28:17,347 - xxl-job-admin - INFO [org.springframework.scheduling.quartz.SchedulerFactoryBean] - <Starting Quartz Scheduler now, after delay of 20 seconds>
2017-07-18 18:28:17,437 - xxl-job-admin - INFO [org.quartz.core.QuartzScheduler] - <Scheduler quartzScheduler_$_THINKPAD-PC1500373676862 started.>
2017-07-18 18:28:21,212 - xxl-job-admin - WARN [org.springframework.web.servlet.PageNotFound] - <No mapping found for HTTP request with URI [/xxl-job-admin/jobgroup/allIdAndAppNameMap] in DispatcherServlet with name 'springmvc'>
2017-07-18 18:28:21,214 - xxl-job-admin - WARN [org.springframework.web.servlet.PageNotFound] - <Request method 'POST' not supported>
java.lang.NullPointerException
at com.xxl.job.core.rpc.netcom.NetComServerFactory.invokeService(NetComServerFactory.java:57)
at com.xxl.job.core.rpc.netcom.jetty.server.JettyServerHandler.doInvoke(JettyServerHandler.java:57)
at com.xxl.job.core.rpc.netcom.jetty.server.JettyServerHandler.handle(JettyServerHandler.java:30)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2017-07-18 18:31:46,616 - xxl-job-admin - WARN [org.springframework.scheduling.quartz.LocalDataSourceJobStore] - <This scheduler instance (THINKPAD-PC1500373676862) is still active but was recovered by another instance in the cluster. This may cause inconsistent behavior.>
2017-07-18 18:31:46 xxl-job-executor-example [com.xxl.job.core.thread.ExecutorRegistryThread]-[Thread-26]-[run]-[49]-[INFO] >>>>>>>>>>> xxl-job Executor registry success, RegistryParam:RegistryParam{registGroup='EXECUTOR', registryKey='xxl-job-executor-example', registryValue='172.16.41.153:9999'}, registryResult:ReturnT [code=200, msg=null, content=null]
java.lang.NullPointerException
at com.xxl.job.core.rpc.netcom.NetComServerFactory.invokeService(NetComServerFactory.java:57)
at com.xxl.job.core.rpc.netcom.jetty.server.JettyServerHandler.doInvoke(JettyServerHandler.java:57)
at com.xxl.job.core.rpc.netcom.jetty.server.JettyServerHandler.handle(JettyServerHandler.java:30)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
java.lang.NullPointerException
at com.xxl.job.core.rpc.netcom.NetComServerFactory.invokeService(NetComServerFactory.java:57)
at com.xxl.job.core.rpc.netcom.jetty.server.JettyServerHandler.doInvoke(JettyServerHandler.java:57)
at com.xxl.job.core.rpc.netcom.jetty.server.JettyServerHandler.handle(JettyServerHandler.java:30)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
java.lang.NullPointerException
at com.xxl.job.core.rpc.netcom.NetComServerFactory.invokeService(NetComServerFactory.java:57)
at com.xxl.job.core.rpc.netcom.jetty.server.JettyServerHandler.doInvoke(JettyServerHandler.java:57)
at com.xxl.job.core.rpc.netcom.jetty.server.JettyServerHandler.handle(JettyServerHandler.java:30)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
java.lang.NullPointerException
at com.xxl.job.core.rpc.netcom.NetComServerFactory.invokeService(NetComServerFactory.java:57)
at com.xxl.job.core.rpc.netcom.jetty.server.JettyServerHandler.doInvoke(JettyServerHandler.java:57)
at com.xxl.job.core.rpc.netcom.jetty.server.JettyServerHandler.handle(JettyServerHandler.java:30)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2017-07-18 18:32:03,456 - xxl-job-admin - WARN [org.springframework.scheduling.quartz.LocalDataSourceJobStore] - <This scheduler instance (THINKPAD-PC1500373676862) is still active but was recovered by another instance in the cluster. This may cause inconsistent behavior.>
2017-07-18 18:32:03,996 - xxl-job-admin - WARN [org.springframework.web.servlet.PageNotFound] - <No mapping found for HTTP request with URI [/xxl-job-admin/joblog/favicon.ico] in DispatcherServlet with name 'springmvc'>
2017-07-18 18:32:16 xxl-job-executor-example [com.xxl.job.core.thread.ExecutorRegistryThread]-[Thread-26]-[run]-[49]-[INFO] >>>>>>>>>>> xxl-job Executor registry success, RegistryParam:RegistryParam{registGroup='EXECUTOR', registryKey='xxl-job-executor-example', registryValue='172.16.41.153:9999'}, registryResult:ReturnT [code=200, msg=null, content=null]
2017-07-18 18:32:46 xxl-job-executor-example [com.xxl.job.core.thread.ExecutorRegistryThread]-[Thread-26]-[run]-[49]-[INFO] >>>>>>>>>>> xxl-job Executor registry success, RegistryParam:RegistryParam{registGroup='EXECUTOR', registryKey='xxl-job-executor-example', registryValue='172.16.41.153:9999'}, registryResult:ReturnT [code=200, msg=null, content=null]
2017-07-18 18:33:16 xxl-job-executor-example [com.xxl.job.core.thread.ExecutorRegistryThread]-[Thread-26]-[run]-[49]-[INFO] >>>>>>>>>>> xxl-job Executor registry success, RegistryParam:RegistryParam{registGroup='EXECUTOR', registryKey='xxl-job-executor-example', registryValue='172.16.41.153:9999'}, registryResult:ReturnT [code=200, msg=null, content=null]
2017-07-18 18:33:47 xxl-job-executor-example [com.xxl.job.core.thread.ExecutorRegistryThread]-[Thread-26]-[run]-[49]-[INFO] >>>>>>>>>>> xxl-job Executor registry success, RegistryParam:RegistryParam{registGroup='EXECUTOR', registryKey='xxl-job-executor-example', registryValue='172.16.41.153:9999'}, registryResult:ReturnT [code=200, msg=null, content=null]
2017-07-18 18:34:17 xxl-job-executor-example [com.xxl.job.core.thread.ExecutorRegistryThread]-[Thread-26]-[run]-[49]-[INFO] >>>>>>>>>>> xxl-job Executor registry success, RegistryParam:RegistryParam{registGroup='EXECUTOR', registryKey='xxl-job-executor-example', registryValue='172.16.41.153:9999'}, registryResult:ReturnT [code=200, msg=null, content=null]
2017-07-18 18:34:47 xxl-job-executor-example [com.xxl.job.core.thread.ExecutorRegistryThread]-[Thread-26]-[run]-[49]-[INFO] >>>>>>>>>>> xxl-job Executor registry success, RegistryParam:RegistryParam{registGroup='EXECUTOR', registryKey='xxl-job-executor-example', registryValue='172.16.41.153:9999'}, registryResult:ReturnT [code=200, msg=null, content=null]
2017-07-18 18:35:17 xxl-job-executor-example [com.xxl.job.core.thread.ExecutorRegistryThread]-[Thread-26]-[run]-[49]-[INFO] >>>>>>>>>>> xxl-job Executor registry success, RegistryParam:RegistryParam{registGroup='EXECUTOR', registryKey='xxl-job-executor-example', registryValue='172.16.41.153:9999'}, registryResult:ReturnT [code=200, msg=null, content=null]
2017-07-18 18:35:47 xxl-job-executor-example [com.xxl.job.core.thread.ExecutorRegistryThread]-[Thread-26]-[run]-[49]-[INFO] >>>>>>>>>>> xxl-job Executor registry success, RegistryParam:RegistryParam{registGroup='EXECUTOR', registryKey='xxl-job-executor-example', registryValue='172.16.41.153:9999'}, registryResult:ReturnT [code=200, msg=null, content=null]
2017-07-18 18:36:17 xxl-job-executor-example [com.xxl.job.core.thread.ExecutorRegistryThread]-[Thread-26]-[run]-[49]-[INFO] >>>>>>>>>>> xxl-job Executor registry success, RegistryParam:RegistryParam{registGroup='EXECUTOR', registryKey='xxl-job-executor-example', registryValue='172.16.41.153:9999'}, registryResult:ReturnT [code=200, msg=null, content=null]
2017-07-18 18:36:47 xxl-job-executor-example [com.xxl.job.core.thread.ExecutorRegistryThread]-[Thread-26]-[run]-[49]-[INFO] >>>>>>>>>>> xxl-job Executor registry success, RegistryParam:RegistryParam{registGroup='EXECUTOR', registryKey='xxl-job-executor-example', registryValue='172.16.41.153:9999'}, registryResult:ReturnT [code=200, msg=null, content=null]
2017-07-18 18:37:17 xxl-job-executor-example [com.xxl.job.core.thread.ExecutorRegistryThread]-[Thread-26]-[run]-[49]-[INFO] >>>>>>>>>>> xxl-job Executor registry success, RegistryParam:RegistryParam{registGroup='EXECUTOR', registryKey='xxl-job-executor-example', registryValue='172.16.41.153:9999'}, registryResult:ReturnT [code=200, msg=null, content=null]
烦请帮忙分析一下原因。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
好,谢谢群主。pom里显示的是1.8.1,所以是更新的Github资源库,没有用Release。我下载Release试试。并且断点看看RemoteHttpJobBean。
确实是执行器的问题,查看日志发现没有启动我自己的执行器,可能是因为多个网卡导致引用错误,重新创建执行器就可以了。
引用来自“志成中国”的评论
跟了一下执行任务的代码,并没有调用我的执行器。在这里直接返回成功了。
跟了一下执行任务的代码,并没有调用我的执行器。在这里直接返回成功了。