<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Problems with starting pm2 start mm.sh]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">i made everything link written in this tutorial<br />
<a href="https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror</a><br />
but i stack here:</p>
<p dir="auto">"<br />
Starting your MagicMirror with PM2<br />
Simply start your mirror with the following command:<br />
pm2 start <a href="http://mm.sh" target="_blank" rel="noopener noreferrer nofollow ugc">mm.sh</a><br />
You mirror should now boot up and appear on your screen after a few seconds.<br />
"</p>
<p dir="auto">It doesn’t</p>
<p dir="auto">when i enter pm2 start <a href="http://mm.sh" target="_blank" rel="noopener noreferrer nofollow ugc">mm.sh</a> i receive the following message:</p>
<p dir="auto">[PM2] Starting /home/pi/mm.sh in fork_mode (1 instance)<br />
[PM2] Done.<br />
┌──────┬────┬──────┬────────┬───┬─────┬──────────┐<br />
│ Name │ id │ mode │ status │ ↺ │ cpu │ memory   │<br />
├──────┼────┼──────┼────────┼───┼─────┼──────────┤<br />
│ mm   │ 0  │ fork │ online │ 0 │ 0%  │ 2.8 MB   │<br />
└──────┴────┴──────┴────────┴───┴─────┴──────────┘<br />
Use <code>pm2 show &lt;id|name&gt;</code> to get more details about an app</p>
<p dir="auto">thats it.</p>
<p dir="auto">When i reboot i see the Magic Mirror Screen but the Raspi starts always the standard desktop.</p>
<p dir="auto">Any suggestions?</p>
<p dir="auto">Thank you very much!</p>
]]></description><link>https://forum.magicmirror.builders/topic/10840/problems-with-starting-pm2-start-mm-sh</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 08:35:33 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/10840.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 24 Jul 2019 07:16:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Wed, 31 Jul 2019 15:27:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/raksasas" aria-label="Profile: Raksasas">@<bdi>Raksasas</bdi></a> Exellent.  Great it is working now.</p>
]]></description><link>https://forum.magicmirror.builders/post/59596</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59596</guid><dc:creator><![CDATA[mumblebaj]]></dc:creator><pubDate>Wed, 31 Jul 2019 15:27:53 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Tue, 30 Jul 2019 23:26:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/raksasas" aria-label="Profile: Raksasas">@<bdi>Raksasas</bdi></a> great news!</p>
]]></description><link>https://forum.magicmirror.builders/post/59575</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59575</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Tue, 30 Jul 2019 23:26:40 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Tue, 30 Jul 2019 23:11:34 GMT]]></title><description><![CDATA[<p dir="auto">Part 1:<br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a></p>
<p dir="auto">Just tried the</p>
<pre><code>pm2 start installers/mm.sh
pm2 save
</code></pre>
<p dir="auto">From within the “MagicMirror” folder and no change.  MagicMirror starts and at reboot it does not automaticly start</p>
<p dir="auto">See below for my fix</p>
<p dir="auto">Part 2:<br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/mumblebaj" aria-label="Profile: mumblebaj">@<bdi>mumblebaj</bdi></a><br />
This seems possible.  So i re-ran</p>
<pre><code>sudo npm install -g pm2
pm2 startup
</code></pre>
<p dir="auto">After running “pm2 startup” this time I noticed the following:</p>
<pre><code>To setup the Startup Script, copy/paste the following command:
sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi

