Hey,
I’d like to integrate onlyoffice in my self hosted k3s cluster, but I’m always hitting a wall when trying to connect to it. I’ve pretty much tried everything, hopefully someone can help me to figure it out! The thing is, I have nextcloud running in docker as well (same setup with traefikv2.3), which works great. But even if I try to connect to that very instance, it fails to connect.
Err log with cluster addresses
Error index InvalidArgumentException: Key may not be empty at 2021-01-22T12:55:32+01:00
custom_apps/onlyoffice/3rdparty/jwt/JWT.php line 72
0. custom_apps/onlyoffice/lib/crypt.php line 70
Firebase\JWT\JWT::decode(
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJl ... s",
"",
["HS256"]
)
1. .../controller/callbackcontroller.php line 318
OCA\Onlyoffice\Crypt->ReadHash("eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb2 ... s")
2. .../Dispatcher.php line 169
OCA\Onlyoffice\Controller\CallbackController->emptyfile("eyJ0eXAiOiJKV1QiLCJhbG ... s")
3. .../Http/Dispatcher.php line 100
OC\AppFramework\Http\Dispatcher->executeController(
OCA\Onlyoffice\Controller\Ca ... {},
"emptyfile"
)
4. lib/private/AppFramework/App.php line 152
OC\AppFramework\Http\Dispatcher->dispatch(
OCA\Onlyoffice\Controller\CallbackCon ... {},
"emptyfile"
)
5. lib/private/Route/Router.php line 309
OC\AppFramework\App::main(
"OCA\\Onlyoffice\\Controller\\CallbackController",
"emptyfile",
OC\AppFramework\DependencyInjection\DIContainer {},
{_route:"onlyoffice.callback.emptyfile"}
)
6. lib/base.php line 1008
OC\Route\Router->match("\/apps\/onlyoffice\/empty")
7. index.php line 37
OC::handleRequest(
)
Error index InvalidArgumentException: Key may not be empty at 2021-01-22T12:55:33+01:00
custom_apps/onlyoffice/3rdparty/jwt/JWT.php line 72
0. custom_apps/onlyoffice/lib/crypt.php line 70
Firebase\JWT\JWT::decode(
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJl ... s",
"",
["HS256"]
)
1. .../controller/callbackcontroller.php line 318
OCA\Onlyoffice\Crypt->ReadHash("eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb2 ... s")
2. .../Dispatcher.php line 169
OCA\Onlyoffice\Controller\CallbackController->emptyfile("eyJ0eXAiOiJKV1QiLCJhbG ... s")
3. .../Http/Dispatcher.php line 100
OC\AppFramework\Http\Dispatcher->executeController(
OCA\Onlyoffice\Controller\Ca ... {},
"emptyfile"
)
4. lib/private/AppFramework/App.php line 152
OC\AppFramework\Http\Dispatcher->dispatch(
OCA\Onlyoffice\Controller\CallbackCon ... {},
"emptyfile"
)
5. lib/private/Route/Router.php line 309
OC\AppFramework\App::main(
"OCA\\Onlyoffice\\Controller\\CallbackController",
"emptyfile",
OC\AppFramework\DependencyInjection\DIContainer {},
{_route:"onlyoffice.callback.emptyfile"}
)
6. lib/base.php line 1008
OC\Route\Router->match("\/apps\/onlyoffice\/empty")
7. index.php line 37
OC::handleRequest(
)
Error index InvalidArgumentException: Key may not be empty at 2021-01-22T12:55:34+01:00
custom_apps/onlyoffice/3rdparty/jwt/JWT.php line 72
0. custom_apps/onlyoffice/lib/crypt.php line 70
Firebase\JWT\JWT::decode(
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJl ... s",
"",
["HS256"]
)
1. .../controller/callbackcontroller.php line 318
OCA\Onlyoffice\Crypt->ReadHash("eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb2 ... s")
2. .../Dispatcher.php line 169
OCA\Onlyoffice\Controller\CallbackController->emptyfile("eyJ0eXAiOiJKV1QiLCJhbG ... s")
3. .../Http/Dispatcher.php line 100
OC\AppFramework\Http\Dispatcher->executeController(
OCA\Onlyoffice\Controller\Ca ... {},
"emptyfile"
)
4. lib/private/AppFramework/App.php line 152
OC\AppFramework\Http\Dispatcher->dispatch(
OCA\Onlyoffice\Controller\CallbackCon ... {},
"emptyfile"
)
5. lib/private/Route/Router.php line 309
OC\AppFramework\App::main(
"OCA\\Onlyoffice\\Controller\\CallbackController",
"emptyfile",
OC\AppFramework\DependencyInjection\DIContainer {},
{_route:"onlyoffice.callback.emptyfile"}
)
6. lib/base.php line 1008
OC\Route\Router->match("\/apps\/onlyoffice\/empty")
7. index.php line 37
OC::handleRequest(
)
Error onlyoffice Exception: Im Dokumentenservice ist ein Fehler aufgetreten: Error while downloading the 2021-01-22T12:55:36+01:00
document file to be converted. at custom_apps/onlyoffice/lib/documentservice.php line 235
0. .../documentservice.php line 94
OCA\Onlyoffice\DocumentService->ProcessConvServResponceError("-4")
1. .../lib/documentservice.php line 432
OCA\Onlyoffice\DocumentService->GetConvertedUri(
"https:\/\/nextcloud.mydomain.c ... s",
"docx",
"docx",
"check_365051401"
)
2. .../settingscontroller.php line 168
OCA\Onlyoffice\DocumentService->checkDocServiceUrl(
OC\URLGenerator {},
OCA\Onlyoffice\Crypt {}
)
3. .../Dispatcher.php line 169
OCA\Onlyoffice\Controller\SettingsController->SaveAddress(
"https:\/\/office.nex ... /",
"https:\/\/office.nex ... d",
"https:\/\/nextcloud. ... /",
false,
"",
false
)
4. .../Http/Dispatcher.php line 100
OC\AppFramework\Http\Dispatcher->executeController(
OCA\Onlyoffice\Controller\Se ... {},
"saveAddress"
)
5. lib/private/AppFramework/App.php line 152
OC\AppFramework\Http\Dispatcher->dispatch(
OCA\Onlyoffice\Controller\SettingsCon ... {},
"saveAddress"
)
6. lib/private/Route/Router.php line 309
OC\AppFramework\App::main(
"SettingsController",
"saveAddress",
OC\AppFramework\DependencyInjection\DIContainer {},
{_route:"onlyoffice.settings.save_address"}
)
7. lib/base.php line 1008
OC\Route\Router->match("\/apps\/onlyoffice\/ajax\/settings\/address")
8. index.php line 37
OC::handleRequest(
)
My traefik configuration
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: nextcloud-onlyoffice
namespace: nextcloud
labels:
app: nextcloud
tier: onlyoffice-backend
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`office.nextcloud.mydomain.com`)
middlewares:
- name: nextcloud-office
namespace: nextcloud
services:
- kind: Service
name: nextcloud-onlyoffice
port: 80
tls:
secretName: nextcloud-onlyoffice-cert
apiVersion: v1
kind: Service
metadata:
name: nextcloud-onlyoffice
namespace: nextcloud
labels:
app: nextcloud
tier: onlyoffice-backend
spec:
ports:
- port: 80
selector:
app: nextcloud
tier: onlyoffice-backend
type: ClusterIP
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: nextcloud-office
namespace: nextcloud
labels:
app: nextcloud
tier: onlyoffice-backend
spec:
headers:
accessControlMaxAge: 100
referrerPolicy: "no-referrer"
stsSeconds: 31536000
forceSTSHeader: true
stsPreload: true
stsIncludeSubdomains: true
browserXssFilter: true
customRequestHeaders:
X-Forwarded-Proto: "https"
apiVersion: apps/v1
kind: Deployment
metadata:
name: nextcloud-onlyoffice
namespace: nextcloud
labels:
app: nextcloud
tier: onlyoffice-backend
spec:
selector:
matchLabels:
app: nextcloud
tier: onlyoffice-backend
strategy:
type: Recreate
template:
metadata:
labels:
app: nextcloud
tier: onlyoffice-backend
spec:
containers:
- image: docker.io/onlyoffice/documentserver:latest
name: nextcloud-nginx
ports:
- containerPort: 80
name: onlyoffice
Extra onlyoffice config
<?php
$CONFIG = array (
'onlyoffice' =>
array (
'verify_peer_off' => true,
),
'allow_local_remote_servers' => true,
);
Thank you!
If you need anything else, please ask!