pterodactyl / panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
https://pterodactyl.io
Other
6.71k stars 1.71k forks source link

Daemon log littered with errors #443

Closed xyeLz closed 7 years ago

xyeLz commented 7 years ago

I have not thoroughly tested this but upon initial configuration, it appears as if the "Option Tag" section of a Service Option cannot have an underline in it. I will do more testing tomorrow but basically, I was using promod:ne for an option tag and then changed this to pml220_ne. I then began receiving the following errors during the server startup:

{"name":"wings","hostname":"a9e2caaf331f","pid":17,"server":"4967e861-dd6a-4ca4-af4f-7113091b0bad","level":30,"msg":"Server status has been changed to STARTING","time":"2017-05-21T06:13:24.626Z","v":0}
{"name":"wings","hostname":"a9e2caaf331f","pid":17,"level":60,"err":{"message":"Cannot read property 'startup' of undefined","name":"TypeError","stack":"TypeError: Cannot read property 'startup' of undefined\n    at Async.parallel (/srv/daemon/src/services/index.js:177:49)\n    at /srv/daemon/node_modules/async/dist/async.js:3830:24\n    at eachOfArrayLike (/srv/daemon/node_modules/async/dist/async.js:1003:9)\n    at eachOf (/srv/daemon/node_modules/async/dist/async.js:1051:5)\n    at _parallel (/srv/daemon/node_modules/async/dist/async.js:3829:5)\n    at Object.parallelLimit [as parallel] (/srv/daemon/node_modules/async/dist/async.js:3912:5)\n    at Service.onConsole (/srv/daemon/src/services/index.js:147:15)\n    at Server.output (/srv/daemon/src/controllers/server.js:347:22)\n    at Carrier.carry.data (/srv/daemon/src/controllers/docker.js:225:29)\n    at emitOne (events.js:96:13)\n    at Carrier.emit (events.js:188:7)"},"msg":"A fatal error occured during an operation.","time":"2017-05-21T06:13:29.864Z","v":0}

Once I changed this back to promod:ne, I had no more problems. Like I said, I haven't thoroughly tested this since it could certainly be something else, but I figured I'd at least mention it.

xyeLz commented 7 years ago

As mentioned above, thorough testing was not completed. I can safely say that it does not appear to be what I had initially thought in regards to "disallowed text". I had thought that this might be related to changing the "Option Tag" without rebooting the daemon, though. That was the only repeatable behavior I was able to find. For example, I have two Call of Duty 4 service options. I configured them originally with "promod:ne" and "promod:eu". After a few days of testing, I decided to change the "Option Tag" to more accurately reflect the mod names so I changed them to "pml220_ne" and "pml220_eu" respectively. Upon attempting to start a new server (for either of them), I began receiving the error message that I posted above. If I changed them back to their initial values, they seemed to start successfully. I decided to troubleshoot by changing the values back to the desired values (pml220_x) and then restarted the daemon. After doing this, I was able to create a server using the new "Option Tag". However, while the server does start successfully, I am still randomly receiving the error shown above.

Here is an example. I was starting/stopping two of the servers which have a very similar configuration. The errors seem to happen somewhat randomly, so I'm wondering if it has nothing to do with the startup/stopping of the containers. You'll see below that it happened once, 11 seconds after the container stopped. Also, the log became littered with these errors about 4 minutes after the container was started (at 15:25:55). It also is still occurring (I have a ton of errors from 15:29:02). It doesn't seem to be related to the stopping/starting of the containers, however it used to always show up then and would prevent the container from starting successfully. The errors don't appear to be affecting the containers now, but I'm curious why they're occurring.