</code></pre>
<p dir="auto">So I ran that and followed with the “pm2 start <a href="http://mm.sh" target="_blank" rel="noopener noreferrer nofollow ugc">mm.sh</a>” and “pm2 save”.  Well now it is auto starting on reboot.</p>
]]></description><link>https://forum.magicmirror.builders/post/59574</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59574</guid><dc:creator><![CDATA[Raksasas]]></dc:creator><pubDate>Tue, 30 Jul 2019 23:11:34 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Tue, 30 Jul 2019 14:27:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/raksasas" aria-label="Profile: Raksasas">@<bdi>Raksasas</bdi></a> it was the</p>
<pre><code>pm2 start installers/mm.sh
</code></pre>
<p dir="auto">That needed to be done from the MagicMirror folder.</p>
<p dir="auto">Cause I ‘ASSUMED’ if u were working on mm, you would always be in that folder.</p>
<p dir="auto">installers folder is in mm, not in user home</p>
]]></description><link>https://forum.magicmirror.builders/post/59534</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59534</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Tue, 30 Jul 2019 14:27:41 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Tue, 30 Jul 2019 13:12:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/raksasas" aria-label="Profile: Raksasas">@<bdi>Raksasas</bdi></a> My <a href="http://mm.sh" target="_blank" rel="noopener noreferrer nofollow ugc">mm.sh</a> resides in my /pi/ folder and not in the MagicMirror folder so should work.  It might be that there was an error while you were setting up pm2 or setting up the autostart perhaps?</p>
]]></description><link>https://forum.magicmirror.builders/post/59527</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59527</guid><dc:creator><![CDATA[mumblebaj]]></dc:creator><pubDate>Tue, 30 Jul 2019 13:12:45 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Tue, 30 Jul 2019 13:07:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a></p>
<p dir="auto">Looking over the <a href="https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror" target="_blank" rel="noopener noreferrer nofollow ugc">“Auto Start” page</a> I do not see where it states that the pm2 commands are to be run while inside the MagicMirror folder.</p>
<p dir="auto">With you stating that it seems to be saying that the “<a href="http://mm.sh" target="_blank" rel="noopener noreferrer nofollow ugc">mm.sh</a>” script needs to be ran from inside the “MagicMirror” too.  Again the “Auto Start” page shows that it was created inside the ‘home’ (~) folder.  So one would think/presume it can be ran from inside the “home” folder also.</p>
<p dir="auto">Either way I will give it a go.</p>
]]></description><link>https://forum.magicmirror.builders/post/59526</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59526</guid><dc:creator><![CDATA[Raksasas]]></dc:creator><pubDate>Tue, 30 Jul 2019 13:07:35 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Mon, 29 Jul 2019 02:53:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/raksasas" aria-label="Profile: Raksasas">@<bdi>Raksasas</bdi></a> should be executing those while in the MagicMirror folder</p>
]]></description><link>https://forum.magicmirror.builders/post/59476</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59476</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Mon, 29 Jul 2019 02:53:09 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Mon, 29 Jul 2019 02:10:24 GMT]]></title><description><![CDATA[<p dir="auto">I am having the same problem: I did what was mentioned above and after the reboot it stll did not start automaticly.  Running “pm2 list” after the reboot shows <a href="http://mm.sh" target="_blank" rel="noopener noreferrer nofollow ugc">mm.sh</a> is not runnning.</p>
<pre><code>permitted by applicable law.
Last login: Sun Jul 28 20:48:49 2019
pi@magicmirror:~ $ pm2 list
[PM2] Spawning PM2 daemon with pm2_home=/home/pi/.pm2
[PM2] PM2 Successfully daemonized
┌──────────┬────┬─────────┬──────┬─────┬────────┬─────────┬────────┬─────┬─────┬──────┬──────────┐
│ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ user │ watching │
└──────────┴────┴─────────┴──────┴─────┴────────┴─────────┴────────┴─────┴─────┴──────┴──────────┘
 Use `pm2 show &lt;id|name&gt;` to get more details about an app
pi@magicmirror:~ $ pm2 start installers/mm.sh
[PM2][ERROR] script not found : /home/pi/installers/mm.sh
script not found : /home/pi/installers/mm.sh
┌──────────┬────┬─────────┬──────┬─────┬────────┬─────────┬────────┬─────┬─────┬──────┬──────────┐
│ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ user │ watching │
└──────────┴────┴─────────┴──────┴─────┴────────┴─────────┴────────┴─────┴─────┴──────┴──────────┘
 Use `pm2 show &lt;id|name&gt;` to get more details about an app
pi@magicmirror:~ $ pm2 start mm.sh
[PM2] Starting /home/pi/mm.sh in fork_mode (1 instance)
[PM2] Done.
┌──────────┬────┬─────────┬──────┬─────┬────────┬─────────┬────────┬─────┬──────────┬──────┬──────────┐
│ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu │ mem      │ user │ watching │
├──────────┼────┼─────────┼──────┼─────┼────────┼─────────┼────────┼─────┼──────────┼──────┼──────────┤
│ mm       │ 0  │ N/A     │ fork │ 718 │ online │ 0       │ 0s     │ 0%  │ 2.6 MB   │ pi   │ disabled │
└──────────┴────┴─────────┴──────┴─────┴────────┴─────────┴────────┴─────┴──────────┴──────┴──────────┘
 Use `pm2 show &lt;id|name&gt;` to get more details about an app
