-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
(Bug report) ERR_SOCKET_BAD_PORT - port set to NaN on server start #3177
Comments
Hi, I don't think there's a regression, but I noticed a small behavior change - in 0.54.X and earlier, if there was an invalid value passed to |
Hi Zadam, upon investigation this is indeed the issue. As per the Kubernetes documentation, Kubernetes sets an environment variable for all service information in the namespace which includes addresses and, importantly, ports for all other services for discovery purposes. These env variables take the name of the deployment, which I naturally called I tested setting the env in the manifest to see if it would override it:
Which it did: And this has resolved the issue: Thanks for your help pointing that out. I suppose the lesson is that if you are using Kubernetes and set your deployment name to just Thanks again. |
Thanks to both of you. I noticed the same issue but wasn't able to figure it out since I didn't have that much time to debug it. Setting the env variable directly fixed it for me. I totally forgot that Kubernetes injects a lot of environment variables for service discovery, so yes, that makes sense why Trilium stopped working and posted that weird error in the log. Thanks again :) |
Trilium Version
0.55.1
What operating system are you using?
Ubuntu
What is your setup?
Local + server sync
Operating System Version
Linux instance-20220813-1544 5.15.0-1017-oracle #22~20.04.1-Ubuntu SMP Wed Aug 24 11:13:15 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
Description
I run Trilium on an Ubuntu box through Kubernetes with manually defined manifests (not Helm). This box is ARM64. Today I tried to upgrade from v0.50.1 to v0.55.1.
When starting the server on version v0.55.1, the server starts up with port NaN, despite the port being clearly defined in the config.ini file. I downgraded to v0.54.3, and it works as intended. Something about v0.55.1 is breaking it's ability to successfully get the port from my config.ini.
Container log snippet:
The text was updated successfully, but these errors were encountered: