<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://etcwiki.org/index.php?action=history&amp;feed=atom&amp;title=Mycroft_Watchdog_Script</id>
	<title>Mycroft Watchdog Script - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://etcwiki.org/index.php?action=history&amp;feed=atom&amp;title=Mycroft_Watchdog_Script"/>
	<link rel="alternate" type="text/html" href="http://etcwiki.org/index.php?title=Mycroft_Watchdog_Script&amp;action=history"/>
	<updated>2026-04-28T23:48:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://etcwiki.org/index.php?title=Mycroft_Watchdog_Script&amp;diff=3933&amp;oldid=prev</id>
		<title>Ddxfish at 17:44, 19 October 2021</title>
		<link rel="alternate" type="text/html" href="http://etcwiki.org/index.php?title=Mycroft_Watchdog_Script&amp;diff=3933&amp;oldid=prev"/>
		<updated>2021-10-19T17:44:02Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:44, 19 October 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l37&quot;&gt;Line 37:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 37:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== External Links ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== External Links ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://gist.github.com/ddxfish/2f9a29aa589c2143cacefa954e767c01 Github mycroft watchdog script ]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://gist.github.com/ddxfish/2f9a29aa589c2143cacefa954e767c01 Github mycroft watchdog script ]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category: Mycroft]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ddxfish</name></author>
	</entry>
	<entry>
		<id>http://etcwiki.org/index.php?title=Mycroft_Watchdog_Script&amp;diff=3931&amp;oldid=prev</id>
		<title>Ddxfish: Created page with &quot;If you run Mycroft in Docker, you may have seen a ton of errors when it tries to connect to the Messagebus. I get &#039;&#039;&#039;Errno 111 Connection Refused&#039;&#039;&#039; on Mycroft a ton. In my si...&quot;</title>
		<link rel="alternate" type="text/html" href="http://etcwiki.org/index.php?title=Mycroft_Watchdog_Script&amp;diff=3931&amp;oldid=prev"/>
		<updated>2021-10-19T17:41:12Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;If you run Mycroft in Docker, you may have seen a ton of errors when it tries to connect to the Messagebus. I get &amp;#039;&amp;#039;&amp;#039;Errno 111 Connection Refused&amp;#039;&amp;#039;&amp;#039; on Mycroft a ton. In my si...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;If you run Mycroft in Docker, you may have seen a ton of errors when it tries to connect to the Messagebus. I get &amp;#039;&amp;#039;&amp;#039;Errno 111 Connection Refused&amp;#039;&amp;#039;&amp;#039; on Mycroft a ton. In my situation, all I needed to do was /opt/mycroft/./stop-mycroft.sh and then /opt/mycroft/./start-mycroft.sh all and things would start working again. If this is your case too, try this watchdog script inside your Mycroft container.&lt;br /&gt;
&lt;br /&gt;
=== Add watchdog.sh to /opt/mycroft/startup.sh ===&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 source /opt/mycroft/.venv/bin/activate&lt;br /&gt;
 /opt/mycroft/./start-mycroft.sh all&lt;br /&gt;
 /opt/mycroft/./watchdog.sh &amp;amp;&lt;br /&gt;
 tail -f /var/log/mycroft/*.log&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== /opt/mycroft/watchdog.sh ===&lt;br /&gt;
 #!/bin/bash‎&lt;br /&gt;
 # If you run mycroft in docker you may get Errno 111: Connection Refused&lt;br /&gt;
 # On my container, a simple ./mycroft-stop and ./mycroft-start all fixes Error 111&lt;br /&gt;
 # This script checks your audio.log for Error 111 and will restart the mycroft service if it occurs&lt;br /&gt;
 # put the script in your container, then edit /opt/mycroft/startup.sh &lt;br /&gt;
 # Add your background watchdog script after mycroft starts in startup.sh, like: /opt/mycroft/./watchdog.sh &amp;amp;&lt;br /&gt;
 while true&lt;br /&gt;
 do&lt;br /&gt;
         thetime=`date +%s`&lt;br /&gt;
         echo watchdogtest $thetime | tee -a /var/log/mycroft/audio.log&lt;br /&gt;
         sleep 20&lt;br /&gt;
         oneelevens=`cat /var/log/mycroft/audio.log | sed -n &amp;quot;/$thetime/,$p&amp;quot; | grep -c &amp;quot;Errno 111&amp;quot;`&lt;br /&gt;
         echo &amp;quot;Watchdog: checking now&amp;quot; | tee -a /var/log/mycroft/audio.log&lt;br /&gt;
         if [[ $oneelevens -gt 0 ]]; then&lt;br /&gt;
                 cd /opt/mycroft&lt;br /&gt;
                 ./mycroft-stop&lt;br /&gt;
                 sleep 10&lt;br /&gt;
                 ./mycroft-start all&lt;br /&gt;
                 echo &amp;quot;Watchdog: mycroft restart attempt finished $oneelevens&amp;quot; | tee -a /var/log/mycroft/audio.log&lt;br /&gt;
         else&lt;br /&gt;
                 echo &amp;quot;Watchdog: mycroft was found without errors $oneelevens&amp;quot; | tee -a /var/log/mycroft/audio.log&lt;br /&gt;
         fi&lt;br /&gt;
         sleep 90&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
=== External Links ===&lt;br /&gt;
* [https://gist.github.com/ddxfish/2f9a29aa589c2143cacefa954e767c01 Github mycroft watchdog script ]&lt;/div&gt;</summary>
		<author><name>Ddxfish</name></author>
	</entry>
</feed>