pi@magicmirror:~ $ pm2 save
[PM2] Saving current process list...
[PM2] Successfully saved in /home/pi/.pm2/dump.pm2
pi@magicmirror:~ $ pm2 list
┌──────────┬────┬─────────┬──────┬─────┬────────┬─────────┬────────┬─────┬──────────┬──────┬──────────┐
│ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu │ mem      │ user │ watching │
├──────────┼────┼─────────┼──────┼─────┼────────┼─────────┼────────┼─────┼──────────┼──────┼──────────┤
│ mm       │ 0  │ N/A     │ fork │ 718 │ online │ 0       │ 44s    │ 0%  │ 2.6 MB   │ pi   │ disabled │
└──────────┴────┴─────────┴──────┴─────┴────────┴─────────┴────────┴─────┴──────────┴──────┴──────────┘
 Use `pm2 show &lt;id|name&gt;` to get more details about an app
pi@magicmirror:~ $ pm2 save
[PM2] Saving current process list...
[PM2] Successfully saved in /home/pi/.pm2/dump.pm2
pi@magicmirror:~ $ sudo reboot
Connection to 192.168.138.28 closed by remote host.
Connection to 192.168.138.28 closed.

</code></pre>
<pre><code>pi@magicmirror:~ $ cat mm.sh
cd /home/pi/MagicMirror
DISPLAY=:0 npm start
pi@magicmirror:~ $ ls -lha mm.sh
-rwxr-xr-x 1 pi pi 45 Jul 28 20:14 mm.sh
pi@magicmirror:~ $ 

