Nextcloud Redis errors

I’ve installed Nextcloud from BigBear, but was having lot of Redis errors.

On Nextcloud log we can see:

Erro	core	
RedisException Redis server went away
Exception thrown: RedisException
"2 de jul. de 2024, 22:16:56"	
Erro	core	
RedisException Redis server went away
Exception thrown: RedisException
"2 de jul. de 2024, 22:16:56"	
Erro	index	
RedisException Redis server went away
"2 de jul. de 2024, 22:16:56"	
Erro	PHP	
session_start(): Failed to read session data: redis (path: tcp://redis-nextcloud:6379) at /var/www/html/lib/private/Session/Internal.php#213
"2 de jul. de 2024, 22:16:56"	
Erro	PHP	
session_start(): Redis connection not available at /var/www/html/lib/private/Session/Internal.php#213
"2 de jul. de 2024, 22:16:56"	
Erro	PHP	
session_start(): php_network_getaddresses: getaddrinfo for redis-nextcloud failed: No address associated with hostname at /var/www/html/lib/private/Session/Internal.php#213
"2 de jul. de 2024, 22:16:56"	
Fatal	no app in context	
RedisException php_network_getaddresses: getaddrinfo for redis-nextcloud failed: No address associated with hostname
Could not boot workflowengine: php_network_getaddresses: getaddrinfo for redis-nextcloud failed: No address associated with hostname
"2 de jul. de 2024, 22:16:56"	
Erro	PHP	
Redis::pconnect(): php_network_getaddresses: getaddrinfo for redis-nextcloud failed: No address associated with hostname at /var/www/html/lib/private/RedisFactory.php#117
"2 de jul. de 2024, 22:16:56"	
Erro	PHP	
session_start(): Failed to read session data: redis (path: tcp://redis-nextcloud:6379) at /var/www/html/lib/private/Session/Internal.php#213
"2 de jul. de 2024, 22:16:56"	
Erro	PHP	
session_start(): Redis connection not available at /var/www/html/lib/private/Session/Internal.php#213
"2 de jul. de 2024, 22:16:56"	
Erro	PHP	
session_start(): php_network_getaddresses: getaddrinfo for redis-nextcloud failed: No address associated with hostname at /var/www/html/lib/private/Session/Internal.php#213
"2 de jul. de 2024, 22:16:56"	
Erro	PHP	
session_start(): Failed to read session data: redis (path: tcp://redis-nextcloud:6379) at /var/www/html/lib/private/Session/Internal.php#213
"2 de jul. de 2024, 22:16:56"	
Erro	PHP	
session_start(): Redis connection not available at /var/www/html/lib/private/Session/Internal.php#213
"2 de jul. de 2024, 22:16:56"	
Erro	PHP	
session_start(): php_network_getaddresses: getaddrinfo for redis-nextcloud failed: No address associated with hostname at /var/www/html/lib/private/Session/Internal.php#213
"2 de jul. de 2024, 22:16:56"	
Erro	core	
Exception Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] could not translate host name "db-nextcloud" to address: No address associated with hostname
Exception thrown: Doctrine\DBAL\Exception
"2 de jul. de 2024, 21:38:51"	
Erro	core	
Exception Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] could not translate host name "db-nextcloud" to address: No address associated with hostname
Exception thrown: Doctrine\DBAL\Exception
"2 de jul. de 2024, 21:38:51"	
Erro	index	
Exception Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] could not translate host name "db-nextcloud" to address: No address associated with hostname
"2 de jul. de 2024, 21:38:51"	
Erro	core	
RedisException Redis server went away
Exception thrown: RedisException
"2 de jul. de 2024, 19:41:16"	
Erro	core	
RedisException Redis server went away
Exception thrown: RedisException
"2 de jul. de 2024, 19:41:16"	
Erro	index	
RedisException Redis server went away
"2 de jul. de 2024, 19:41:16"	
Erro	PHP	
session_start(): Failed to read session data: redis (path: tcp://redis-nextcloud:6379) at /var/www/html/lib/private/Session/Internal.php#213
"2 de jul. de 2024, 19:41:16"	
Erro	PHP	
session_start(): Redis connection not available at /var/www/html/lib/private/Session/Internal.php#213
"2 de jul. de 2024, 19:41:16"	
Erro	PHP	
session_start(): php_network_getaddresses: getaddrinfo for redis-nextcloud failed: No address associated with hostname at /var/www/html/lib/private/Session/Internal.php#213
"2 de jul. de 2024, 19:41:16"

(continues...)

On my journey to try to fix the issue, on CasaOS I went to the App Settings, selected the “redis-nextcloud” container and on the network field that was empty, I’ve selected “big-bear-chrome_default”.
Now I cannot unselect it to make the field empty as before and I can’t turn on Nextcloud as it gives an error “Installing big-bear-nextcloudErrorInfo”.

Anyone knows how can I fix this? @dragonfire1119 can you help? Thank you.

Did you remove the network or change it?

I’ve selected one option through the UI.
Screenshot 2024-07-03 at 02.00.09
Now I can change to a different option, but I cannot remove the network as it was by default. :frowning:

The network should be the next cloud network, like on Github, not big-bear-chrome; that’s your issue. You can edit your raw Docker Compose with:

# Network definition for the big-bear-nextcloud application
networks:
  nextcloud_network:
    driver: bridge

In each service it should be:

networks:
      - nextcloud_network

Sorry the dumb question @dragonfire1119 , but how can I edit the raw Docker Compose without uninstalling the current instance? Or can I uninstall and reinstall without losing the contents?

On the options I’ve available on “Network” field there isn’t “nextcloud_network”:

If I select “big-bear-nextcloud_nextcloud_network” I get the following error:

Also, the other services always had the “Network” field empty:
cron:
Screenshot 2024-07-03 at 12.52.58

db_nextcloud
Screenshot 2024-07-03 at 12.53.16

nextcloud
Screenshot 2024-07-03 at 12.53.29

Did you try the script?

I just tried the script. Followed the how to video, and simply changed the network on the “redis-nextcloud” service to “null” and saved.
It seemed to be a super great way of doing these changes.

Unfortunately, the result was having 4 different services asking to be rebuilt, and cannot use any of them.

@dragonfire1119 do you think there is any way to fix this?

The networks in each service should be:

- nextcloud_network

DIdn’t work. Everything continue same way.
I just lost all the configs I already had done. Installed again from the store, had the same issue with redis and tried again the script as per default network is null for everything.
Same result: once I save the script, get the same issue with 4 different services.

I’ve not had that happen. What version of CasaOS are you on? Also what did you change in the docker compose files?

Latest version - v0.4.9
The only changes on the docker compose file were the ones you said - simply changed the networks from the services to nextcloud_network.

I just tried it and this is mine:

name: big-bear-nextcloud
services:
    cron:
        depends_on:
            db-nextcloud:
                condition: service_healthy
                required: true
            redis-nextcloud:
                condition: service_healthy
                required: true
        entrypoint:
            - /cron.sh
        image: nextcloud:29.0.1-apache
        labels:
            icon: https://github.com/walkxcode/dashboard-icons/blob/main/png/nextcloud.png?raw=true
        networks:
            nextcloud_network: null
        restart: on-failure
        volumes:
            - type: bind
              source: /DATA/AppData/$AppID/html
              target: /var/www/html
              bind:
                create_host_path: true
        x-casaos:
            volumes:
                - container: /var/www/html
                  description:
                    en_us: 'Container Path: /var/www/html'
    db-nextcloud:
        container_name: db-nextcloud
        environment:
            POSTGRES_DB: nextcloud
            POSTGRES_PASSWORD: casaos
            POSTGRES_USER: casaos
        healthcheck:
            test:
                - CMD-SHELL
                - pg_isready -U casaos -d nextcloud
            timeout: 5s
            interval: 10s
            retries: 5
        image: postgres:14.2
        labels:
            icon: https://github.com/walkxcode/dashboard-icons/blob/main/png/nextcloud.png?raw=true
        networks:
            nextcloud_network: null
        restart: unless-stopped
        volumes:
            - type: bind
              source: /DATA/AppData/$AppID/pgdata
              target: /var/lib/postgresql/data
              bind:
                create_host_path: true
        x-casaos:
            envs:
                - container: POSTGRES_PASSWORD
                  description:
                    en_us: Database password
                - container: POSTGRES_USER
                  description:
                    en_us: Database user
                - container: POSTGRES_DB
                  description:
                    en_us: Database type
            volumes:
                - container: /var/lib/postgresql/data
                  description:
                    en_us: 'Container Path: /var/lib/postgresql/data'
    nextcloud:
        container_name: nextcloud
        depends_on:
            db-nextcloud:
                condition: service_healthy
                required: true
            redis-nextcloud:
                condition: service_healthy
                required: true
        environment:
            NEXTCLOUD_ADMIN_PASSWORD: casaos
            NEXTCLOUD_ADMIN_USER: casaos
            OVERWRITEPROTOCOL: http
            PHP_UPLOAD_LIMIT: 1024G
            POSTGRES_DB: nextcloud
            POSTGRES_HOST: db-nextcloud
            POSTGRES_PASSWORD: casaos
            POSTGRES_USER: casaos
            REDIS_HOST: redis-nextcloud
            TRUSTED_PROXIES: ""
        image: nextcloud:29.0.1-apache
        labels:
            icon: https://github.com/walkxcode/dashboard-icons/blob/main/png/nextcloud.png?raw=true
        networks:
            nextcloud_network: null
        ports:
            - mode: ingress
              target: 80
              published: "7580"
              protocol: tcp
        restart: unless-stopped
        volumes:
            - type: bind
              source: /DATA/AppData/$AppID/html
              target: /var/www/html
              bind:
                create_host_path: true
        x-casaos:
            envs:
                - container: POSTGRES_HOST
                  description:
                    en_us: Database host
                - container: REDIS_HOST
                  description:
                    en_us: Redis host
                - container: POSTGRES_PASSWORD
                  description:
                    en_us: Database password
                - container: POSTGRES_USER
                  description:
                    en_us: Database user
                - container: POSTGRES_DB
                  description:
                    en_us: Database type
                - container: NEXTCLOUD_ADMIN_USER
                  description:
                    en_us: Nextcloud admin user
                - container: NEXTCLOUD_ADMIN_PASSWORD
                  description:
                    en_us: Nextcloud admin password
                - container: TRUSTED_PROXIES
                  description:
                    en_us: Trusted proxies
                - container: OVERWRITEPROTOCOL
                  description:
                    en_us: Overwrite protocol
                - container: PHP_UPLOAD_LIMIT
                  description:
                    en_us: PHP upload limit
            ports:
                - container: "7580"
                  description:
                    en_us: 'Container Port: 7580'
            volumes:
                - container: /var/www/html
                  description:
                    en_us: 'Container Path: /var/www/html'
    redis-nextcloud:
        container_name: redis-nextcloud
        healthcheck:
            test:
                - CMD-SHELL
                - redis-cli ping || exit 1
            timeout: 5s
            interval: 10s
            retries: 5
        image: redis:6.2.6
        labels:
            icon: https://github.com/walkxcode/dashboard-icons/blob/main/png/nextcloud.png?raw=true
        networks:
            nextcloud_network: null
        restart: on-failure
        user: 1000:1000
        volumes:
            - type: bind
              source: /DATA/AppData/$AppID/redis
              target: /data
              bind:
                create_host_path: true
        x-casaos:
            ports:
                - container: "6379"
                  description:
                    en_us: 'Container Port: 6379'
            volumes:
                - container: /data
                  description:
                    en_us: 'Container Path: /data'
networks:
    default:
        name: big-bear-nextcloud_default
    nextcloud_network:
        name: big-bear-nextcloud_nextcloud_network
        driver: bridge
x-casaos:
    architectures:
        - amd64
        - arm64
    author: BigBearTechWorld
    category: BigBearCasaOS
    description:
        en_us: Nextcloud puts your data at your fingertips, under your control. Store your documents, calendar, contacts and photos on a server at home, at one of our providers or in a data center you trust.
    developer: nextcloud
    icon: https://github.com/walkxcode/dashboard-icons/blob/main/png/nextcloud.png?raw=true
    is_uncontrolled: false
    main: nextcloud
    port_map: "7580"
    screenshot_link:
        - https://cdn.jsdelivr.net/gh/IceWhaleTech/CasaOS-AppStore@main/Apps/Nextcloud/screenshot-1.png
        - https://cdn.jsdelivr.net/gh/IceWhaleTech/CasaOS-AppStore@main/Apps/Nextcloud/screenshot-2.png
        - https://cdn.jsdelivr.net/gh/IceWhaleTech/CasaOS-AppStore@main/Apps/Nextcloud/screenshot-3.png
    store_app_id: big-bear-nextcloud
    tagline:
        en_us: The productivity platform that keeps you in control
    thumbnail: https://cdn.jsdelivr.net/gh/IceWhaleTech/CasaOS-AppStore@main/Apps/Nextcloud/thumbnail.jpg
    tips:
        before_install:
            en_us: |
                Read the [Nextcloud installation guide](https://community.bigbeartechworld.com/t/added-nextcloud-to-bigbearcasaos/455?u=dragonfire1119)
    title:
        en_us: Nextcloud

So your networks is “null” in every service, not “nextcloud_network” as advised.

My initial request was exactly to make “redis-nextcloud” container with “null”.
Once I used the script everything messed up. Can it Nano saving it on a wrong way?

This is the way CasaOS formatted it (Sorry I got distracted with work and answering questions.) I was looking in github. It’s different at BigBearCasaOS. You can try to uninstall, but don’t delete user data on uninstall.

Uncheck mark the delete data. You can also backup the AppData before doing so.

I use Nano so should not be a issue.

You can also copy and paste it in there, and it should work, but the best way would be to reinstall the container without deleting your data. /DATA/AppData holds all the data for containers unless changed.

Tried that. I’m not being able to reinstall.
I deleted all the services related to Nextcloud without deleting the AppData, but it isn’t allowing me to reinstall.

Can you hover over for the full error?

Also, you can install Dozzle and turn it on in the settings for stopped containers.

This would give you more info on what’s happening.