通过ip加端口访问正常的哦
我附上pm2 log:
PM2 | 2017-05-11 18:17:09: Application log path : /root/.pm2/logs
PM2 | 2017-05-11 18:17:09: Process dump file : /root/.pm2/dump.pm2
PM2 | 2017-05-11 18:17:09: Concurrent actions : 2
PM2 | 2017-05-11 18:17:09: SIGTERM timeout : 1600
PM2 | 2017-05-11 18:17:09: ===============================================================================
PM2 | 2017-05-11 18:17:09: [Watch] Start watching 0
PM2 | 2017-05-11 18:17:09: Starting execution sequence in -fork mode- for app name:index id:0
PM2 | 2017-05-11 18:17:09: App name:index id:0 online
PM2 | 2017-05-11 22:08:16: [Watch] Stop watching 0
PM2 | 2017-05-11 22:08:16: Stopping app:index id:0
PM2 | 2017-05-11 22:08:16: App [index] with id [0] and pid [2399], exited with code [0] via signal [SIGINT]
PM2 | 2017-05-11 22:08:16: pid=2399 msg=process killed
PM2 | 2017-05-11 22:08:32: [Watch] Start watching 0
PM2 | 2017-05-11 22:08:32: Starting execution sequence in -fork mode- for app name:index id:0
PM2 | 2017-05-11 22:08:32: App name:index id:0 online
/root/.pm2/logs/index-error-0.log last 15 lines:
0|index | at Object.Module._extensions..js (module.js:580:10)
0|index | at Module.load (module.js:488:32)
0|index | at tryModuleLoad (module.js:447:12)
0|index | at Function.Module._load (module.js:439:3)
0|index | Error: Cannot find module 'express'
0|index | at Function.Module._resolveFilename (module.js:470:15)
0|index | at Function.Module._load (module.js:418:25)
0|index | at Module.require (module.js:498:17)
0|index | at require (internal/module.js:20:19)
0|index | at Object. (/root/soft_index/tomcat/apache-tomcat-8.5.14/server/api/userApi.js:2:15)
0|index | at Module._compile (module.js:571:32)
0|index | at Object.Module._extensions..js (module.js:580:10)
0|index | at Module.load (module.js:488:32)
0|index | at tryModuleLoad (module.js:447:12)
0|index | at Function.Module._load (module.js:439:3)
/root/.pm2/logs/index-out-0.log last 15 lines:
0|index | errno: 'ETIMEDOUT',
0|index | syscall: 'read',
0|index | fatal: true }
0|index | { message_list: '', author: 'zygg', date: '2017-05-12 09:04:45' }
0|index | { Error: Cannot enqueue Query after fatal error.
0|index | at Protocol._validateEnqueue (/root/soft_index/tomcat/apache-tomcat-8.5.14/server/node_modules/mysql/lib/protocol/Protocol.js:199:16)
0|index | at Protocol._enqueue (/root/soft_index/tomcat/apache-tomcat-8.5.14/server/node_modules/mysql/lib/protocol/Protocol.js:135:13)
0|index | at Connection.query (/root/soft_index/tomcat/apache-tomcat-8.5.14/server/node_modules/mysql/lib/Connection.js:208:25)
0|index | at router.post (/root/soft_index/tomcat/apache-tomcat-8.5.14/server/api/userApi.js:73:10)
0|index | at Layer.handle [as handle_request] (/root/soft_index/tomcat/apache-tomcat-8.5.14/server/node_modules/express/lib/router/layer.js:95:5)
0|index | at next (/root/soft_index/tomcat/apache-tomcat-8.5.14/server/node_modules/express/lib/router/route.js:137:13)
0|index | at Route.dispatch (/root/soft_index/tomcat/apache-tomcat-8.5.14/server/node_modules/express/lib/router/route.js:112:3)
0|index | at Layer.handle [as handle_request] (/root/soft_index/tomcat/apache-tomcat-8.5.14/server/node_modules/express/lib/router/layer.js:95:5)
0|index | at /root/soft_index/tomcat/apache-tomcat-8.5.14/server/node_modules/express/lib/router/index.js:281:22
0|index | at Function.process_params (/root/soft_index/tomcat/apache-tomcat-8.5.14/server/node_modules/express/lib/router/index.js:335:12) code: 'PROTOCOL_ENQUEUE_AFTER_FATAL_ERROR', fatal: false }