Thanks for the reply! I switched the reference from on container to another to use an ip instead of a docker container name and it started working ok. I am able to ping the next cloud container via container name though and vice versa from next cloud to swag so I’m not sure why it was failing to connect, if that is what was happening. The other two servers I am trying to set up in this docker setup are OnlyOfice and BitWarden.
The current issue with having a seperate onlyoffice doument server is I gt a 502 error in the connection between dockers I think.
Nextcloud proxy conf:
## Version 2021/05/18
# make sure that your dns has a cname set for nextcloud
# assuming this container is called "swag", edit your nextcloud container's config
# located at /config/www/nextcloud/config/config.php and add the following lines before the ");":
# 'trusted_proxies' => ['swag'],
# 'overwrite.cli.url' => 'https://nextcloud.your-domain.com/',
# 'overwritehost' => 'nextcloud.your-domain.com',
# 'overwriteprotocol' => 'https',
#
# Also don't forget to add your domain name to the trusted domains array. It should look somewhat like this:
# array (
# 0 => '192.168.0.1:444', # This line may look different on your setup, don't modify it.
# 1 => 'nextcloud.your-domain.com',
# ),
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name nextcloud.*;
include /config/nginx/ssl.conf;
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
client_max_body_size 0;
location / {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app 192.168.50.199;
set $upstream_port 444;
set $upstream_proto https;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_max_temp_file_size 2048m;
}
}
Documentserver proxy conf:
## Version 2021/05/18
# Make sure that your dns has a cname set for onlyoffice named "documentserver"
# Make sure that the onlyoffice documentserver container is named "documentserver"
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name documentserver.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
#enable for ldap auth, fill in ldap details in ldap.conf
#include /config/nginx/ldap.conf;
# enable for Authelia
#include /config/nginx/authelia-server.conf;
location / {
#enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
#enable the next two lines for ldap auth
#auth_request /auth;
#error_page 401 =200 /ldaplogin;
# enable for Authelia
#include /config/nginx/authelia-location.conf;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app documentserver;
set $upstream_port 80;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
}
Only Office connector document server url:
https://documentserver.jpurdy647.uk/
Swag Docker Log:
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 02-tamper-check: executing...
[cont-init.d] 02-tamper-check: exited 0.
[cont-init.d] 10-adduser: executing...
usermod: no changes
-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/
Brought to you by linuxserver.io
-------------------------------------
To support the app dev(s) visit:
Certbot: https://supporters.eff.org/donate/support-work-on-certbot
To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid: 99
User gid: 100
-------------------------------------
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
using keys found in /config/keys
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 50-config: executing...
Variables set:
PUID=99
PGID=100
TZ=America/Los_Angeles
URL=jpurdy647.uk
SUBDOMAINS=wildcard
EXTRA_DOMAINS=
ONLY_SUBDOMAINS=true
VALIDATION=dns
CERTPROVIDER=
DNSPLUGIN=cloudflare
EMAIL=jpurdy647@fastmail.fm
STAGING=false
Using Let's Encrypt as the cert provider
SUBDOMAINS entered, processing
Wildcard cert for only the subdomains of jpurdy647.uk will be requested
E-mail address entered: jpurdy647@fastmail.fm
dns validation via cloudflare plugin is selected
Certificate exists; parameters unchanged; starting nginx
[cont-init.d] 50-config: exited 0.
[cont-init.d] 60-renew: executing...
The cert does not expire within the next day. Letting the cron script handle the renewal attempts overnight (2:08am).
[cont-init.d] 60-renew: exited 0.
[cont-init.d] 70-templates: executing...
[cont-init.d] 70-templates: exited 0.
[cont-init.d] 90-custom-folders: executing...
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Server ready
Onlyoffice official docker server container log (Some errors):
{
counters: {
'statsd.bad_lines_seen': 0,
'statsd.packets_received': 0,
'statsd.metrics_received': 0
},
timers: {},
gauges: { 'statsd.timestamp_lag': 0 },
timer_data: {},
counter_rates: {
'statsd.bad_lines_seen': 0,
'statsd.packets_received': 0,
'statsd.metrics_received': 0
},
sets: {},
pctThreshold: [ 90 ]
}
Preparing for shutdown, it can take a lot of time, please wait... * Starting PostgreSQL 12 database server
...done.
* Starting RabbitMQ Messaging Server rabbitmq-server
...done.
Starting supervisor: supervisord.
* Starting periodic command scheduler cron
...done.
* Starting nginx nginx
...done.
Generating AllFonts.js, please wait...Done
Generating presentation themes, please wait...Done
ds:docservice: stopped
ds:docservice: started
ds:converter: stopped
ds:converter: started
* Reloading nginx configuration nginx
...done.
==> /var/log/onlyoffice/documentserver/converter/err.log <==
==> /var/log/onlyoffice/documentserver/converter/out.log <==
[2022-05-29T20:01:01.308] [WARN] nodeJS - update cluster with 1 workers
[2022-05-29T20:01:42.477] [WARN] nodeJS - update cluster with 1 workers
[2022-05-29T20:01:42.482] [WARN] nodeJS - worker 1206 started.
[2022-05-29T20:01:42.484] [WARN] nodeJS - update cluster with 1 workers
[2022-05-30T12:21:26.920] [WARN] nodeJS - update cluster with 1 workers
[2022-05-30T12:21:26.928] [WARN] nodeJS - worker 1060 started.
[2022-05-30T12:21:26.930] [WARN] nodeJS - update cluster with 1 workers
[2022-05-30T12:22:07.983] [WARN] nodeJS - update cluster with 1 workers
[2022-05-30T12:22:07.988] [WARN] nodeJS - worker 1185 started.
[2022-05-30T12:22:07.990] [WARN] nodeJS - update cluster with 1 workers
==> /var/log/onlyoffice/documentserver/docservice/err.log <==
==> /var/log/onlyoffice/documentserver/docservice/out.log <==
[2022-05-29T20:01:41.164] [WARN] nodeJS - Failed to subscribe to plugin folder updates. When changing the list of plugins, you must restart the server. https://nodejs.org/docs/latest/api/fs.html#fs_availability
[2022-05-29T20:01:41.189] [WARN] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 7.1.0. Build: 215
[2022-05-30T12:21:27.434] [WARN] nodeJS - Express server starting...
[2022-05-30T12:21:27.436] [WARN] nodeJS - Set services.CoAuthoring.token.enable.browser, services.CoAuthoring.token.enable.request.inbox, services.CoAuthoring.token.enable.request.outbox in the Document Server config to prevent an unauthorized access to your documents and the substitution of important parameters in ONLYOFFICE Document Server requests.
[2022-05-30T12:21:27.437] [WARN] nodeJS - Failed to subscribe to plugin folder updates. When changing the list of plugins, you must restart the server. https://nodejs.org/docs/latest/api/fs.html#fs_availability
[2022-05-30T12:21:27.473] [WARN] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 7.1.0. Build: 215
[2022-05-30T12:22:06.648] [WARN] nodeJS - Express server starting...
[2022-05-30T12:22:06.649] [WARN] nodeJS - Set services.CoAuthoring.token.enable.browser, services.CoAuthoring.token.enable.request.inbox, services.CoAuthoring.token.enable.request.outbox in the Document Server config to prevent an unauthorized access to your documents and the substitution of important parameters in ONLYOFFICE Document Server requests.
[2022-05-30T12:22:06.650] [WARN] nodeJS - Failed to subscribe to plugin folder updates. When changing the list of plugins, you must restart the server. https://nodejs.org/docs/latest/api/fs.html#fs_availability
[2022-05-30T12:22:06.693] [WARN] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 7.1.0. Build: 215
==> /var/log/onlyoffice/documentserver/metrics/err.log <==
==> /var/log/onlyoffice/documentserver/metrics/out.log <==
counter_rates: {
'statsd.bad_lines_seen': 0,
'statsd.packets_received': 0,
'statsd.metrics_received': 0
},
sets: {},
pctThreshold: [ 90 ]
}
30 May 12:21:26 - [1021] reading config file: ./config/config.js
30 May 12:21:26 - server is up INFO
==> /var/log/onlyoffice/documentserver/nginx.error.log <==
2022/05/29 18:09:28 [error] 6543#6543: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.18.0.1, server: , request: "GET /example/ HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "172.18.0.4", referrer: "http://172.18.0.4/welcome/"
2022/05/29 18:09:28 [error] 6543#6543: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.18.0.1, server: , request: "GET /example/ HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "172.18.0.4", referrer: "http://172.18.0.4/welcome/"
Swag Nginx Error log (Some Errors):
2022/05/29 12:06:03 [error] 531#531: *1 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: 192.168.50.1, server: documentserver.*, request: "GET /502.html HTTP/2.0", upstream: "https://192.168.50.199:4430/502.html", host: "documentserver.jpurdy647.uk"
2022/05/29 12:06:08 [error] 531#531: *1 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", upstream: "https://192.168.50.199:4430/", host: "documentserver.jpurdy647.uk"
2022/05/29 12:06:08 [error] 531#531: *1 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", upstream: "https://192.168.50.199:4430/502.html", host: "documentserver.jpurdy647.uk"
2022/05/29 12:06:11 [error] 531#531: *1 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", upstream: "https://192.168.50.199:4430/", host: "documentserver.jpurdy647.uk"
2022/05/29 12:06:12 [error] 531#531: *1 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", upstream: "https://192.168.50.199:4430/502.html", host: "documentserver.jpurdy647.uk"
2022/05/29 12:06:29 [error] 531#531: *1 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", upstream: "https://192.168.50.199:4430/", host: "documentserver.jpurdy647.uk"
2022/05/29 12:06:29 [error] 531#531: *1 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", upstream: "https://192.168.50.199:4430/502.html", host: "documentserver.jpurdy647.uk"
2022/05/29 12:40:35 [error] 531#531: *267 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 193.106.191.48, server: _, request: "POST /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "173.44.95.207:443"
2022/05/29 12:51:05 [error] 531#531: *1 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", upstream: "https://192.168.50.199:4430/", host: "documentserver.jpurdy647.uk"
2022/05/29 12:51:05 [error] 531#531: *1 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", upstream: "https://192.168.50.199:4430/502.html", host: "documentserver.jpurdy647.uk"
2022/05/29 12:51:10 [error] 531#531: *1 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: 192.168.50.1, server: documentserver.*, request: "GET /welcome HTTP/2.0", upstream: "https://192.168.50.199:4430/welcome", host: "documentserver.jpurdy647.uk"
2022/05/29 12:51:10 [error] 531#531: *1 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: 192.168.50.1, server: documentserver.*, request: "GET /welcome HTTP/2.0", upstream: "https://192.168.50.199:4430/502.html", host: "documentserver.jpurdy647.uk"
2022/05/29 12:51:14 [error] 531#531: *1 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", upstream: "https://192.168.50.199:4430/", host: "documentserver.jpurdy647.uk"
2022/05/29 12:51:14 [error] 531#531: *1 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", upstream: "https://192.168.50.199:4430/502.html", host: "documentserver.jpurdy647.uk"
2022/05/29 12:53:22 [error] 531#531: *1 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", upstream: "https://192.168.50.199:4430/", host: "documentserver.jpurdy647.uk"
2022/05/29 12:53:22 [error] 531#531: *1 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", upstream: "https://192.168.50.199:4430/502.html", host: "documentserver.jpurdy647.uk"
2022/05/29 12:53:23 [error] 531#531: *1 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", upstream: "https://192.168.50.199:4430/", host: "documentserver.jpurdy647.uk"
2022/05/29 12:53:23 [error] 531#531: *1 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", upstream: "https://192.168.50.199:4430/502.html", host: "documentserver.jpurdy647.uk"
2022/05/29 12:53:23 [error] 531#531: *1 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", upstream: "https://192.168.50.199:4430/", host: "documentserver.jpurdy647.uk"
2022/05/29 12:53:23 [error] 531#531: *1 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", upstream: "https://192.168.50.199:4430/502.html", host: "documentserver.jpurdy647.uk"
2022/05/29 12:59:49 [error] 531#531: *1 documentserver could not be resolved (3: Host not found), client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", host: "documentserver.jpurdy647.uk"
2022/05/29 12:59:49 [error] 531#531: *1 documentserver could not be resolved (3: Host not found), client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", host: "documentserver.jpurdy647.uk"
2022/05/29 12:59:50 [error] 531#531: *1 documentserver could not be resolved (3: Host not found), client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", host: "documentserver.jpurdy647.uk"
2022/05/29 12:59:50 [error] 531#531: *1 documentserver could not be resolved (3: Host not found), client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", host: "documentserver.jpurdy647.uk"
2022/05/29 12:59:51 [error] 531#531: *1 documentserver could not be resolved (3: Host not found), client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", host: "documentserver.jpurdy647.uk"
2022/05/29 12:59:51 [error] 531#531: *1 documentserver could not be resolved (3: Host not found), client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", host: "documentserver.jpurdy647.uk"
2022/05/29 13:55:00 [error] 531#531: *944 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 193.106.191.48, server: _, request: "GET /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "173.44.95.207:443"
2022/05/29 14:59:41 [error] 531#531: *1860 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 193.106.191.48, server: _, request: "GET /index.php?s=/Index/\think\app/invokefunction&function=call_user_func_array&vars[0]=md5&vars[1][]=HelloThinkPHP21 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "173.44.95.207:443"
2022/05/29 15:47:28 [crit] 531#531: *2118 SSL_read_early_data() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: 185.142.236.43, server: 0.0.0.0:443
2022/05/29 19:42:07 [crit] 531#531: connect() to [2600:1401:6000::17c7:4109]:80 failed (99: Address not available) while requesting certificate status, responder: r3.o.lencr.org, peer: [2600:1401:6000::17c7:4109]:80, certificate: "/config/keys/letsencrypt/fullchain.pem"
2022/05/29 19:42:07 [crit] 531#531: connect() to [2600:1401:6000::17c7:4118]:80 failed (99: Address not available) while requesting certificate status, responder: r3.o.lencr.org, peer: [2600:1401:6000::17c7:4118]:80, certificate: "/config/keys/letsencrypt/fullchain.pem"
2022/05/30 01:24:22 [crit] 531#531: *7836 SSL_read_early_data() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: 154.89.5.70, server: 0.0.0.0:443
2022/05/30 05:26:22 [error] 533#533: *8 documentserver could not be resolved (3: Host not found), client: 192.168.50.1, server: documentserver.*, request: "GET /healthcheck HTTP/1.1", host: "documentserver.jpurdy647.uk"
2022/05/30 05:26:22 [error] 533#533: *8 documentserver could not be resolved (3: Host not found), client: 192.168.50.1, server: documentserver.*, request: "GET /healthcheck HTTP/1.1", host: "documentserver.jpurdy647.uk"
2022/05/30 05:26:52 [error] 533#533: *1 documentserver could not be resolved (3: Host not found), client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", host: "documentserver.jpurdy647.uk"
2022/05/30 05:26:52 [error] 533#533: *1 documentserver could not be resolved (3: Host not found), client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", host: "documentserver.jpurdy647.uk"
2022/05/30 05:26:58 [error] 533#533: *1 documentserver could not be resolved (3: Host not found), client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", host: "documentserver.jpurdy647.uk"
2022/05/30 05:26:58 [error] 533#533: *1 documentserver could not be resolved (3: Host not found), client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", host: "documentserver.jpurdy647.uk"
2022/05/30 05:27:04 [error] 533#533: *1 documentserver could not be resolved (3: Host not found), client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", host: "documentserver.jpurdy647.uk"
2022/05/30 05:27:04 [error] 533#533: *1 documentserver could not be resolved (3: Host not found), client: 192.168.50.1, server: documentserver.*, request: "GET / HTTP/2.0", host: "documentserver.jpurdy647.uk"
It could be a related container reference issue. I tried using the ip as with nextcloud but never found any success and have reverted back to default currently. Some logged errors go back to my nextcloud attempts
Here is the 502 error:
502 Bad Gateway
nginx
The url I am using to access the document server via the proxy:
https://documentserver.jpurdy647.uk/
Here is my server date and tie for reference:
root@jpurdy647Server:~# date
Mon May 30 08:34:25 EDT 2022
My internal IP setup (Available for 2 weeks):
https://ibb.co/tZxx5nd
I was for a while able to access my document server directly by http insecure but never ssl. Do I need ssl even though I am behind a reverse proxy? Also the OnlyOffice connector seems to require it for some reason. I am on linux unraid so I don’t have any screenshots