<?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[sudo -u www-data php artisan optimize Throws an error]]></title><description><![CDATA[<p dir="auto">Taken from here <a href="https://docs.cloudron.io/apps/pixelfed/#admin-panel" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.cloudron.io/apps/pixelfed/#admin-panel</a><br />
the third command throws the following error:</p>
<pre><code>[2024-05-15 13:17:09] production.ERROR: php_network_getaddresses: getaddrinfo for ${CLOUDRON_REDIS_HOST} failed: Name or service not known [tcp://${CLOUDRON_REDIS_HOST}:${CLOUDRON_REDIS_PORT}] {"exception":"[object] (Predis\\Connection\\ConnectionException(code: 0): php_network_getaddresses: getaddrinfo for ${CLOUDRON_REDIS_HOST} failed: Name or service not known [tcp://${CLOUDRON_REDIS_HOST}:${CLOUDRON_REDIS_PORT}] at /app/code/vendor/predis/predis/src/Connection/AbstractConnection.php:144)
[stacktrace]
#0 /app/code/vendor/predis/predis/src/Connection/StreamConnection.php(109): Predis\\Connection\\AbstractConnection-&gt;onConnectionError()
#1 /app/code/vendor/predis/predis/src/Connection/StreamConnection.php(154): Predis\\Connection\\StreamConnection-&gt;createStreamSocket()
#2 /app/code/vendor/predis/predis/src/Connection/StreamConnection.php(80): Predis\\Connection\\StreamConnection-&gt;tcpStreamInitializer()
#3 /app/code/vendor/predis/predis/src/Connection/AbstractConnection.php(85): Predis\\Connection\\StreamConnection-&gt;createResource()
#4 /app/code/vendor/predis/predis/src/Connection/StreamConnection.php(230): Predis\\Connection\\AbstractConnection-&gt;connect()
#5 /app/code/vendor/predis/predis/src/Connection/AbstractConnection.php(169): Predis\\Connection\\StreamConnection-&gt;connect()
#6 /app/code/vendor/predis/predis/src/Connection/StreamConnection.php(265): Predis\\Connection\\AbstractConnection-&gt;getResource()
#7 /app/code/vendor/predis/predis/src/Connection/StreamConnection.php(372): Predis\\Connection\\StreamConnection-&gt;write()
#8 /app/code/vendor/predis/predis/src/Connection/AbstractConnection.php(122): Predis\\Connection\\StreamConnection-&gt;writeRequest()
#9 /app/code/vendor/predis/predis/src/Client.php(381): Predis\\Connection\\AbstractConnection-&gt;executeCommand()
#10 /app/code/vendor/predis/predis/src/Client.php(335): Predis\\Client-&gt;executeCommand()
#11 /app/code/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php(116): Predis\\Client-&gt;__call()
#12 /app/code/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php(229): Illuminate\\Redis\\Connections\\Connection-&gt;command()
#13 /app/code/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php(65): Illuminate\\Redis\\Connections\\Connection-&gt;__call()
#14 /app/code/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(98): Illuminate\\Cache\\RedisStore-&gt;get()
#15 /app/code/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(387): Illuminate\\Cache\\Repository-&gt;get()
#16 /app/code/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php(429): Illuminate\\Cache\\Repository-&gt;remember()
#17 /app/code/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(355): Illuminate\\Cache\\CacheManager-&gt;__call()
#18 /app/code/app/Services/ConfigCacheService.php(28): Illuminate\\Support\\Facades\\Facade::__callStatic()
#19 /app/code/app/helpers.php(7): App\\Services\\ConfigCacheService::get()
#20 /app/code/app/Providers/AuthServiceProvider.php(27): config_cache()
#21 /app/code/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Providers\\AuthServiceProvider-&gt;boot()
#22 /app/code/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#23 /app/code/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#24 /app/code/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()
#25 /app/code/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call()
#26 /app/code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1030): Illuminate\\Container\\Container-&gt;call()
#27 /app/code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1011): Illuminate\\Foundation\\Application-&gt;bootProvider()
#28 [internal function]: Illuminate\\Foundation\\Application-&gt;Illuminate\\Foundation\\{closure}()
#29 /app/code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1010): array_walk()
#30 /app/code/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\\Foundation\\Application-&gt;boot()
#31 /app/code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(263): Illuminate\\Foundation\\Bootstrap\\BootProviders-&gt;bootstrap()
#32 /app/code/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(447): Illuminate\\Foundation\\Application-&gt;bootstrapWith()
#33 /app/code/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(199): Illuminate\\Foundation\\Console\\Kernel-&gt;bootstrap()
#34 /app/code/artisan(35): Illuminate\\Foundation\\Console\\Kernel-&gt;handle()
#35 {main}
"} 

   Predis\Connection\ConnectionException 

  php_network_getaddresses: getaddrinfo for ${CLOUDRON_REDIS_HOST} failed: Name or service not known [tcp://${CLOUDRON_REDIS_HOST}:${CLOUDRON_REDIS_PORT}]

  at vendor/predis/predis/src/Connection/AbstractConnection.php:144
    140▕      */
    141▕     protected function onConnectionError($message, $code = 0)
    142▕     {
    143▕         CommunicationException::handle(
  ➜ 144▕             new ConnectionException($this, "$message [{$this-&gt;getParameters()}]", $code)
    145▕         );
    146▕     }
    147▕ 
    148▕     /**

      +18 vendor frames 
  19  app/Services/ConfigCacheService.php:28
      Illuminate\Support\Facades\Facade::__callStatic()

  20  app/helpers.php:7
</code></pre>
]]></description><link>https://forum.cloudron.io/topic/11739/sudo-u-www-data-php-artisan-optimize-throws-an-error</link><generator>RSS for Node</generator><lastBuildDate>Wed, 19 Aug 2026 04:56:59 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/11739.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 15 May 2024 13:19:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to sudo -u www-data php artisan optimize Throws an error on Wed, 15 May 2024 16:14:26 GMT]]></title><description><![CDATA[<p dir="auto">In Web Terminal, you do not need to type <strong>sudo -u www-data</strong>.</p>
<pre><code>php artisan optimize
</code></pre>
]]></description><link>https://forum.cloudron.io/post/88527</link><guid isPermaLink="true">https://forum.cloudron.io/post/88527</guid><dc:creator><![CDATA[iahonta1964]]></dc:creator><pubDate>Wed, 15 May 2024 16:14:26 GMT</pubDate></item><item><title><![CDATA[Reply to sudo -u www-data php artisan optimize Throws an error on Thu, 16 May 2024 11:28:39 GMT]]></title><description><![CDATA[<p dir="auto">I've fixed up the docs now <a href="https://docs.cloudron.io/apps/pixelfed/" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.cloudron.io/apps/pixelfed/</a></p>
]]></description><link>https://forum.cloudron.io/post/88573</link><guid isPermaLink="true">https://forum.cloudron.io/post/88573</guid><dc:creator><![CDATA[nebulon]]></dc:creator><pubDate>Thu, 16 May 2024 11:28:39 GMT</pubDate></item><item><title><![CDATA[Reply to sudo -u www-data php artisan optimize Throws an error on Thu, 16 May 2024 10:36:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nebulon" aria-label="Profile: nebulon">@<bdi>nebulon</bdi></a> said in <a href="/post/88568">sudo -u www-data php artisan optimize Throws an error</a>:</p>
<blockquote>
<p dir="auto">sudo -E -u www-data php artisan cache:clear</p>
</blockquote>
<p dir="auto"><code>sudo -E -u www-data php artisan optimize</code></p>
<p dir="auto">Top. That works.</p>
<p dir="auto"><img src="/assets/uploads/files/1715855744266-10504e3b-dff0-4e64-826d-41c001e9241a-image-resized.png" alt="10504e3b-dff0-4e64-826d-41c001e9241a-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.cloudron.io/post/88569</link><guid isPermaLink="true">https://forum.cloudron.io/post/88569</guid><dc:creator><![CDATA[luckow]]></dc:creator><pubDate>Thu, 16 May 2024 10:36:36 GMT</pubDate></item><item><title><![CDATA[Reply to sudo -u www-data php artisan optimize Throws an error on Thu, 16 May 2024 10:31:29 GMT]]></title><description><![CDATA[<p dir="auto">ah I think the docs miss the <code>-E</code> flag:</p>
<pre><code>sudo -E -u www-data php artisan cache:clear
</code></pre>
]]></description><link>https://forum.cloudron.io/post/88568</link><guid isPermaLink="true">https://forum.cloudron.io/post/88568</guid><dc:creator><![CDATA[nebulon]]></dc:creator><pubDate>Thu, 16 May 2024 10:31:29 GMT</pubDate></item><item><title><![CDATA[Reply to sudo -u www-data php artisan optimize Throws an error on Wed, 15 May 2024 16:53:16 GMT]]></title><description><![CDATA[<p dir="auto">Same behaviour when reinstalling the app on <a href="http://demo.cloudron.io" target="_blank" rel="noopener noreferrer nofollow ugc">demo.cloudron.io</a></p>
]]></description><link>https://forum.cloudron.io/post/88531</link><guid isPermaLink="true">https://forum.cloudron.io/post/88531</guid><dc:creator><![CDATA[luckow]]></dc:creator><pubDate>Wed, 15 May 2024 16:53:16 GMT</pubDate></item><item><title><![CDATA[Reply to sudo -u www-data php artisan optimize Throws an error on Wed, 15 May 2024 16:47:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> yes. but see #1 with <code>sudo -u www-data</code><br />
the third command throws an error and without does not.</p>
]]></description><link>https://forum.cloudron.io/post/88530</link><guid isPermaLink="true">https://forum.cloudron.io/post/88530</guid><dc:creator><![CDATA[luckow]]></dc:creator><pubDate>Wed, 15 May 2024 16:47:30 GMT</pubDate></item><item><title><![CDATA[Reply to sudo -u www-data php artisan optimize Throws an error on Wed, 15 May 2024 16:46:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/luckow" aria-label="Profile: luckow">@<bdi>luckow</bdi></a> it's already like that in the docs <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f914.png?v=090c346130c" class="not-responsive emoji emoji-android emoji--thinking_face" style="height:23px;width:auto;vertical-align:middle" title=":thinking_face:" alt="🤔" /></p>
<p dir="auto"><img src="/assets/uploads/files/1715791555528-0e45ab18-905e-49c3-90aa-f9c450664510-image-resized.png" alt="image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.cloudron.io/post/88529</link><guid isPermaLink="true">https://forum.cloudron.io/post/88529</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Wed, 15 May 2024 16:46:04 GMT</pubDate></item><item><title><![CDATA[Reply to sudo -u www-data php artisan optimize Throws an error on Wed, 15 May 2024 16:38:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/iahonta1964" aria-label="Profile: iahonta1964">@<bdi>iahonta1964</bdi></a> interesting. without</p>
<pre><code>sudo -u www-data
</code></pre>
<p dir="auto">everything works fine.</p>
<p dir="auto">cc <a class="plugin-mentions-group plugin-mentions-a" href="/groups/staff" aria-label="Profile: staff">@<bdi>staff</bdi></a> this is an update candidate for the docs.</p>
]]></description><link>https://forum.cloudron.io/post/88528</link><guid isPermaLink="true">https://forum.cloudron.io/post/88528</guid><dc:creator><![CDATA[luckow]]></dc:creator><pubDate>Wed, 15 May 2024 16:38:44 GMT</pubDate></item><item><title><![CDATA[Reply to sudo -u www-data php artisan optimize Throws an error on Wed, 15 May 2024 16:14:26 GMT]]></title><description><![CDATA[<p dir="auto">In Web Terminal, you do not need to type <strong>sudo -u www-data</strong>.</p>
<pre><code>php artisan optimize
</code></pre>
]]></description><link>https://forum.cloudron.io/post/88527</link><guid isPermaLink="true">https://forum.cloudron.io/post/88527</guid><dc:creator><![CDATA[iahonta1964]]></dc:creator><pubDate>Wed, 15 May 2024 16:14:26 GMT</pubDate></item></channel></rss>