</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/59475</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59475</guid><dc:creator><![CDATA[Raksasas]]></dc:creator><pubDate>Mon, 29 Jul 2019 02:10:24 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Sat, 27 Jul 2019 21:32:13 GMT]]></title><description><![CDATA[<p dir="auto">When i do</p>
<pre><code>pm2 list
</code></pre>
<p dir="auto">The "name, id, mode, status, cpu, and memory chart shows up. It is all in blue.<br />
Below it, it says “use ‘pm2 show &lt;id/name&gt;~ to get more details about an app.’”</p>
<p dir="auto">When i type in</p>
<pre><code>pm2 start
</code></pre>
<p dir="auto">The same chart above displays along with a message saying<br />
[PM2] [ERROR] File ecosystem.config.js is not found</p>
<p dir="auto">What does this mean?</p>
]]></description><link>https://forum.magicmirror.builders/post/59440</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59440</guid><dc:creator><![CDATA[Gomalley]]></dc:creator><pubDate>Sat, 27 Jul 2019 21:32:13 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Sat, 27 Jul 2019 13:27:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/detto65" aria-label="Profile: Detto65">@<bdi>Detto65</bdi></a> yes, the install script uses a json file to configure the pm2 process</p>
]]></description><link>https://forum.magicmirror.builders/post/59433</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59433</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sat, 27 Jul 2019 13:27:16 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Sat, 27 Jul 2019 12:18:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/madoxx" aria-label="Profile: madoXX">@<bdi>madoXX</bdi></a><br />
just did a fresh install of my magicmirror, because the sd card went corrupt.<br />
during the install procedure it somehwere asked me if i want to autostart MagicMirror.<br />
after that it started automatically after booting into the desktop first.<br />
When trying to use pm2, it shows me the process is already running, but it’s name is MagicMirror , not mm.<br />
MagicMirror version 2.8.0</p>
]]></description><link>https://forum.magicmirror.builders/post/59430</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59430</guid><dc:creator><![CDATA[Detto65]]></dc:creator><pubDate>Sat, 27 Jul 2019 12:18:15 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Sat, 27 Jul 2019 03:30:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gomalley" aria-label="Profile: Gomalley">@<bdi>Gomalley</bdi></a> ok</p>
<pre><code>pm2 list
</code></pre>
<p dir="auto">If nothing</p>
<pre><code>pm2 start installers/mm.sh
pm2 save
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/59422</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59422</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sat, 27 Jul 2019 03:30:59 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Sat, 27 Jul 2019 02:28:27 GMT]]></title><description><![CDATA[<p dir="auto">And I tried restarting the pi and the “Booting up” MagicMirror2 showed but it never actually loaded.</p>
]]></description><link>https://forum.magicmirror.builders/post/59421</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59421</guid><dc:creator><![CDATA[Gomalley]]></dc:creator><pubDate>Sat, 27 Jul 2019 02:28:27 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Sat, 27 Jul 2019 02:26:00 GMT]]></title><description><![CDATA[<p dir="auto">I tried it but I do not think that it worked. My code before I touched it read</p>
<pre><code>cd ~/MagicMirror
</code></pre>
<p dir="auto">Now i tried two things both gave same output</p>
<pre><code>cd ~/home/pi/MagicMirror
</code></pre>
<p dir="auto">and</p>
<pre><code>cd /home/pi/MagicMirror
</code></pre>
<p dir="auto">It now says<br />
[PM2] Spawning PM2 daemon with pm2_home=/home/pi/.pm2<br />
[PM2] PM2 Successfully daemonized<br />
Use --update-env to update environment variables<br />
[PM2] Applying action restartProcessId on app [0](ids: [ ‘0’ ])<br />
[PM2] [ERROR] Process 0 not found</p>
<p dir="auto">In my <a href="http://mm.sh" target="_blank" rel="noopener noreferrer nofollow ugc">mm.sh</a> the file currently reads this:<br />
cd /home/pi/MagicMirror<br />
DISPLAY=:0 npm start</p>
]]></description><link>https://forum.magicmirror.builders/post/59420</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59420</guid><dc:creator><![CDATA[Gomalley]]></dc:creator><pubDate>Sat, 27 Jul 2019 02:26:00 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Sat, 27 Jul 2019 01:32:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gomalley" aria-label="Profile: Gomalley">@<bdi>Gomalley</bdi></a> pm2 runs a script,<br />
installers/mm.sh</p>
<p dir="auto">It should read</p>
<pre><code>cd /home/pi/MagicMirror
...etc
</code></pre>
<p dir="auto">Change it if not.</p>
<p dir="auto">Then</p>
<pre><code>pm2 restart 0
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/59419</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59419</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sat, 27 Jul 2019 01:32:32 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Sat, 27 Jul 2019 00:37:34 GMT]]></title><description><![CDATA[<p dir="auto">I’m actually having thus EXACT problem and it is very frusterating. Im having a little trouble reading all of the instructions to fix it. Did you get yours fixed? If so exactly what did you do to fix it?</p>
]]></description><link>https://forum.magicmirror.builders/post/59417</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59417</guid><dc:creator><![CDATA[Gomalley]]></dc:creator><pubDate>Sat, 27 Jul 2019 00:37:34 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Thu, 25 Jul 2019 07:13:11 GMT]]></title><description><![CDATA[<p dir="auto">OK command back…</p>
<p dir="auto">after a few reboots now everything is starting fine.<br />
A big thanks to the community here!<br />
Very helpfull people here!</p>
]]></description><link>https://forum.magicmirror.builders/post/59372</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59372</guid><dc:creator><![CDATA[madoXX]]></dc:creator><pubDate>Thu, 25 Jul 2019 07:13:11 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Thu, 25 Jul 2019 07:01:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> said in <a href="/post/59352">Problems with starting pm2 start mm.sh</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/madoxx" aria-label="Profile: madoXX">@<bdi>madoXX</bdi></a> does it restart on boot?</p>
<p dir="auto">pm2 remove 0<br />
should have been<br />
pm2 delete 0</p>
<p dir="auto">and yep, needed a stop after the pm2 save</p>
</blockquote>
<p dir="auto">no, the boot menu from the magic mirror appears (booting up), no error but it goes straight to the desktop.</p>
<p dir="auto">something strang here</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> said in <a href="/post/59350">Problems with starting pm2 start mm.sh</a>:</p>
<blockquote>
<p dir="auto">then<br />
pm2 list</p>
<p dir="auto">nothing running</p>
</blockquote>
<p dir="auto">In fact the <a href="http://themm.sh" target="_blank" rel="noopener noreferrer nofollow ugc">themm.sh</a> is running caus i startet it above</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> said in <a href="/post/59350">Problems with starting pm2 start mm.sh</a>:</p>
<blockquote>
<p dir="auto">pm2 start /home/pi/mm.sh</p>
</blockquote>
]]></description><link>https://forum.magicmirror.builders/post/59370</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59370</guid><dc:creator><![CDATA[madoXX]]></dc:creator><pubDate>Thu, 25 Jul 2019 07:01:22 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Wed, 24 Jul 2019 16:20:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/madoxx" aria-label="Profile: madoXX">@<bdi>madoXX</bdi></a> does it restart on boot?</p>
<p dir="auto">pm2 remove 0<br />
should have been<br />
pm2 delete 0</p>
<p dir="auto">and yep, needed a stop after the pm2 save</p>
]]></description><link>https://forum.magicmirror.builders/post/59352</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59352</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 24 Jul 2019 16:20:36 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Wed, 24 Jul 2019 16:15:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> said in <a href="/post/59350">Problems with starting pm2 start mm.sh</a>:</p>
<blockquote>
<p dir="auto">1st make sure script works<br />
is it executable?<br />
chmod +x <a href="http://mm.sh" target="_blank" rel="noopener noreferrer nofollow ugc">mm.sh</a></p>
</blockquote>
<p dir="auto">ok, done</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> said in <a href="/post/59350">Problems with starting pm2 start mm.sh</a>:</p>
<blockquote>
<p dir="auto">/home/pi/mm.sh &amp;<br />
(and stop it)<br />
then</p>
</blockquote>
<p dir="auto">don’t get this…<br />
should i enter<br />
pm2 stop /home/pi/mm.sh &amp;</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> said in <a href="/post/59350">Problems with starting pm2 start mm.sh</a>:</p>
<blockquote>
<p dir="auto">pm2 remove 0</p>
</blockquote>
<p dir="auto">when i enter this, this appears:<br />
[PM2] Command not found</p>
<p dir="auto">usage: pm2 [options] </p>
<p dir="auto">pm2 -h, --help             all available commands and options<br />
pm2 examples               display pm2 usage examples<br />
pm2  -h           help on a specific command</p>
<p dir="auto">Access pm2 files in ~/.pm2<br />
[1]+  Fertig                  pm2 stop /home/pi/mm.sh</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> said in <a href="/post/59350">Problems with starting pm2 start mm.sh</a>:</p>
<blockquote>
<p dir="auto">pm2 startup<br />
ok,  had to enter this one:<br />
sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi</p>
</blockquote>
<p dir="auto">After the enter this one appeared:<br />
[PM2] Init System found: systemd<br />
Platform systemd<br />
Template<br />
[Unit]<br />
Description=PM2 process manager<br />
Documentation=<a href="https://pm2.keymetrics.io/" target="_blank" rel="noopener noreferrer nofollow ugc">https://pm2.keymetrics.io/</a><br />
After=network.target</p>
<p dir="auto">[Service]<br />
Type=forking<br />
User=pi<br />
LimitNOFILE=infinity<br />
LimitNPROC=infinity<br />
LimitCORE=infinity<br />
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin<br />
Environment=PM2_HOME=/home/pi/.pm2<br />
PIDFile=/home/pi/.pm2/pm2.pid<br />
Restart=on-failure</p>
<p dir="auto">ExecStart=/usr/lib/node_modules/pm2/bin/pm2 resurrect<br />
ExecReload=/usr/lib/node_modules/pm2/bin/pm2 reload all<br />
ExecStop=/usr/lib/node_modules/pm2/bin/pm2 kill</p>
<p dir="auto">[Install]<br />
WantedBy=multi-user.target</p>
<p dir="auto">Target path<br />
/etc/systemd/system/pm2-pi.service<br />
Command list<br />
[ ‘systemctl enable pm2-pi’ ]<br />
[PM2] Writing init configuration in /etc/systemd/system/pm2-pi.service<br />
[PM2] Making script booting at startup…<br />
</p><div class="plugin-markdown"><input type="checkbox" />Executing: systemctl enable pm2-pi…</div><br />
[PM2] [v] Command successfully executed.<br />
±--------------------------------------+<br />
[PM2] Freeze a process list on reboot via:<br />
$ pm2 save<p></p>
<p dir="auto">[PM2] Remove init script via:<br />
$ pm2 unstartup systemd</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> said in <a href="/post/59350">Problems with starting pm2 start mm.sh</a>:</p>
<blockquote>
<p dir="auto">pm2 start /home/pi/mm.sh</p>
</blockquote>
<p dir="auto">here this is the result:<br />
[PM2] Applying action restartProcessId on app [mm](ids: 0)<br />
[PM2] <a href="0">mm</a> ✓<br />
[PM2] Process successfully started<br />
┌──────────┬────┬─────────┬──────┬───────┬────────┬─────────┬────────┬─────┬──────────┬──────┬──────────┐<br />
│ App name │ id │ version │ mode │ pid   │ status │ restart │ uptime │ cpu │ mem      │ user │ watching │<br />
├──────────┼────┼─────────┼──────┼───────┼────────┼─────────┼────────┼─────┼──────────┼──────┼──────────┤<br />
│ mm       │ 0  │ N/A     │ fork │ 15797 │ online │ 0       │ 0s     │ 0%  │ 2.4 MB   │ pi   │ disabled │<br />
└──────────┴────┴─────────┴──────┴───────┴────────┴─────────┴────────┴─────┴──────────┴──────┴──────────┘<br />
Use <code>pm2 show &lt;id|name&gt;</code> to get more details about an app</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> said in <a href="/post/59350">Problems with starting pm2 start mm.sh</a>:</p>
<blockquote>
<p dir="auto">pm2 save</p>
</blockquote>
<p dir="auto">Result<br />
[PM2] Saving current process list…<br />
[PM2] Successfully saved in /home/pi/.pm2/dump.pm2</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> said in <a href="/post/59350">Problems with starting pm2 start mm.sh</a>:</p>
<blockquote>
<p dir="auto">pm2 list</p>
<p dir="auto">nothing running</p>
</blockquote>
<p dir="auto">Yes there is the mm running:<br />
┌──────────┬────┬─────────┬──────┬───────┬────────┬─────────┬────────┬─────┬──────────┬──────┬──────────┐<br />
│ App name │ id │ version │ mode │ pid   │ status │ restart │ uptime │ cpu │ mem      │ user │ watching │<br />
├──────────┼────┼─────────┼──────┼───────┼────────┼─────────┼────────┼─────┼──────────┼──────┼──────────┤<br />
│ mm       │ 0  │ N/A     │ fork │ 15797 │ online │ 0       │ 103s   │ 0%  │ 2.4 MB   │ pi   │ disabled │<br />
└──────────┴────┴─────────┴──────┴───────┴────────┴─────────┴────────┴─────┴──────────┴──────┴──────────┘<br />
Use <code>pm2 show &lt;id|name&gt;</code> to get more details about an app</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> said in <a href="/post/59350">Problems with starting pm2 start mm.sh</a>:</p>
<blockquote>
<p dir="auto">pm2 start mm</p>
<p dir="auto">should start ok</p>
</blockquote>
<p dir="auto">perhaps no…<br />
[PM2] Applying action restartProcessId on app [mm](ids: 0)<br />
[PM2] <a href="0">mm</a> ✓<br />
[PM2] Process successfully started<br />
┌──────────┬────┬─────────┬──────┬───────┬────────┬─────────┬────────┬─────┬──────────┬──────┬──────────┐<br />
│ App name │ id │ version │ mode │ pid   │ status │ restart │ uptime │ cpu │ mem      │ user │ watching │<br />
├──────────┼────┼─────────┼──────┼───────┼────────┼─────────┼────────┼─────┼──────────┼──────┼──────────┤<br />
│ mm       │ 0  │ N/A     │ fork │ 16995 │ online │ 1       │ 0s     │ 0%  │ 2.5 MB   │ pi   │ disabled │<br />
└──────────┴────┴─────────┴──────┴───────┴────────┴─────────┴────────┴─────┴──────────┴──────┴──────────┘<br />
Use <code>pm2 show &lt;id|name&gt;</code> to get more details about an app</p>
<p dir="auto">Thanks anyway for your help!</p>
]]></description><link>https://forum.magicmirror.builders/post/59351</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59351</guid><dc:creator><![CDATA[madoXX]]></dc:creator><pubDate>Wed, 24 Jul 2019 16:15:40 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Wed, 24 Jul 2019 15:57:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/madoxx" aria-label="Profile: madoXX">@<bdi>madoXX</bdi></a> said in <a href="/post/59349">Problems with starting pm2 start mm.sh</a>:</p>
<blockquote>
<p dir="auto">File ecosystem.config.js not found</p>
</blockquote>
<p dir="auto">ok, seems pm2 is not setup right</p>
<p dir="auto">1st make sure script works<br />
is it executable?<br />
chmod +x <a href="http://mm.sh" target="_blank" rel="noopener noreferrer nofollow ugc">mm.sh</a></p>
<pre><code>/home/pi/mm.sh &amp;
(and stop it)
then 

