Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Pixelfed
  3. sudo -u www-data php artisan optimize Throws an error

sudo -u www-data php artisan optimize Throws an error

Scheduled Pinned Locked Moved Solved Pixelfed
9 Posts 4 Posters 1.3k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • luckowL Offline
    luckowL Offline
    luckow
    translator
    wrote on last edited by luckow
    #1

    Taken from here https://docs.cloudron.io/apps/pixelfed/#admin-panel
    the third command throws the following error:

    [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->onConnectionError()
    #1 /app/code/vendor/predis/predis/src/Connection/StreamConnection.php(154): Predis\\Connection\\StreamConnection->createStreamSocket()
    #2 /app/code/vendor/predis/predis/src/Connection/StreamConnection.php(80): Predis\\Connection\\StreamConnection->tcpStreamInitializer()
    #3 /app/code/vendor/predis/predis/src/Connection/AbstractConnection.php(85): Predis\\Connection\\StreamConnection->createResource()
    #4 /app/code/vendor/predis/predis/src/Connection/StreamConnection.php(230): Predis\\Connection\\AbstractConnection->connect()
    #5 /app/code/vendor/predis/predis/src/Connection/AbstractConnection.php(169): Predis\\Connection\\StreamConnection->connect()
    #6 /app/code/vendor/predis/predis/src/Connection/StreamConnection.php(265): Predis\\Connection\\AbstractConnection->getResource()
    #7 /app/code/vendor/predis/predis/src/Connection/StreamConnection.php(372): Predis\\Connection\\StreamConnection->write()
    #8 /app/code/vendor/predis/predis/src/Connection/AbstractConnection.php(122): Predis\\Connection\\StreamConnection->writeRequest()
    #9 /app/code/vendor/predis/predis/src/Client.php(381): Predis\\Connection\\AbstractConnection->executeCommand()
    #10 /app/code/vendor/predis/predis/src/Client.php(335): Predis\\Client->executeCommand()
    #11 /app/code/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php(116): Predis\\Client->__call()
    #12 /app/code/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php(229): Illuminate\\Redis\\Connections\\Connection->command()
    #13 /app/code/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php(65): Illuminate\\Redis\\Connections\\Connection->__call()
    #14 /app/code/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(98): Illuminate\\Cache\\RedisStore->get()
    #15 /app/code/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(387): Illuminate\\Cache\\Repository->get()
    #16 /app/code/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php(429): Illuminate\\Cache\\Repository->remember()
    #17 /app/code/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(355): Illuminate\\Cache\\CacheManager->__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->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->call()
    #27 /app/code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1011): Illuminate\\Foundation\\Application->bootProvider()
    #28 [internal function]: Illuminate\\Foundation\\Application->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->boot()
    #31 /app/code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(263): Illuminate\\Foundation\\Bootstrap\\BootProviders->bootstrap()
    #32 /app/code/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(447): Illuminate\\Foundation\\Application->bootstrapWith()
    #33 /app/code/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(199): Illuminate\\Foundation\\Console\\Kernel->bootstrap()
    #34 /app/code/artisan(35): Illuminate\\Foundation\\Console\\Kernel->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->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
    

    Pronouns: he/him | Primary language: German

    1 Reply Last reply
    0
    • iahonta1964I Offline
      iahonta1964I Offline
      iahonta1964
      wrote on last edited by
      #2

      In Web Terminal, you do not need to type sudo -u www-data.

      php artisan optimize
      

      PGP fingerprint: D2AE FA2F AC7C A908 83C1 97A7 3122 09A3 BF47 C56F.

      luckowL 1 Reply Last reply
      3
      • iahonta1964I iahonta1964

        In Web Terminal, you do not need to type sudo -u www-data.

        php artisan optimize
        
        luckowL Offline
        luckowL Offline
        luckow
        translator
        wrote on last edited by
        #3

        @iahonta1964 interesting. without

        sudo -u www-data
        

        everything works fine.

        cc @staff this is an update candidate for the docs.

        Pronouns: he/him | Primary language: German

        1 Reply Last reply
        3
        • luckowL luckow marked this topic as a question on
        • luckowL luckow has marked this topic as solved on
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #4

          @luckow it's already like that in the docs 🤔

          image.png

          luckowL 1 Reply Last reply
          0
          • girishG girish

            @luckow it's already like that in the docs 🤔

            image.png

            luckowL Offline
            luckowL Offline
            luckow
            translator
            wrote on last edited by
            #5

            @girish yes. but see #1 with sudo -u www-data
            the third command throws an error and without does not.

            Pronouns: he/him | Primary language: German

            1 Reply Last reply
            0
            • luckowL Offline
              luckowL Offline
              luckow
              translator
              wrote on last edited by
              #6

              Same behaviour when reinstalling the app on demo.cloudron.io

              Pronouns: he/him | Primary language: German

              1 Reply Last reply
              0
              • nebulonN Offline
                nebulonN Offline
                nebulon
                Staff
                wrote on last edited by
                #7

                ah I think the docs miss the -E flag:

                sudo -E -u www-data php artisan cache:clear
                
                luckowL 1 Reply Last reply
                2
                • nebulonN nebulon

                  ah I think the docs miss the -E flag:

                  sudo -E -u www-data php artisan cache:clear
                  
                  luckowL Offline
                  luckowL Offline
                  luckow
                  translator
                  wrote on last edited by luckow
                  #8

                  @nebulon said in sudo -u www-data php artisan optimize Throws an error:

                  sudo -E -u www-data php artisan cache:clear

                  sudo -E -u www-data php artisan optimize

                  Top. That works.

                  10504e3b-dff0-4e64-826d-41c001e9241a-image.png

                  Pronouns: he/him | Primary language: German

                  1 Reply Last reply
                  2
                  • nebulonN Offline
                    nebulonN Offline
                    nebulon
                    Staff
                    wrote on last edited by
                    #9

                    I've fixed up the docs now https://docs.cloudron.io/apps/pixelfed/

                    1 Reply Last reply
                    4
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Bookmarks
                    • Search