ta (/srv/daemon/src/controllers/docker.js:225:29)\n    at emitOne (events.js:96:13)\n    at Carrier.emit (events.js:188:7)"},"msg":"A fatal error occured during an operation.","time":"2017-05-21T15:19:37.754Z","v":0}
{"name":"wings","hostname":"a9e2caaf331f","pid":17,"server":"447ede15-04db-46f9-90a2-2ec5056dac7f","level":30,"msg":"Server status has been changed to STARTING","time":"2017-05-21T15:20:12.445Z","v":0}
{"name":"wings","hostname":"a9e2caaf331f","pid":17,"server":"447ede15-04db-46f9-90a2-2ec5056dac7f","level":30,"msg":"Server status has been changed to ON","time":"2017-05-21T15:20:19.567Z","v":0}
{"name":"wings","hostname":"a9e2caaf331f","pid":17,"server":"447ede15-04db-46f9-90a2-2ec5056dac7f","level":30,"msg":"Server status has been changed to STOPPING","time":"2017-05-21T15:21:01.419Z","v":0}
{"name":"wings","hostname":"a9e2caaf331f","pid":17,"server":"447ede15-04db-46f9-90a2-2ec5056dac7f","level":30,"msg":"Server status has been changed to OFF","time":"2017-05-21T15:21:11.471Z","v":0}
{"name":"wings","hostname":"a9e2caaf331f","pid":17,"server":"447ede15-04db-46f9-90a2-2ec5056dac7f","level":30,"msg":"Server status has been changed to STARTING","time":"2017-05-21T15:21:29.761Z","v":0}
{"name":"wings","hostname":"a9e2caaf331f","pid":17,"server":"447ede15-04db-46f9-90a2-2ec5056dac7f","level":30,"msg":"Server status has been changed to ON","time":"2017-05-21T15:21:36.848Z","v":0}
{"name":"wings","hostname":"a9e2caaf331f","pid":17,"server":"ba793f41-c49f-4e07-bed0-25616449100b","level":30,"msg":"Server status has been changed to STOPPING","time":"2017-05-21T15:22:01.753Z","v":0}
{"name":"wings","hostname":"a9e2caaf331f","pid":17,"server":"ba793f41-c49f-4e07-bed0-25616449100b","level":30,"msg":"Server status has been changed to OFF","time":"2017-05-21T15:22:11.781Z","v":0}
{"name":"wings","hostname":"a9e2caaf331f","pid":17,"level":60,"err":{"message":"Cannot read property 'startup' of undefined","name":"TypeError","stack":"TypeError: Cannot read property 'startup' of undefined\n    at Async.parallel (/srv/daemon/src/services/index.js:177:49)\n    at /srv/daemon/node_modules/async/dist/async.js:3830:24\n    at eachOfArrayLike (/srv/daemon/node_modules/async/dist/async.js:1003:9)\n    at eachOf (/srv/daemon/node_modules/async/dist/async.js:1051:5)\n    at _parallel (/srv/daemon/node_modules/async/dist/async.js:3829:5)\n    at Object.parallelLimit [as parallel] (/srv/daemon/node_modules/async/dist/async.js:3912:5)\n    at Service.onConsole (/srv/daemon/src/services/index.js:147:15)\n    at Server.output (/srv/daemon/src/controllers/server.js:347:22)\n    at Carrier.carry.data (/srv/daemon/src/controllers/docker.js:225:29)\n    at emitOne (events.js:96:13)\n    at Carrier.emit (events.js:188:7)"},"msg":"A fatal error occured during an operation.","time":"2017-05-21T15:22:20.752Z","v":0}```
xyeLz commented 7 years ago

Last post I'll make, just wanted to show some additional logs with their respective timestamps to indicate this appears to be an ongoing error. I'm not sure how to diagnose what is causing it but I'm happy to look into this further if you can point me in the right direction.

{"name":"wings","hostname":"a9e2caaf331f","pid":17,"level":60,"err":{"message":"Cannot read property 'startup' of undefined","name":"TypeError","stack":"TypeError: Cannot read property 'startup' of undefined\n at Async.parallel (/srv/daemon/src/services/index.js:177:49)\n at /srv/daemon/node_modules/async/dist/async.js:3830:24\n at eachOfArrayLike (/srv/daemon/node_modules/async/dist/async.js:1003:9)\n at eachOf (/srv/daemon/node_modules/async/dist/async.js:1051:5)\n at _parallel (/srv/daemon/node_modules/async/dist/async.js:3829:5)\n at Object.parallelLimit [as parallel] (/srv/daemon/node_modules/async/dist/async.js:3912:5)\n at Service.onConsole (/srv/daemon/src/services/index.js:147:15)\n at Server.output (/srv/daemon/src/controllers/server.js:347:22)\n at Carrier.carry.data (/srv/daemon/src/controllers/docker.js:225:29)\n at emitOne (events.js:96:13)\n at Carrier.emit (events.js:188:7)"},"msg":"A fatal error occured during an operation.","time":"2017-05-21T15:29:02.381Z","v":0} {"name":"wings","hostname":"a9e2caaf331f","pid":17,"level":60,"err":{"message":"Cannot read property 'startup' of undefined","name":"TypeError","stack":"TypeError: Cannot read property 'startup' of undefined\n at Async.parallel (/srv/daemon/src/services/index.js:177:49)\n at /srv/daemon/node_modules/async/dist/async.js:3830:24\n at eachOfArrayLike (/srv/daemon/node_modules/async/dist/async.js:1003:9)\n at eachOf (/srv/daemon/node_modules/async/dist/async.js:1051:5)\n at _parallel (/srv/daemon/node_modules/async/dist/async.js:3829:5)\n at Object.parallelLimit [as parallel] (/srv/daemon/node_modules/async/dist/async.js:3912:5)\n at Service.onConsole (/srv/daemon/src/services/index.js:147:15)\n at Server.output (/srv/daemon/src/controllers/server.js:347:22)\n at Carrier.carry.data (/srv/daemon/src/controllers/docker.js:225:29)\n at emitOne (events.js:96:13)\n at Carrier.emit (events.js:188:7)"},"msg":"A fatal error occured during an operation.","time":"2017-05-21T15:31:43.754Z","v":0} {"name":"wings","hostname":"a9e2caaf331f","pid":17,"level":60,"err":{"message":"Cannot read property 'startup' of undefined","name":"TypeError","stack":"TypeError: Cannot read property 'startup' of undefined\n at Async.parallel (/srv/daemon/src/services/index.js:177:49)\n at /srv/daemon/node_modules/async/dist/async.js:3830:24\n at eachOfArrayLike (/srv/daemon/node_modules/async/dist/async.js:1003:9)\n at eachOf (/srv/daemon/node_modules/async/dist/async.js:1051:5)\n at _parallel (/srv/daemon/node_modules/async/dist/async.js:3829:5)\n at Object.parallelLimit [as parallel] (/srv/daemon/node_modules/async/dist/async.js:3912:5)\n at Service.onConsole (/srv/daemon/src/services/index.js:147:15)\n at Server.output (/srv/daemon/src/controllers/server.js:347:22)\n at Carrier.carry.data (/srv/daemon/src/controllers/docker.js:225:29)\n at emitOne (events.js:96:13)\n at Carrier.emit (events.js:188:7)"},"msg":"A fatal error occured during an operation.","time":"2017-05-21T15:32:00.754Z","v":0}

DaneEveritt commented 7 years ago

I'm pretty sure this is a strange race condition that is only showing up on certain systems where the processing speed is slightly different than others who work. I will be working this week to narrow down this issue, as well as a bunch more.

Thanks for your patience!

DaneEveritt commented 7 years ago

Further investigation has revealed this is likely not a race condition. I've made the commit above (8144535) to address the invalid tag names. Be aware that editing a tag requires the daemon be rebooted to apply those changes correctly.

It honestly looks like your service is either being edited without a corresponding daemon reboot, or your JSON is missing the required parts of it thus leading to these issues.

Let me know if this issue is resolved by rebooting the daemon after editing the tag.

xyeLz commented 7 years ago

I'm still getting this error despite changing my tag to be alphanumeric as well as rebooting the daemon container numerous times. These are occurring at least every 30 seconds on my daemon. I still cannot figure out what is causing this.

{"name":"wings","hostname":"a9e2caaf331f","pid":17,"level":60,"err":{"message":"Cannot read property 'startup' of undefined","name":"TypeError","stack":"TypeError: Cannot read property 'startup' of undefined\n at Async.parallel (/srv/daemon/src/services/index.js:177:49)\n at /srv/daemon/node_modules/async/dist/async.js:3830:24\n at eachOfArrayLike (/srv/daemon/node_modules/async/dist/async.js:1003:9)\n at eachOf (/srv/daemon/node_modules/async/dist/async.js:1051:5)\n at _parallel (/srv/daemon/node_modules/async/dist/async.js:3829:5)\n at Object.parallelLimit [as parallel] (/srv/daemon/node_modules/async/dist/async.js:3912:5)\n at Service.onConsole (/srv/daemon/src/services/index.js:147:15)\n at Server.output (/srv/daemon/src/controllers/server.js:347:22)\n at Carrier.carry.data (/srv/daemon/src/controllers/docker.js:225:29)\n at emitOne (events.js:96:13)\n at Carrier.emit (events.js:188:7)"},"msg":"A fatal error occured during an operation.","time":"2017-05-24T19:10:47.655Z","v":0}

xyeLz commented 7 years ago

Additionally this does not appear to be affecting games. I just have no idea how to prevent these from occurring.