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. Mastodon
  3. Mastodon can't connect to Redis

Mastodon can't connect to Redis

Scheduled Pinned Locked Moved Solved Mastodon
7 Posts 2 Posters 2.2k Views 2 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.
  • S Offline
    S Offline
    stormgrass
    wrote on last edited by
    #1

    Hello,
    it seems my Mastodon installation is having trouble with its Redis connection.
    Opening up the site I'm greeted by an error message ( "We're sorry, but something went wrong on our end.")
    I checked the log, which immediately fills with this error message:

    ERR! Error: Redis connection to localhost:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
    

    I restarted the whole app, which didn't do anything.
    I also restarted the Mastodon Redis from the Cloudron backend, same result.

    The apphealthmonitor says 17 alive / 3 dead (the two additional dead services seem to be my two LAMP boxes, which for some reason won't restart properly - could be related?)

    Any idea what might be going on?

    Thanks in advance,
    Richard

    girishG 2 Replies Last reply
    0
    • S stormgrass

      Hello,
      it seems my Mastodon installation is having trouble with its Redis connection.
      Opening up the site I'm greeted by an error message ( "We're sorry, but something went wrong on our end.")
      I checked the log, which immediately fills with this error message:

      ERR! Error: Redis connection to localhost:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
      

      I restarted the whole app, which didn't do anything.
      I also restarted the Mastodon Redis from the Cloudron backend, same result.

      The apphealthmonitor says 17 alive / 3 dead (the two additional dead services seem to be my two LAMP boxes, which for some reason won't restart properly - could be related?)

      Any idea what might be going on?

      Thanks in advance,
      Richard

      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2

      @stormgrass said in Mastodon can't connect to Redis:

      the two additional dead services seem to be my two LAMP boxes

      This might be https://forum.cloudron.io/topic/6612/lamp-unbound-variable-mysql

      S 1 Reply Last reply
      0
      • girishG girish moved this topic from Support on
      • S stormgrass

        Hello,
        it seems my Mastodon installation is having trouble with its Redis connection.
        Opening up the site I'm greeted by an error message ( "We're sorry, but something went wrong on our end.")
        I checked the log, which immediately fills with this error message:

        ERR! Error: Redis connection to localhost:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
        

        I restarted the whole app, which didn't do anything.
        I also restarted the Mastodon Redis from the Cloudron backend, same result.

        The apphealthmonitor says 17 alive / 3 dead (the two additional dead services seem to be my two LAMP boxes, which for some reason won't restart properly - could be related?)

        Any idea what might be going on?

        Thanks in advance,
        Richard

        girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #3

        @stormgrass About mastodon, can you confirm you are on Cloudron 7.1 and also on Mastodon package v1.7.5 ?

        After that, can you check the contents of /app/data/env.production ? It should have something like:

        # Service dependencies
        REDIS_HOST=redis-7da0beb3-999b-434e-b5cf-f54527387a2a
        REDIS_PORT=6379
        REDIS_PASSWORD=8cca7ae6eee15ef77b298a8269b8d83087e6a5e8fc4a0d41
        

        Important thing is that there should no "space" between the variables names and values. Otherwise, the startup script is not very smart in patching them.

        The above values should match the values in Web Terminal:

        root@7da0beb3-999b-434e-b5cf-f54527387a2a:/app/code# env | grep REDIS
        CLOUDRON_REDIS_HOST=redis-7da0beb3-999b-434e-b5cf-f54527387a2a
        CLOUDRON_REDIS_URL=redis://redisuser:8cca7ae6eee15ef77b298a8269b8d83087e6a5e8fc4a0d41@redis-7da0beb3-999b-434e-b5cf-f54527387a2a
        CLOUDRON_REDIS_PASSWORD=8cca7ae6eee15ef77b298a8269b8d83087e6a5e8fc4a0d41
        CLOUDRON_REDIS_PORT=6379
        
        S 1 Reply Last reply
        0
        • girishG girish

          @stormgrass said in Mastodon can't connect to Redis:

          the two additional dead services seem to be my two LAMP boxes

          This might be https://forum.cloudron.io/topic/6612/lamp-unbound-variable-mysql

          S Offline
          S Offline
          stormgrass
          wrote on last edited by
          #4

          @girish Thank you! It was, the solution in your linked thread fixed it.

          1 Reply Last reply
          0
          • nebulonN nebulon marked this topic as a question on
          • nebulonN nebulon has marked this topic as solved on
          • girishG girish

            @stormgrass About mastodon, can you confirm you are on Cloudron 7.1 and also on Mastodon package v1.7.5 ?

            After that, can you check the contents of /app/data/env.production ? It should have something like:

            # Service dependencies
            REDIS_HOST=redis-7da0beb3-999b-434e-b5cf-f54527387a2a
            REDIS_PORT=6379
            REDIS_PASSWORD=8cca7ae6eee15ef77b298a8269b8d83087e6a5e8fc4a0d41
            

            Important thing is that there should no "space" between the variables names and values. Otherwise, the startup script is not very smart in patching them.

            The above values should match the values in Web Terminal:

            root@7da0beb3-999b-434e-b5cf-f54527387a2a:/app/code# env | grep REDIS
            CLOUDRON_REDIS_HOST=redis-7da0beb3-999b-434e-b5cf-f54527387a2a
            CLOUDRON_REDIS_URL=redis://redisuser:8cca7ae6eee15ef77b298a8269b8d83087e6a5e8fc4a0d41@redis-7da0beb3-999b-434e-b5cf-f54527387a2a
            CLOUDRON_REDIS_PASSWORD=8cca7ae6eee15ef77b298a8269b8d83087e6a5e8fc4a0d41
            CLOUDRON_REDIS_PORT=6379
            
            S Offline
            S Offline
            stormgrass
            wrote on last edited by stormgrass
            #5

            @girish I checked .env.production, but it doesn't have the Service Dependencies as posted by you. I do, however, get the kind of result you posted when querying env for REDIS.

            My Cloudron is version 7.1.4, my Mastodon package is version 2.8.4, though (weirdly, the last update was "years ago").

            EDIT: I DO have the service dependencies lines in .env.production, but not grouped in that order, under that heading, and the REDIS_PASSWORD variable has no value.

            EDIT2: Just noticed that apparently my package is really outdated, as the current one when installing it from scratch is 3.4.6. Which is weird, because I've always had it set to automatically update, and when manually trying to update, there doesn't seem to be a newer package. Is there a way to update my current install to the latest version without completely wiping it?

            girishG 1 Reply Last reply
            0
            • S stormgrass

              @girish I checked .env.production, but it doesn't have the Service Dependencies as posted by you. I do, however, get the kind of result you posted when querying env for REDIS.

              My Cloudron is version 7.1.4, my Mastodon package is version 2.8.4, though (weirdly, the last update was "years ago").

              EDIT: I DO have the service dependencies lines in .env.production, but not grouped in that order, under that heading, and the REDIS_PASSWORD variable has no value.

              EDIT2: Just noticed that apparently my package is really outdated, as the current one when installing it from scratch is 3.4.6. Which is weird, because I've always had it set to automatically update, and when manually trying to update, there doesn't seem to be a newer package. Is there a way to update my current install to the latest version without completely wiping it?

              girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #6

              @stormgrass ah, maybe you installed this long ago as a custom package or something ?

              If you have the CLI tool installed, you can try something like this:

              cloudron update --app <domain> --appstore-id org.joinmastodon.cloudronapp
              

              This will make it an "appstore" app instead of a custom app and get updates moving forward .Hopefully, all the database migrations work depending on how outdated your installation is.

              S 1 Reply Last reply
              1
              • girishG girish has marked this topic as unsolved on
              • girishG girish

                @stormgrass ah, maybe you installed this long ago as a custom package or something ?

                If you have the CLI tool installed, you can try something like this:

                cloudron update --app <domain> --appstore-id org.joinmastodon.cloudronapp
                

                This will make it an "appstore" app instead of a custom app and get updates moving forward .Hopefully, all the database migrations work depending on how outdated your installation is.

                S Offline
                S Offline
                stormgrass
                wrote on last edited by
                #7

                @girish Thank you, that did the trick! Not entirely sure how and why my install looked the way it did. I think I installed it first thing once it showed up in the app store, but back then it was still marked as unstable. Anyway, it's all good now, thank you!

                1 Reply Last reply
                2
                • nebulonN nebulon has marked this topic as solved on
                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