Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trusted domiains issue after image switching #2146

Closed
lukaszzyla opened this issue Jan 13, 2024 · 1 comment
Closed

trusted domiains issue after image switching #2146

lukaszzyla opened this issue Jan 13, 2024 · 1 comment
Labels

Comments

@lukaszzyla
Copy link

lukaszzyla commented Jan 13, 2024

Guys please help as I am pulling hair out of my head after almost sleepless night.

I did have a working nextcloud fpm 26 configured with nginx that I have built myself so I could use elasticsearch and have working OCR in 3 languages.
everything was fine, but I was having many logs entries with oracle complainign about more than 1000 files.
I have read that this issue was resolved in nextcloud update so I decided to give it a try.
The only thing I did was switch images for my app: and cron: from my custom image to nextcloud:fpm-alpine.
When i started the new image I got the blue nextcloud screen with trusted domains issue and information to configure the config/config.php
It was ocnfigured and workding before with my image and i didn't change a thing.
Now, even after reverting to my previous custom image I cannot access my nextcloud - all the time i can see the trusted domains error. Sometimes, just after starting the image up I can see my login screen and I have even managed to login once using configured LDAP user (that I always use). Maybe this could be a hint that even when I manage to log in NC complains about not being able to get weather data.
I don't know what to do or even when to look now.

my docker compose:

version: '2'

services:
  nextcloud_db:
    image: mariadb:10.5
    restart: always
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    volumes:
      - /Container/nextcloud/db2data:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=XXPASSXX
      - MYSQL_PASSWORD=XXPASSXX
      - MYSQL_DATABASE=XXDBXX
      - MYSQL_USER=XXUSERXX
    networks:
      - nginx-pm_default

  redis:
    image: redis:alpine
    restart: always

  app:
    image: nextcloud-fpm-custom
THIS IS THE IMAGE I TRIED:    #    image: nextcloud:fpm-alpine
    restart: always
    links:
      - nextcloud_db
    volumes:
      - /Container/nextcloud/app:/var/www/html
      - /extshare/KROE:/KROE
      - /Container/nextcloud/tweak.php:/usr/local/etc/php-fpm.d
    environment:
      - MYSQL_PASSWORD=XXPASSXX
      - MYSQL_DATABASE=XXDATABASEXX
      - MYSQL_USER=XXUSERXX
      - MYSQL_HOST=XXDBHOSTXX
    networks:
      - nginx-pm_default

  web:
    image: nginx
    restart: always
    ports:
      - XXXX:80
      - YYYY:443
    links:
      - app
    volumes:
      - /Container/nextcloud/nginx.conf:/etc/nginx/nginx.conf:ro
    volumes_from:
      - app
    networks:
      - nginx-pm_default
      
  cron:
    image: nextcloud-fpm-custom
THIS IS THE IMAGE I TRIED:    #    image: nextcloud:fpm-alpine
    restart: always
    volumes:
      - /Container/nextcloud/app:/var/www/html
      - /Container/nextcloud/mycronfile:/var/spool/cron/crontabs/www-data
      - /extshare/KROE:/KROE
    entrypoint: /cron.sh
    depends_on:
      - nextcloud_db
      - redis
    environment:
      - MYSQL_PASSWORD=XXPASSXX
      - MYSQL_DATABASE=XXDATABASEXX
      - MYSQL_USER=XXUSERXX
      - MYSQL_HOST=XXDBHOSTXX
    networks:
      - nginx-pm_default
      

  elasticsearch:
    # DOCKER_TAG will be provided by the .env-file
    image: r0wi/elasticsearch-nextcloud-docker:${DOCKER_TAG}
    env_file: stack.env
    container_name: elasticsearch_nc
    restart: always
    environment:
      - cluster.name=docker-cluster
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms4g -Xmx4g"
      - discovery.type=single-node
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      # Use named volume because of permission problems
      - elasticsearch_data:/usr/share/elasticsearch/data
    ports:
      - 192.168.x.y:9200:9200
    networks:
      - nginx-pm_default

volumes:
  elasticsearch_data:

networks:
  nginx-pm_default:
    external: true
'
occ config:list system
{
    "system": {
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "192.168.x.y", *EDITED*
            "nc.mydomain.org"  *EDITED*
        ],
        "allow_local_remote_servers": true,
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "26.0.0.11",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/nc.mydomain.org",  *EDITED*
        "overwriteprotocol": "https",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "PL",
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "app_install_overwrite": [
            "pdfdraw",
            "ocjobs",
            "files_fulltextsearch_tesseract",
            "files_fulltextsearch",
            "fulltextsearch",
            "fulltextsearch_elasticsearch",
            "richdocumentscode"
        ]
    }
}

PLEASE HELP as I should have it working by monday and I really have no clue where to go...

@joshtrichards
Copy link
Member

Hi @lukaszzyla - As this seems like a configuration matter rather than a bug in the official image, please post your query to the Nextcloud Help Forum - https://help.nextcloud.com.

The only thing I did was switch images for my app: and cron: from my custom image to nextcloud:fpm-alpine.

I will say that you should be very careful doing this. It sounds like your custom image is v26 based. If you change the image to nextcloud:fpm-alpine you'll receive whatever the latest image is (currently v28) which is not something you can upgrade to directly from v26. I always suggest including the version tag in the image name. Let's take any follow-up to the forum. Feel free to include a link here to your post in case someone runs across your query here.

@joshtrichards joshtrichards closed this as not planned Won't fix, can't repro, duplicate, stale Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants