Hello,
It seems I canât find a solution to my issue.
Nextcloud works as it should.
Colabora also works as it should.
The only thing that trows errors in Browser console (Nothing on screen) is when you try to insert picture from Nextcloud.
When you press Image->Insert Image in colabora it displays images and you can browse folders.
You can also upload images directly from PC to colabora and it works without any problems.
When you insert picture from Nextcloud in Console you get error:
GET https://files.example.com/apps/richdocuments/assets/ 404 (Not Found) â FilesAppIntegration.js:176
Uncought (in promise):
z {message: âRequest failed with status code 404â, name âAxiosErrorâ, code: âERR_BAD_REQUESTâ } FilesAppIntegration.js:177
It references code:
const insertFileFromPath = async (path) => {
const filename = path.substring(path.lastIndexOf('/') + 1)
const { data } = await axios.post(generateUrl('apps/richdocuments/assets'), { path })
insertFile(filename, data.url)
}
Any suggestions?
Curl / TLS works for both domains from colabora->nextcloud from nextcloud->colabora.
No WOPI limitations set for debugging in nextcloud.
NC version: 29.0.0
CB version 24.04.2.1
Webserver Nginx + SSL termination (copy from Colabora website).
Colabora separate domain
Nextcloud separate domain
I can provide more information - I really want to solve this.
wwe
May 21, 2024, 12:04pm
3
I have seen the issue shortly but at the moment I canât repro it anymore⌠and I can successfully add an image into writer document, both Nextcloud and local works. donât ask what changed I suppose some update.
Iâm running NC29 as Docker/Apache and Docker/CODE 24.04.1.4. Both run at separate public DNS behind one traefik reverse proxy with SSL termination.
njscop
May 21, 2024, 12:22pm
4
Hello wwe,
I have read your numerous post and tried various settings you used throughout the years.
I mean if you could remember what it was you changed that would be great as Iâm stuck and have run out of options what to do next or what to check or debug further.
Could you share your current docker config? So I could explode that part.
N.
1 Like
wwe
May 21, 2024, 1:05pm
5
I donât think it helps I share my config⌠app config looks like expanded config from Nextcloud docker-compose setup with notify_push (2024) and CODE is pretty unchanged all the time (I donât remember any changes beside version for long time already).
docker compose config:
services:
app:
depends_on:
db:
condition: service_healthy
required: true
redis:
condition: service_healthy
required: true
environment:
COLLABORA_FQDN: collabora.mydomain.tld
NEXTCLOUD_ADMIN_PASSWORD_FILE: /run/secrets/nextcloud_admin_password
NEXTCLOUD_ADMIN_USER_FILE: /run/secrets/nextcloud_admin_user
NEXTCLOUD_FQDN: dev-nc.mydomain.tld
NEXTCLOUD_TRUSTED_DOMAINS: dev-nc.mydomain.tld
OVERWRITEHOST: dev-nc.mydomain.tld
OVERWRITEPROTOCOL: https
PHP_MEMORY_LIMIT: 768M
PHP_UPLOAD_LIMIT: 1G
POSTGRES_DB_FILE: /run/secrets/postgres_db
POSTGRES_HOST: db
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
POSTGRES_USER_FILE: /run/secrets/postgres_user
REDIS_HOST: redis
TRUSTED_PROXIES: 172.16.0.0/12 192.168.0.0/16 10.0.0.0/8 fc00::/7 fe80::/10 2001:db8::/32
overwrite.cli.url: https://dev-nc.mydomain.tld
expose:
- "80"
image: nextcloud:29
labels:
traefik.docker.network: proxy
traefik.enable: "true"
traefik.http.routers.dev-nc.entrypoints: web-secure
traefik.http.routers.dev-nc.middlewares: secHeaders3@file,nextcloud-redirect@file
traefik.http.routers.dev-nc.priority: "1"
traefik.http.routers.dev-nc.rule: Host(`dev-nc.mydomain.tld`)
traefik.http.routers.dev-nc.tls: "true"
traefik.http.routers.dev-nc.tls.certresolver: letsencryptresolver
traefik.http.services.dev-nc.loadbalancer.server.port: "80"
networks:
default: null
proxy: null
restart: unless-stopped
secrets:
- source: postgres_db
target: /run/secrets/postgres_db
- source: postgres_password
target: /run/secrets/postgres_password
- source: postgres_user
target: /run/secrets/postgres_user
- source: nextcloud_admin_user
target: /run/secrets/nextcloud_admin_user
- source: nextcloud_admin_password
target: /run/secrets/nextcloud_admin_password
user: 1010:1010
volumes:
- type: bind
source: ./dev-nc/app
target: /var/www/html
bind:
create_host_path: true
- type: bind
source: ./dev-nc/config
target: /var/www/html/config
bind:
create_host_path: true
- type: bind
source: /data/dev-nc/files
target: /var/www/html/data
bind:
create_host_path: true
- type: bind
source: ./dev-nc/remoteip.conf
target: /etc/apache2/conf-enabled/remoteip.conf
read_only: true
bind:
create_host_path: true
- type: bind
source: ./dev-nc/redis-session.ini
target: /usr/local/etc/php/conf.d/redis-session.ini
bind:
create_host_path: true
cron:
depends_on:
app:
condition: service_started
required: true
entrypoint:
- /cron.sh
environment:
COLLABORA_FQDN: collabora.mydomain.tld
NEXTCLOUD_ADMIN_PASSWORD_FILE: /run/secrets/nextcloud_admin_password
NEXTCLOUD_ADMIN_USER_FILE: /run/secrets/nextcloud_admin_user
NEXTCLOUD_FQDN: dev-nc.mydomain.tld
NEXTCLOUD_TRUSTED_DOMAINS: dev-nc.mydomain.tld
OVERWRITEHOST: dev-nc.mydomain.tld
OVERWRITEPROTOCOL: https
PHP_MEMORY_LIMIT: 768M
PHP_UPLOAD_LIMIT: 1G
POSTGRES_DB_FILE: /run/secrets/postgres_db
POSTGRES_HOST: db
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
POSTGRES_USER_FILE: /run/secrets/postgres_user
REDIS_HOST: redis
TRUSTED_PROXIES: 172.16.0.0/12 192.168.0.0/16 10.0.0.0/8 fc00::/7 fe80::/10 2001:db8::/32
UID: "1010"
overwrite.cli.url: https://dev-nc.mydomain.tld
image: nextcloud:29
networks:
default: null
restart: unless-stopped
volumes:
- type: bind
source: ./dev-nc/app
target: /var/www/html
bind:
create_host_path: true
- type: bind
source: ./dev-nc/config
target: /var/www/html/config
bind:
create_host_path: true
- type: bind
source: /data/dev-nc/files
target: /var/www/html/data
bind:
create_host_path: true
- type: bind
source: ./dev-nc/remoteip.conf
target: /etc/apache2/conf-enabled/remoteip.conf
read_only: true
bind:
create_host_path: true
- type: bind
source: ./dev-nc/redis-session.ini
target: /usr/local/etc/php/conf.d/redis-session.ini
bind:
create_host_path: true
- type: bind
source: ./dev-nc/cron.sh
target: /cron.sh
bind:
create_host_path: true
db:
environment:
POSTGRES_DB_FILE: /run/secrets/postgres_db
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
POSTGRES_USER_FILE: /run/secrets/postgres_user
healthcheck:
test:
- CMD-SHELL
- pg_isready -d `cat $$POSTGRES_DB_FILE` -U `cat $$POSTGRES_USER_FILE`
timeout: 5s
interval: 30s
retries: 3
start_period: 15s
image: postgres:15
networks:
default: null
restart: unless-stopped
secrets:
- source: postgres_db
target: /run/secrets/postgres_db
- source: postgres_password
target: /run/secrets/postgres_password
- source: postgres_user
target: /run/secrets/postgres_user
user: 1010:1010
volumes:
- type: bind
source: ./dev-nc/db
target: /var/lib/postgresql/data
bind:
create_host_path: true
- type: bind
source: /etc/passwd
target: /etc/passwd
read_only: true
bind:
create_host_path: true
- type: bind
source: /data/dev-nc/db-backup
target: /mnt/db-backup
bind:
create_host_path: true
imaginary:
cap_add:
- SYS_NICE
depends_on:
app:
condition: service_started
required: true
expose:
- "9000"
image: nextcloud/aio-imaginary:latest
networks:
default: null
restart: unless-stopped
tmpfs:
- /tmp
user: 1010:1010
notify_push:
depends_on:
app:
condition: service_started
required: true
entrypoint:
- /var/www/html/custom_apps/notify_push/bin/x86_64/notify_push
- /var/www/html/config/config.php
environment:
PORT: "7867"
image: nextcloud:29
labels:
traefik.docker.network: proxy
traefik.enable: "true"
traefik.http.routers.dev-nc_push.entryPoints: web-secure
traefik.http.routers.dev-nc_push.middlewares: nextcloud_striprefix_push@file
traefik.http.routers.dev-nc_push.priority: "2"
traefik.http.routers.dev-nc_push.rule: Host(`dev-nc.mydomain.tld`) && PathPrefix(`/push`)
traefik.http.routers.dev-nc_push.tls.certresolver: letsencryptresolver
traefik.http.services.dev-nc_push.loadbalancer.server.port: "7867"
networks:
default: null
proxy: null
restart: unless-stopped
user: 1010:1010
volumes:
- type: bind
source: ./dev-nc/app
target: /var/www/html
bind:
create_host_path: true
- type: bind
source: ./dev-nc/config
target: /var/www/html/config
read_only: true
bind:
create_host_path: true
redis:
healthcheck:
test:
- CMD-SHELL
- redis-cli ping | grep PONG
timeout: 3s
interval: 30s
retries: 3
start_period: 10s
image: redis:bookworm
networks:
default: null
restart: unless-stopped
collabora:
cap_add:
- MKNOD
container_name: collabora
environment:
VIRTUAL_HOST: collabora.mydomain.tld
VIRTUAL_PORT: "9980"
VIRTUAL_PROTO: http
aliasgroup1: https://nc.mydomain.tld:443
aliasgroup2: https://dev-nc.mydomain.tld:443
aliasgroup3: https://test-nc.mydomain.tld:443
dictionaries: de_DE en_US es_ES ru
extra_params: --o:ssl.enable=false --o:ssl.termination=true --o:user_interface.mode=compact --o:remote_font_config.url=https://dev-nc.mydomain.tld:443/apps/richdocuments/settings/fonts.json --o:logging.level=warning
password: <<redacted>>
username: redis
expose:
- "9980"
image: collabora/code:24.04.2.1.1
labels:
traefik.docker.network: proxy
traefik.enable: "true"
traefik.http.routers.collabora.entrypoints: web-secure
traefik.http.routers.collabora.middlewares: secHeaders3@file
traefik.http.routers.collabora.rule: Host(`collabora.mydomain.tld`)
traefik.http.routers.collabora.tls: "true"
traefik.http.routers.collabora.tls.certresolver: letsencryptresolver
traefik.http.services.collabora.loadbalancer.server.port: "9980"
traefik.passHostHeader: "true"
networks:
proxy: null
restart: unless-stopped
tty: true
volumes:
- type: bind
source: /etc/timezone
target: /etc/timezone
read_only: true
bind:
create_host_path: true
- type: bind
source: /etc/localtime
target: /etc/localtime
read_only: true
bind:
create_host_path: true
networks:
default:
name: infra_default
proxy:
name: proxy
external: true
secrets:
nextcloud_admin_password:
name: dev-nc_nextcloud_admin_password
file: ./dev-nc/secrets/nextcloud_admin_password
nextcloud_admin_user:
name: dev-nc_nextcloud_admin_user
file: ./dev-nc/secrets/nextcloud_admin_user
postgres_db:
name: dev-nc_postgres_db
file: ./dev-nc/secrets/postgres_db
postgres_password:
name: dev-nc_postgres_password
file: ./dev-nc/secrets/postgres_password
postgres_user:
name: dev-nc_postgres_user
file: ./dev-nc/secrets/postgres_user
as you see I tested with collabora/code:24.04.2.1.1 as well and it works.
Compared and yes = nothing new or interesting.
Would you be willing to help out further (debug) with payment?
N.
wwe
May 21, 2024, 7:38pm
7
hi @njscop I really appreciate the offer and I agree but just to be transparent from the beginning - I donât have any good idea where to start - if one-two things donât result in a lucky punch this gonna be really painful line-by-line log comparison between good vs bad installation⌠Iâm not sure you are committed on this? if yes send me PM with your offer
@wwe hi brother hope you are doing well. I am getting same error, while importing image from Nextcloud instance (my directory of nextcloud). But i can insert image from local laptop/filesystem.
Error Image
It seems like same problem defined above. Nextcloud 28.0.3 without docker, collabora (without docker) is running on separate VM with ssl termination and apache reverse proxy. If you solved above problem let me know please the hint so i can try.
Nextcloud data directory is mounted with NAS everything working as expected. only have issue described above
wwe
July 4, 2024, 6:30am
9
hi brother nothing to add - it works for me⌠I can add a file from my NextcloudâŚ
I have another nextcloud instance and collabora, i can reproduce the issue with commenting following lines
<group>
<host desc="hostname to allow or deny." allow="true">https://mynextclouddomain.com</host>
</group>
I will check that instance tonight Insha Allah lets see if this is the issue
Issue resolved.
These two lines were not defined in coolwsd.xml
<group>
<host desc="hostname to allow or deny." allow="true">https://mynextclouddomain.com</host>
</group>
And
<host>mynextclouddomain.com</host>
njscop
July 5, 2024, 6:17am
12
Which is that section that begins only with âhostâ ?
Could you please share an excerpt from that?