H
Homarr11mo ago
Ash

Internal Server Error (ERR_INVALID_URL)

I have installed homarr into Kubernetes with the following config.
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: homarr
namespace: infra
spec:
replicas: 1
selector:
matchLabels:
app: homarr
serviceName: homarr
template:
metadata:
labels:
app: homarr
spec:
containers:
- image: ghcr.io/ajnart/homarr:latest
name: homarr
ports:
- containerPort: 7575
name: homarr
volumeMounts:
- mountPath: "/app/data/configs"
name: config
- mountPath: "/app/public/icons"
name: icons
- mountPath: "/data"
name: data
terminationGracePeriodSeconds: 10
volumeClaimTemplates:
- metadata:
name: config
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100M
storageClassName: vsan-compute
volumeMode: Filesystem
- truncated due to discord limits: ...
---
apiVersion: v1
kind: Service
metadata:
annotations: {}
name: homarr
namespace: infra
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 7575
selector:
app: homarr
type: LoadBalancer
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: homarr
namespace: infra
spec:
replicas: 1
selector:
matchLabels:
app: homarr
serviceName: homarr
template:
metadata:
labels:
app: homarr
spec:
containers:
- image: ghcr.io/ajnart/homarr:latest
name: homarr
ports:
- containerPort: 7575
name: homarr
volumeMounts:
- mountPath: "/app/data/configs"
name: config
- mountPath: "/app/public/icons"
name: icons
- mountPath: "/data"
name: data
terminationGracePeriodSeconds: 10
volumeClaimTemplates:
- metadata:
name: config
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100M
storageClassName: vsan-compute
volumeMode: Filesystem
- truncated due to discord limits: ...
---
apiVersion: v1
kind: Service
metadata:
annotations: {}
name: homarr
namespace: infra
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 7575
selector:
app: homarr
type: LoadBalancer
Visiting http://homarr.infra.local => Internal Server Error
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:399:5)
...
at require (node:internal/modules/helpers:121:18) {
input: 'http://:7575',
code: 'ERR_INVALID_URL'
}
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:399:5)
...
at require (node:internal/modules/helpers:121:18) {
input: 'http://:7575',
code: 'ERR_INVALID_URL'
}
I have tried forwarding the port to my local, and I get the same issue.
18 Replies
Manicraft1001
Manicraft100111mo ago
Please post the full deployment. Discord will upload it as a file
Ash
AshOP11mo ago
the only extra is more of the volume claim templates
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: homarr
namespace: infra
spec:
replicas: 1
selector:
matchLabels:
app: homarr
serviceName: homarr
template:
metadata:
labels:
app: homarr
spec:
containers:
- image: ghcr.io/ajnart/homarr:latest
name: homarr
ports:
- containerPort: 7575
name: homarr
volumeMounts:
- mountPath: "/app/data/configs"
name: config
- mountPath: "/app/public/icons"
name: icons
- mountPath: "/data"
name: data
terminationGracePeriodSeconds: 10
volumeClaimTemplates:
- metadata:
name: config
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100M
storageClassName: vsan-compute
volumeMode: Filesystem
- metadata:
name: icons
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100M
storageClassName: vsan-compute
volumeMode: Filesystem
- metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100M
storageClassName: vsan-compute
volumeMode: Filesystem
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: homarr
namespace: infra
spec:
replicas: 1
selector:
matchLabels:
app: homarr
serviceName: homarr
template:
metadata:
labels:
app: homarr
spec:
containers:
- image: ghcr.io/ajnart/homarr:latest
name: homarr
ports:
- containerPort: 7575
name: homarr
volumeMounts:
- mountPath: "/app/data/configs"
name: config
- mountPath: "/app/public/icons"
name: icons
- mountPath: "/data"
name: data
terminationGracePeriodSeconds: 10
volumeClaimTemplates:
- metadata:
name: config
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100M
storageClassName: vsan-compute
volumeMode: Filesystem
- metadata:
name: icons
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100M
storageClassName: vsan-compute
volumeMode: Filesystem
- metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100M
storageClassName: vsan-compute
volumeMode: Filesystem
Manicraft1001
Manicraft100111mo ago
Can you try setting NEXTAUTH_URL env?
Ash
AshOP11mo ago
to what value?
Manicraft1001
Manicraft100111mo ago
Your base URL
Ash
AshOP11mo ago
sure also fyi; it does redirect from / to /board after setting the env it has the same issue
Ash
AshOP11mo ago
No description
Manicraft1001
Manicraft100111mo ago
@Meierschlumpf is this the relative redirect in the middleware or next auth?
Ash
AshOP11mo ago
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:399:5)
at new URL (node:internal/url:743:13)
at parseUrl (/app/node_modules/next-auth/utils/parse-url.js:17:16)
at Object.<anonymous> (/app/node_modules/next-auth/react/index.js:74:40)
at Module._compile (node:internal/modules/cjs/loader:1255:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1309:10)
at Module.load (node:internal/modules/cjs/loader:1113:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1137:19)
at require (node:internal/modules/helpers:121:18) {
input: 'http://:7575',
code: 'ERR_INVALID_URL'
}
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:399:5)
at new URL (node:internal/url:743:13)
at parseUrl (/app/node_modules/next-auth/utils/parse-url.js:17:16)
at Object.<anonymous> (/app/node_modules/next-auth/react/index.js:74:40)
at Module._compile (node:internal/modules/cjs/loader:1255:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1309:10)
at Module.load (node:internal/modules/cjs/loader:1113:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1137:19)
at require (node:internal/modules/helpers:121:18) {
input: 'http://:7575',
code: 'ERR_INVALID_URL'
}
root@homarr-0:/# echo $NEXTAUTH_URL
http://homarr.svc
root@homarr-0:/# echo $NEXTAUTH_URL
http://homarr.svc
Ash
AshOP11mo ago
No description
Ash
AshOP11mo ago
how would i tell?
Manicraft1001
Manicraft100111mo ago
This is not a question for you. Please wait until Meier replies
Ash
AshOP11mo ago
no probs; let me know if you need anything more from my side
Serenaphic
Serenaphic11mo ago
I don't know if this could help self diagnose in the meantime: https://github.com/truecharts/charts/tree/master/charts/stable/homarr This is truechart's homarr implementation for kubernetes systems. Maybe you can find a hint in there somewhere
Ash
AshOP11mo ago
i did read through the chart and compare to my deployment but didnt see anything that really stuck out; thnx though i could try the image tag mentioned in it though same issue also trying within the cluster from pod to pod (not using loadbalancer) i have the same issue
curl http://10.244.2.253:7575/board -vv
* Trying 10.244.2.253:7575...
* Connected to 10.244.2.253 (10.244.2.253) port 7575
> GET /board HTTP/1.1
> Host: 10.244.2.253:7575
> User-Agent: curl/8.5.0
> Accept: */*
>
< HTTP/1.1 500 Internal Server Error
< cache-control: no-cache, no-store, max-age=0, must-revalidate
< content-length: 21
< content-type: text/html; charset=utf-8
< date: Tue, 30 Jan 2024 10:33:52 GMT
< etag: "66fci67lppl"
< vary: Accept-Encoding
< x-powered-by: Next.js
< connection: close
<
* Closing connection
Internal Server Error
curl http://10.244.2.253:7575/board -vv
* Trying 10.244.2.253:7575...
* Connected to 10.244.2.253 (10.244.2.253) port 7575
> GET /board HTTP/1.1
> Host: 10.244.2.253:7575
> User-Agent: curl/8.5.0
> Accept: */*
>
< HTTP/1.1 500 Internal Server Error
< cache-control: no-cache, no-store, max-age=0, must-revalidate
< content-length: 21
< content-type: text/html; charset=utf-8
< date: Tue, 30 Jan 2024 10:33:52 GMT
< etag: "66fci67lppl"
< vary: Accept-Encoding
< x-powered-by: Next.js
< connection: close
<
* Closing connection
Internal Server Error
and log from pod
Error [TRPCClientError]: Unexpected token 'I', "Internal S"... is not valid JSON
at TRPCClientError.from (file:///app/.next/server/src/middleware.js:1729:16)
at <unknown> (file:///app/.next/server/src/middleware.js:2069:36)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:399:5)
at new URL (node:internal/url:743:13)
at parseUrl (/app/node_modules/next-auth/utils/parse-url.js:17:16)
at Object.<anonymous> (/app/node_modules/next-auth/react/index.js:74:40)
at Module._compile (node:internal/modules/cjs/loader:1255:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1309:10)
at Module.load (node:internal/modules/cjs/loader:1113:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1137:19)
at require (node:internal/modules/helpers:121:18) {
input: 'http://:7575',
code: 'ERR_INVALID_URL'
}
Error [TRPCClientError]: Unexpected token 'I', "Internal S"... is not valid JSON
at TRPCClientError.from (file:///app/.next/server/src/middleware.js:1729:16)
at <unknown> (file:///app/.next/server/src/middleware.js:2069:36)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:399:5)
at new URL (node:internal/url:743:13)
at parseUrl (/app/node_modules/next-auth/utils/parse-url.js:17:16)
at Object.<anonymous> (/app/node_modules/next-auth/react/index.js:74:40)
at Module._compile (node:internal/modules/cjs/loader:1255:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1309:10)
at Module.load (node:internal/modules/cjs/loader:1113:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1137:19)
at require (node:internal/modules/helpers:121:18) {
input: 'http://:7575',
code: 'ERR_INVALID_URL'
}
Meierschlumpf
Meierschlumpf11mo ago
there shouldn't be a redirect afaik
Manicraft1001
Manicraft100111mo ago
Do you have an idea what else we could test? And the onboarding redirect isn't a problem you think?
Ash
AshOP11mo ago
I would guess this is what it is? can i put a config in that would skip it? or a different url to try that would load it differently? i guess not since its a PWA
Want results from more Discord servers?
Add your server