{"id":131,"date":"2021-02-20T21:33:33","date_gmt":"2021-02-20T11:33:33","guid":{"rendered":"https:\/\/www.upaya.net.au\/?p=131"},"modified":"2026-03-25T11:04:01","modified_gmt":"2026-03-25T01:04:01","slug":"creating-a-monerod-service-in-centos-part-2-troubleshooting","status":"publish","type":"post","link":"https:\/\/www.upaya.net.au\/?p=131","title":{"rendered":"How To Create A Monero Service in Linux : Part 2 &#8211; Troubleshooting"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>In <a href=\"https:\/\/www.upaya.net.au\/?p=107\" target=\"_blank\" rel=\"noreferrer noopener\">Part 1<\/a> we turned our monero daemon into a service. <\/p>\n\n\n\n<p>Here in Part 2 we will go over how to troubleshoot a service that is not starting.<\/p>\n\n\n\n<p>Finally in <a href=\"https:\/\/www.upaya.net.au\/?p=247\" target=\"_blank\" rel=\"noreferrer noopener\">Part 3<\/a> we&#8217;ll go deeper in security matters, such as using Monero with SELinux and firewalling your service.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<p>Anticipating all of the potential problems would be an impossible task. Instead I will give you some basic ideas about <em>how <\/em>to troubleshoot your new Monero service.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Isolating the Problem<\/h3>\n\n\n\n<p>The first step is to determine whether it&#8217;s <code>systemd<\/code>, <code>monerod<\/code> or some other part of the system that is complaining and preventing start up.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Eliminating SELinux<\/h4>\n\n\n\n<p>First let&#8217;s confirm it&#8217;s NOT an SELinux problem. This common enough that it may be worth doing first since there&#8217;s a quick workaround that will enable us to go in with checking our service is working.<\/p>\n\n\n\n<p>Is SELinux currently enforcing?<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">&gt; getenforce\nEnforcing<\/pre><\/div>\n\n\n\n<p>If you see anything other than <code>Enforcing<\/code> then SELinux is not the problem and we can move on. If you do see <code>Enforcing<\/code> we need to look at the journal to see exactly why it&#8217;s causing the service startup to fail. But we&#8217;ll do that in <a href=\"https:\/\/www.upaya.net.au\/?p=247\" target=\"_blank\" rel=\"noreferrer noopener\">Part 3 &#8211; Security<\/a>. For now, let&#8217;s just turn SELinux to <code>Permissive<\/code> mode:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">&gt; setenforce 0\n&gt; getenforce\nPermissive<\/pre><\/div>\n\n\n\n<div style=\"color:#32373c;background-color:#ff3860\" class=\"wp-block-atomic-blocks-ab-notice ab-font-size-14 ab-block-notice\" data-id=\"e76161\"><div class=\"ab-notice-title\" style=\"color:#fff\"><p><strong>Warning<\/strong><\/p><\/div><div class=\"ab-notice-text\" style=\"border-color:#ff3860\"><p>Turn off SELinux at your own risk! Doing so won&#8217;t harm the functionality on your system, but it may make your system vulnerable to attacks while it is turned off. If your system is behind a home router or firewall, it&#8217;s probably not a big risk. Be more careful with internet-facing systems.<\/p><\/div><\/div>\n\n\n\n<p>Now restart the service and see if we&#8217;ve fixed the problem, or uncovered a new one.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">systemctl restart monerod\nsystemctl status monerod<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Eliminating Systemd<\/h4>\n\n\n\n<p>The problem with the <code>status<\/code> command is it only displays the the last 10 or so logs and problem may appear a bit further back in the logs. So let&#8217;s switch to our monitoring terminal and turn to <code>journalctl<\/code>:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">journalctl -t systemd -e<\/pre><\/div>\n\n\n\n<p>I can&#8217;t predict what you&#8217;re going to see, but if it&#8217;s not immediately obvious where the problem lies, try checking these gotchas:<\/p>\n\n\n<ul id=\"block-305b875b-8090-416b-93d7-e490bb915d2a\" class=\"block-editor-rich-text__editable block-editor-block-list__block wp-block is-selected rich-text\" tabindex=\"0\" role=\"group\" aria-multiline=\"true\" aria-label=\"Block: List\" data-block=\"305b875b-8090-416b-93d7-e490bb915d2a\" data-type=\"core\/list\" data-title=\"List\">\n<li>File permissions (particularly <code>data-dir<\/code>)<\/li>\n<li>Typos (mine or yours!)<\/li>\n<li>A corrupted blockchain when using a pre-existing one<\/li>\n<li>Connectivity to network problem (no internet connection or traffic being blocked somewhere)<\/li>\n<\/ul>\n\n\n<h4 class=\"wp-block-heading\">Eliminating Monero<\/h4>\n\n\n\n<p>Like for <code>systemd<\/code>, there&#8217;s a whole range of reasons that <code>monerod<\/code> could fail to start. But hopefully the journals are informative.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">journalctl -t monerod -e<\/pre><\/div>\n\n\n\n<p>A common gotcha might be passing invalid options to <code>monerod<\/code> via the configuration file we created. The Monero Project often changes these, so check that one or more of these hasn&#8217;t changed in the current version against the help:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">\/opt\/crypto\/monero\/monerod --help<\/pre><\/div>\n\n\n\n<p>If you need more detail you can also up the <code>log-level<\/code> to 1 or even 2 in the <code>monerod<\/code>.conf and restart.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:false,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">&gt; vi \/etc\/monerod.conf\nlog-level=1\n&gt; systemctl restart monerod<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p>Hopefully that&#8217;s some useful general advice for troubleshooting your service and it&#8217;s now starting to sync.<\/p>\n\n\n\n<p>In <a href=\"https:\/\/www.upaya.net.au\/?p=247\">Part 3<\/a> we&#8217;ll tackle some more details about security matters.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In Part 1 we turned our monero daemon into a service. Here in Part 2 we will go over how to troubleshoot a service that is not starting. Finally in Part 3 we&#8217;ll go deeper in security matters, such as using Monero with SELinux and firewalling your service. Troubleshooting Anticipating all of the potential [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":262,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[17],"tags":[9,14,15,13,8,11,12,16,7,6,10],"class_list":["post-131","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guides","tag-centos-8","tag-daemon","tag-fedora","tag-journald","tag-linux","tag-monero","tag-monerod","tag-red-hat","tag-service","tag-systemd","tag-xmr"],"featured_image_src":"https:\/\/www.upaya.net.au\/wp-content\/uploads\/2021\/02\/monero-logo-daemon-600x340.png","featured_image_src_square":"https:\/\/www.upaya.net.au\/wp-content\/uploads\/2021\/02\/monero-logo-daemon-600x340.png","author_info":{"display_name":"yrebrac","author_link":"https:\/\/www.upaya.net.au\/?author=1"},"_links":{"self":[{"href":"https:\/\/www.upaya.net.au\/index.php?rest_route=\/wp\/v2\/posts\/131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.upaya.net.au\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.upaya.net.au\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.upaya.net.au\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.upaya.net.au\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=131"}],"version-history":[{"count":14,"href":"https:\/\/www.upaya.net.au\/index.php?rest_route=\/wp\/v2\/posts\/131\/revisions"}],"predecessor-version":[{"id":265,"href":"https:\/\/www.upaya.net.au\/index.php?rest_route=\/wp\/v2\/posts\/131\/revisions\/265"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.upaya.net.au\/index.php?rest_route=\/wp\/v2\/media\/262"}],"wp:attachment":[{"href":"https:\/\/www.upaya.net.au\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.upaya.net.au\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.upaya.net.au\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}