pm2 remove 0
pm2 startup
   this will return a command u need to execute (cut/paste)
pm2 start /home/pi/mm.sh
pm2 save
</code></pre>
<p dir="auto">then</p>
<pre><code>pm2 list
</code></pre>
<p dir="auto">nothing running</p>
<pre><code>pm2 start mm
</code></pre>
<p dir="auto">should start ok</p>
<p dir="auto">reboot</p>
]]></description><link>https://forum.magicmirror.builders/post/59350</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59350</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 24 Jul 2019 15:57:54 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Wed, 24 Jul 2019 15:51:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> said in <a href="/post/59348">Problems with starting pm2 start mm.sh</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/madoxx" aria-label="Profile: madoXX">@<bdi>madoXX</bdi></a> said in <a href="/post/59346">Problems with starting pm2 start mm.sh</a>:</p>
<blockquote>
<p dir="auto">cd ~/MagicMirror</p>
</blockquote>
<p dir="auto">change that 1st line to be</p>
<pre><code>cd /home/pi/MagicMirror
</code></pre>
<p dir="auto">pm2 is running under root at the time of startup</p>
</blockquote>
<p dir="auto">changed it, saved and made a reboot. nothing changed.</p>
<p dir="auto">when i write pm2 start i receive the following message:</p>
<p dir="auto">[PM2][ERROR] File ecosystem.config.js not found<br />
┌──────────┬────┬─────────┬──────┬─────┬────────┬─────────┬────────┬─────┬──────────┬──────┬──────────┐<br />
│ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu │ mem      │ user │ watching │<br />
├──────────┼────┼─────────┼──────┼─────┼────────┼─────────┼────────┼─────┼──────────┼──────┼──────────┤<br />
│ mm       │ 0  │ N/A     │ fork │ 838 │ online │ 0       │ 3m     │ 0%  │ 2.4 MB   │ pi   │ disabled │<br />
└──────────┴────┴─────────┴──────┴─────┴────────┴─────────┴────────┴─────┴──────────┴──────┴──────────┘<br />
Use <code>pm2 show &lt;id|name&gt;</code> to get more details about an app</p>
]]></description><link>https://forum.magicmirror.builders/post/59349</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59349</guid><dc:creator><![CDATA[madoXX]]></dc:creator><pubDate>Wed, 24 Jul 2019 15:51:26 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Wed, 24 Jul 2019 15:35:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/madoxx" aria-label="Profile: madoXX">@<bdi>madoXX</bdi></a> said in <a href="/post/59346">Problems with starting pm2 start mm.sh</a>:</p>
<blockquote>
<p dir="auto">cd ~/MagicMirror</p>
</blockquote>
<p dir="auto">change that 1st line to be</p>
<pre><code>cd /home/pi/MagicMirror
</code></pre>
<p dir="auto">pm2 is running under root at the time of startup</p>
]]></description><link>https://forum.magicmirror.builders/post/59348</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59348</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 24 Jul 2019 15:35:46 GMT</pubDate></item><item><title><![CDATA[Reply to Problems with starting pm2 start mm.sh on Wed, 24 Jul 2019 15:32:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cyrus1337" aria-label="Profile: CyruS1337">@<bdi>CyruS1337</bdi></a> said in <a href="/post/59339">Problems with starting pm2 start mm.sh</a>:</p>
<blockquote>
<p dir="auto">Did you also follow this point:</p>
<p dir="auto">Starting PM2 on boat<br />
To make sure PM2 can do it’s job when (re) booting your operating system, it needs to be started on boot. Luckily, PM2 has a handy helper for this.</p>
<p dir="auto">pm2 startup<br />
PM2 wants to show you a command you need to execute.</p>
</blockquote>
<p dir="auto">Thanks for your reply. For the moment i want to know why it doesn’t even start, when i try to start it manually.</p>
<p dir="auto">Moreover, here the content of the file <a href="http://mm.sh" target="_blank" rel="noopener noreferrer nofollow ugc">mm.sh</a> (saved in /home/pi)</p>
<p dir="auto">cd ~/MagicMirror<br />
DISPLAY=:0 npm start</p>
]]></description><link>https://forum.magicmirror.builders/post/59346</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/59346</guid><dc:creator><![CDATA[madoXX]]></dc:creator><pubDate>Wed, 24 Jul 2019 15:32:42 GMT</pubDate></item></channel></rss>