mirror of
https://github.com/pterodactyl/documentation.git
synced 2025-12-10 10:44:43 -06:00
1 line
18 KiB
JavaScript
1 line
18 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[54],{321:function(e,t,a){"use strict";a.r(t);var r=a(15),s=Object(r.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"troubleshooting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[e._v("#")]),e._v(" Troubleshooting")]),e._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul",[t("li",[t("a",{attrs:{href:"#reading-error-logs"}},[e._v("Reading Error Logs")]),t("ul",[t("li",[t("a",{attrs:{href:"#parsing-the-error"}},[e._v("Parsing the Error")])]),t("li",[t("a",{attrs:{href:"#understanding-the-error"}},[e._v("Understanding the Error")])]),t("li",[t("a",{attrs:{href:"#utilizing-grep"}},[e._v("Utilizing GREP")])])])]),t("li",[t("a",{attrs:{href:"#transfer-exceptions-xhr-poll-error"}},[e._v("Transfer Exceptions / XHR Poll Error")]),t("ul",[t("li",[t("a",{attrs:{href:"#example-errors"}},[e._v("Example Errors")])]),t("li",[t("a",{attrs:{href:"#basic-debugging-steps"}},[e._v("Basic Debugging Steps")])]),t("li",[t("a",{attrs:{href:"#more-advanced-debugging-steps"}},[e._v("More Advanced Debugging Steps")])])])]),t("li",[t("a",{attrs:{href:"#invalid-mac-exception"}},[e._v("Invalid MAC Exception")])]),t("li",[t("a",{attrs:{href:"#selinux-issues"}},[e._v("SELinux Issues")]),t("ul",[t("li",[t("a",{attrs:{href:"#redis-permissions-errors"}},[e._v("Redis Permissions Errors")])]),t("li",[t("a",{attrs:{href:"#in-case-there-is-any-weirdness-with-parts-of-the-panel"}},[e._v("In case there is any weirdness with parts of the panel")])]),t("li",[t("a",{attrs:{href:"#daemon-connection-errors"}},[e._v("Daemon Connection Errors")])])])]),t("li",[t("a",{attrs:{href:"#firewalld-issues"}},[e._v("FirewallD issues")])]),t("li",[t("a",{attrs:{href:"#database-errors"}},[e._v("Database Errors")]),t("ul",[t("li",[t("a",{attrs:{href:"#databasecontroller-php-142"}},[e._v("DatabaseController.php:142")])])])])])]),t("p"),e._v(" "),t("h2",{attrs:{id:"reading-error-logs"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#reading-error-logs"}},[e._v("#")]),e._v(" Reading Error Logs")]),e._v(" "),t("p",[e._v("If you ever encounter an unexpected error with the Panel the first thing you will likely be asked for is the logs.\nTo retrieve these, simply execute the command below which will output the last 100 lines of the Panel's log file.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("tail")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-n")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("100")]),e._v(" /var/www/pterodactyl/storage/logs/laravel-"),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$(")]),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("date")]),e._v(" +%F"),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v(")")])]),e._v(".log\n")])])]),t("h3",{attrs:{id:"parsing-the-error"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#parsing-the-error"}},[e._v("#")]),e._v(" Parsing the Error")]),e._v(" "),t("p",[e._v("When you run the command above, you'll probably be hit with a huge wall of text that might scare you. Fear not,\nthis is simply a stacktrace leading to the cause of the error, and you can actually ignore almost all of it when\nlooking for the cause of the error. Lets take a look at some example output below, which has been truncated to\nmake this easier to follow with.")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("#70 /srv/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))\n#71 /srv/www/public/index.php(53): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))\n#72 {main}\n[2018-07-19 00:50:24] local.ERROR: ErrorException: file_put_contents(/srv/www/storage/framework/views/c9c05d1357df1ce4ec8fc5df78c16c493b0d4f48.php): failed to open stream: Permission denied in /srv/www/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122\nStack trace:\n#0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(2, 'file_put_conten...', '/srv/www/vendor...', 122, Array)\n#1 /srv/www/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(122): file_put_contents('/srv/www/storag...', '<?php $__env->s...', 0)\n#2 /srv/www/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(122): Illuminate\\Filesystem\\Filesystem->put('/srv/www/storag...', '<?php $__env->s...')\n#3 /srv/www/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(51): Illuminate\\View\\Compilers\\BladeCompiler->compile('/srv/www/resour...')\n#4 /srv/www/vendor/laravel/framework/src/Illuminate/View/View.php(142): Illuminate\\View\\Engines\\CompilerEngine->get('/srv/www/resour...', Array)\n#5 /srv/www/vendor/laravel/framework/src/Illuminate/View/View.php(125): Illuminate\\View\\View->getContents()\n")])])]),t("p",[e._v("The first thing you'll want to do is follow the chain of numbers "),t("em",[e._v("up")]),e._v(" until you find "),t("code",[e._v("#0")]),e._v(", this will be the function that\ntriggered the exception. Right above line 0 you will see a line that has the date and time in brackets, "),t("code",[e._v("[2018-07-19 00:50:24]")]),e._v("\nabove for example. This line will be the human readable exception that you can use to understand what went wrong.")]),e._v(" "),t("h3",{attrs:{id:"understanding-the-error"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#understanding-the-error"}},[e._v("#")]),e._v(" Understanding the Error")]),e._v(" "),t("p",[e._v("In the example above we can see that the actual error was:")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("local.ERROR: ErrorException: file_put_contents(...): failed to open stream: Permission denied in /srv/www/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122\n")])])]),t("p",[e._v("From this error we can determine that there was an error performing a "),t("a",{attrs:{href:"http://php.net/manual/en/function.file-put-contents.php",target:"_blank",rel:"noopener noreferrer"}},[e._v("file_put_contents()"),t("OutboundLink")],1),e._v(" call, and the error was\nthat we couldn't open the file because permissions were denied. Its okay if you don't understand the error at all, but\nit does help you get faster support if you're able to provide these logs, and at least find the source of the error.\nSometimes the errors are pretty straightforward and will tell you exactly what went wrong, such as a "),t("code",[e._v("ConnectionException")]),e._v("\nbeing thrown when the Panel can't connect to the Daemon.")]),e._v(" "),t("h3",{attrs:{id:"utilizing-grep"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#utilizing-grep"}},[e._v("#")]),e._v(" Utilizing GREP")]),e._v(" "),t("p",[e._v("If you're trying to go through a bunch of errors quickly, you can use the command below which will limit the results returned to only\nbe the actual error lines, without all of the stack traces.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("tail")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-n")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1000")]),e._v(" /var/www/pterodactyl/storage/logs/laravel-"),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$(")]),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("date")]),e._v(" +%F"),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v(")")])]),e._v(".log "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("|")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("grep")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"\\['),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$(")]),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("date")]),e._v(" +%Y"),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v(")")])]),e._v('"')]),e._v("\n")])])]),t("h2",{attrs:{id:"transfer-exceptions-xhr-poll-error"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#transfer-exceptions-xhr-poll-error"}},[e._v("#")]),e._v(" Transfer Exceptions / XHR Poll Error")]),e._v(" "),t("p",[e._v("If you are seeing errors similar to the examples below, chances are there is some networking related issue, or you\njust don't have a required service running.")]),e._v(" "),t("h3",{attrs:{id:"example-errors"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#example-errors"}},[e._v("#")]),e._v(" Example Errors")]),e._v(" "),t("ul",[t("li",[t("p",[e._v('"We were unable to connect to the main Socket.IO server, there may be network issues currently. The panel may not work as expected."')])]),e._v(" "),t("li",[t("p",[e._v('"A TransferException was encountered while trying to contact the daemon, please ensure it\'s online and accessible. This error has been logged."')])])]),e._v(" "),t("h3",{attrs:{id:"basic-debugging-steps"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#basic-debugging-steps"}},[e._v("#")]),e._v(" Basic Debugging Steps")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("Ensure you have AdBlock disabled or whitelisted for your Panel and Daemon domains.")])]),e._v(" "),t("li",[t("p",[e._v("Check your browser's console by pressing "),t("code",[e._v("Ctrl + Shift + J")]),e._v(" (in Chrome) or "),t("code",[e._v("Cmd + Alt + I")]),e._v(" (in Safari). If there is\na red error in it, chances are that it will narrow down the potential problem.")])]),e._v(" "),t("li",[t("p",[e._v("Make sure if the daemon is properly installed and the active configuration matches the configuration shown under\n"),t("code",[e._v("Admin -> Node -> Configuration")]),e._v(" in the Panel.")])]),e._v(" "),t("li",[t("p",[e._v("Check that the Daemon is running, and not reporting errors. Use "),t("code",[e._v("service wings status")]),e._v(" to check the current status of the process.")])]),e._v(" "),t("li",[t("p",[e._v("Check that the Daemon ports are open on your firewall. The Daemon uses ports "),t("code",[e._v("8080")]),e._v(" or "),t("code",[e._v("8443")]),e._v(" for HTTP traffic,\nand "),t("code",[e._v("2022")]),e._v(" for SFTP traffic.")])]),e._v(" "),t("li",[t("p",[e._v("Check that the Panel can reach the Daemon using the domain that is configured on the Panel. Run "),t("code",[e._v("curl https://domain.com:8080")]),e._v(" on the Panel server and ensure that it can connect to the Daemon.")])]),e._v(" "),t("li",[t("p",[e._v("Ensure that you are using the correct HTTP scheme for your Panel and Daemon. If the Panel is running over HTTPS\nthe Daemon will also need to be running on HTTPS.")])])]),e._v(" "),t("h3",{attrs:{id:"more-advanced-debugging-steps"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#more-advanced-debugging-steps"}},[e._v("#")]),e._v(" More Advanced Debugging Steps")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("Stop the Daemon and run "),t("code",[e._v("cd /srv/daemon; sudo npm start")]),e._v(" to see if there are any errors being output by the Daemon.\nIf so, try resolving them manually, or contact us on Discord for more assistance.")])]),e._v(" "),t("li",[t("p",[e._v("Check your DNS and ensure that the response you receive is the one you expect using a tool such as "),t("code",[e._v("nslookup")]),e._v(" or "),t("code",[e._v("dig")]),e._v(".")])]),e._v(" "),t("li",[t("p",[e._v("If you use CloudFlare make sure that the yellow cloud is disabled for your Daemon or Panel "),t("code",[e._v("A")]),e._v(" records.")])]),e._v(" "),t("li",[t("p",[e._v("Make sure when using the daemon behind a firewall — pfSense, OpenSwitch, etc — that the correct NAT settings to access\nthe Daemon's ports from the outside network are setup.")])]),e._v(" "),t("li",[t("p",[e._v("If nothing is working so far, check your own DNS settings and consider switching DNS servers.")])]),e._v(" "),t("li",[t("p",[e._v("When running the Panel and Daemon on one server it can sometimes help if to add an entry in "),t("code",[e._v("/etc/hosts")]),e._v(" that directs\nthe public IP back to the server. Sometimes the reverse path is also needed, so you may need to add an entry to your\nservers "),t("code",[e._v("/etc/hosts")]),e._v(" file that points the Panel's domain to the correct IP.")])]),e._v(" "),t("li",[t("p",[e._v("When running the Daemon and Panel on separate VM's using the same adapter make sure the VM's can connect to each\nother. Promiscuous mode might be needed.")])])]),e._v(" "),t("h2",{attrs:{id:"invalid-mac-exception"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#invalid-mac-exception"}},[e._v("#")]),e._v(" Invalid MAC Exception")]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("This error should never happen if you correctly follow our installation and upgrade guides. The only time we have\never seen this error occur is when you blindly restore the Panel database from a backup and try to use a fresh\ninstallation of the Panel.")]),e._v(" "),t("p",[e._v("When restoring backups you should "),t("em",[e._v("always")]),e._v(" restore the "),t("code",[e._v(".env")]),e._v(" file!")])]),e._v(" "),t("p",[e._v("Sometimes when using the Panel you'll unexpectedly encounter a broken page, and upon checking the logs you'll see\nan exception mentioning an invalid MAC when decrypting. This error is caused by mismatched "),t("code",[e._v("APP_KEY")]),e._v("s in your "),t("code",[e._v(".env")]),e._v(" file\nwhen the data was encrypted versus decrypted.")]),e._v(" "),t("p",[e._v("If you are seeing this error the only solution is to restore the "),t("code",[e._v("APP_KEY")]),e._v(" from your "),t("code",[e._v(".env")]),e._v(" file. If you have lost that\noriginal key there is no way to recover the lost data.")]),e._v(" "),t("h2",{attrs:{id:"selinux-issues"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#selinux-issues"}},[e._v("#")]),e._v(" SELinux Issues")]),e._v(" "),t("p",[e._v("On systems with SELinux installed you might encounter unexpected errors when running redis or attempting to connect\nto the daemon to perform actions. These issues can generally be resolved by executing the commands below to allow\nthese programs to work with SELinux.")]),e._v(" "),t("h3",{attrs:{id:"redis-permissions-errors"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#redis-permissions-errors"}},[e._v("#")]),e._v(" Redis Permissions Errors")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("audit2allow "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-a")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-M")]),e._v(" redis_t\nsemodule "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v(" redis_t.pp\n")])])]),t("h3",{attrs:{id:"in-case-there-is-any-weirdness-with-parts-of-the-panel"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#in-case-there-is-any-weirdness-with-parts-of-the-panel"}},[e._v("#")]),e._v(" In case there is any weirdness with parts of the panel")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("restorecon "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-R")]),e._v(" /var/www/pterodactyl/\n")])])]),t("h3",{attrs:{id:"daemon-connection-errors"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#daemon-connection-errors"}},[e._v("#")]),e._v(" Daemon Connection Errors")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("audit2allow "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-a")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-M")]),e._v(" http_port_t\nsemodule "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v(" http_port_t.pp\n")])])]),t("h2",{attrs:{id:"firewalld-issues"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#firewalld-issues"}},[e._v("#")]),e._v(" FirewallD issues")]),e._v(" "),t("p",[e._v("If you are on a RHEL/CentOS server with firewalld installed you may have broken DNS.")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("firewall-cmd --permanent --zone=trusted --change-interface=pterodactyl0\nfirewall-cmd --reload\n")])])]),t("p",[e._v("restart docker and wings after running these to be sure the rules are applied.")]),e._v(" "),t("h2",{attrs:{id:"database-errors"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#database-errors"}},[e._v("#")]),e._v(" Database Errors")]),e._v(" "),t("h3",{attrs:{id:"databasecontroller-php-142"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#databasecontroller-php-142"}},[e._v("#")]),e._v(" DatabaseController.php:142")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("production.ERROR: ErrorException: Undefined variable: host in /var/www/pterodactyl/app/Http/Controllers/Admin/DatabaseController.php:142\n")])])]),t("p",[e._v("The database user you are trying to use doesn't have appropriate grants/has used incorrect password.")])])}),[],!1,null,null,null);t.default=s.exports}}]); |