mirror of
https://github.com/TriliumNext/Trilium.git
synced 2025-12-10 03:53:37 -06:00
Trilium cant be started, complaints about port #3886
Open
opened 2025-10-01 16:34:47 -05:00 by giteasync
·
14 comments
No Branch/Tag Specified
main
feature/new_layout_improvements
feat/improve-docs-take1
bugfix/title-color-in-note-tree
stable
feat/rice-searching-with-sqlite
feat/persistant-tray
migrate_pageurl
feat/push-to-wiki-when-docs-change
feat/redo-llm-feature-take2
weblate-trilium-client
kev/share-html
feat/website/improvements
fix/mkdocs-take-2
feature/dx
fix/try-to-fix-swaggerui-api-pages
feat/add-ckeditor-plugin-options
feat/improve-docs
feat/add-websocket-docs
feat/llm-tool-improvement
feat/better-image-viewer
feature/electron-builder
feat/add-ocr-capabilities
feature/fs_sync
renovate/csrf-csrf-4.x
algolia_v1
v0.100.0
v0.99.5
v0.99.4
v0.99.3
v0.99.2
v0.99.1
v0.99.0
v0.98.1
v0.98.0
v0.97.2
v0.97.1
v0.97.0
v0.96.0
v0.95.0
v0.94.1
v0.94.0
v0.93.0
v0.92.7
v0.92.6
v0.92.5-beta
v0.92.4
v0.92.3-beta
v0.92.2-beta
v0.92.1-beta
v0.92.0-beta
v0.91.6
v0.91.5
v0.91.4-rc1
v0.91.4-beta
v0.91.3-beta
v0.91.2-beta
v0.91.1-beta
v0.90.12
v0.90.11-beta
v0.90.10-beta
v0.90.9-beta
v0.90.8
v0.90.7-beta
nightly
v0.90.6-beta
v0.90.5-beta
v0.90.4
v0.90.3
v0.90.2-beta
v0.90.1-beta
v0.90.0-beta
v0.63.7
v0.63.6
v0.63.5
v0.63.4
v0.63.3
v0.63.2-beta
v0.62.6
v0.63.1.1-beta
v0.63.1-beta
v0.62.5
v0.63.0-beta
v0.62.4
v0.62.3
v0.62.2
v0.61.15
v0.61.14
v0.62.1-beta
v0.62.0-beta
v0.61.13
v0.61.12
v0.61.11
v0.61.10-beta
v0.61.9-beta
v0.61.8-beta
v0.61.7-beta
v0.61.6-beta
v0.61.5-beta
v0.61.4-beta
v0.61.3-beta
v0.61.2-beta
v0.61.1-beta
v0.61.0-beta
v0.60.4
v0.60.3
v0.60.2-beta
v0.60.1-beta
v0.60.0-beta
v0.59.4
v0.59.3
v0.59.2
v0.59.1
v0.59.0-beta
v0.58.8
v0.58.7
v0.58.6
v0.58.5
v0.58.4
v0.58.3-beta
v0.58.2-beta
v0.58.1-beta
v0.58.0-beta
v0.57.5
v0.57.4
v0.57.3
v0.57.2
v0.57.1-beta
v0.57.0-beta
v0.56.2
v0.56.1
v0.56.0-beta
v0.55.1
v0.55.0-beta
v0.54.3
v0.54.2
v0.54.1-beta
v0.54.0-beta
v0.53.2
v0.53.1-beta
v0.52.4
v0.53.0-beta
v0.52.3
v0.52.2
v0.52.1-beta
v0.52.0-beta
v0.51.2
v0.51.1-beta
v0.51.0-beta
v0.50.3
v0.50.2
v0.50.1
v0.50.0-beta
v0.49.5
v0.49.4
v0.49.3
v0.49.2-beta
v0.49.1-beta
v0.49.0-beta
v0.48.9
v0.48.8
v0.48.7
v0.48.6-docker
v0.48.6.1
v0.48.6
v0.48.5
v0.48.4
v0.48.3
v0.48.2
v0.48.1-beta
v0.48.0-beta
v0.47.8
v0.47.7
v0.47.6
v0.47.5
v0.47.4
v0.47.3
v0.47.2
v0.46.9
v0.47.1-beta
v0.46.8
v0.47.0-beta
v0.46.7
v0.46.6
v0.46.5
v0.46.4-beta
v0.46.3-beta
v0.46.2-beta
v0.46.1-beta
v0.46.0-beta
v0.45.10
v0.45.9
v0.45.8
v0.45.7
v0.45.6
v0.45.5
v0.45.4
v0.45.3
v0.45.2
v0.45.1
v0.45.0-beta
v0.44.9
v0.44.8
v0.44.7
v0.44.6
v0.44.5
v0.44.4
v0.44.3-beta
v0.44.2-beta
v0.44.1-beta
v0.44.0-beta
v0.43.4
v0.43.3
v0.43.2
v0.43.1
v0.43.0-beta
v0.42.7
v0.42.6
v0.42.5
v0.42.4
v0.42.3
v0.42.2
v0.42.1
v0.42.0-beta
v0.41.6
v0.41.5
v0.41.4-beta
0.41.3
v0.41.3-beta
v0.41.2-beta
v0.41.1-beta
v0.41.0-beta
v0.40.7
v0.40.6
v0.40.5
v0.40.4
v0.40.3
v0.40.2
v0.40.1
v0.39.6
v0.40.0-beta
v0.39.5
v0.39.4
v0.39.3
v0.39.2-beta
v0.39.1-beta
v0.39.0-beta
v0.38.3
v0.38.2
v0.38.1-beta
v0.38.0-beta
v0.37.8
v0.37.7
v0.37.6
v0.37.5
v0.37.4
v0.37.3
v0.37.2
v0.37.1-beta
v0.37.0-beta
v0.36.5
v0.36.4
v0.36.3
v0.36.2
v0.36.1-beta
v0.36.0-beta
v0.35.2
v0.35.1
v0.35.0-beta
v0.34.3
v0.34.2
v0.34.1
v0.34.0-beta
v0.33.7
v0.33.6
v0.33.5
v0.33.4
v0.33.3
v0.33.2-beta
v0.33.1-beta
v0.33.0-beta
v0.32.4
v0.32.3
v0.32.2-beta
v0.32.1-beta
v0.32.0-beta
v0.31.6
v0.31.5
v0.31.4
v0.31.3
v0.31.2-beta
v0.30.8
v0.31.1-beta
v0.31.0-beta
v0.30.7
v0.30.6
v0.30.5
v0.30.4
v0.30.3-beta
v0.30.2-beta
v0.30.1-beta
v0.30.0-beta
v0.29.1
v0.29.0-beta
v0.28.3
v0.28.2
v0.28.1-beta
v0.28.0-beta
v0.27.4
v0.27.3
v0.27.2-beta
v0.27.1-beta
v0.27.0-beta
v0.26.1
v0.26.0-beta
v0.25.2
v0.25.1-beta
v0.25.0-beta
v0.24.5
v0.24.4-beta
v0.24.3-beta
v0.24.2-beta
v0.24.1-beta
v0.24.0-beta
v0.23.1
v0.23.0
v0.22.1
v0.22.0
v0.21.0
v0.20.2
v0.20.1
v0.20.0
v0.19.1
v0.19.0
v0.18.0
v0.17.0
v0.16.0
v0.15.0
v0.14.1
v0.14.0
v0.13.0-beta
v0.12.0
v0.11.1
v0.11.0-beta
v0.10.2-beta
v0.10.1-beta
v0.10.0-beta
v0.9.2
v0.9.1-beta
v0.9.0-beta
v0.8.1
v0.8.0-beta
v0.7.0-beta
v0.6.2
v0.6.1
v0.6.0-beta
v0.5.6
v0.5.5-beta
v0.5.4-beta
v0.5.3-beta
v0.5.2-beta
v0.5.1-beta
v0.5.0-beta
v0.4.1
v0.4.0-beta
v0.3.3
v0.3.2
v0.3.1
v0.3.0
v0.2.2
v0.2.1
v0.2.0
v0.1.2
v0.1.1
v0.1.0
v0.0.11
v0.0.10
v0.0.9
Labels
Clear labels
BE
Difficulty: Easy
Difficulty: Hard
Difficulty: Hard
State: Blocked
State: Outdated
State: Triage
State: Triage
State: Under Debate
Type: Documentation
Type: Scripts & Themes
UI
UI
UI
awaiting feedback
ckeditor
container
dependencies
desktop-app
downstream
effort-high
effort-low
effort-medium
geo-map
llm
mermaid diagrams
mobile
ported-issues
pull-request
Mirrored from GitHub Pull Request
question
refactor
regression
scripting
search
search
sync
upstream
web-clipper
No Label
Difficulty: Easy
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: TriliumNext/Trilium#3886
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gerroon on GitHub.
I do not remember having this issue before. Apperantly Firefox is using this port so not much I can do about this. Any way to change this?
trilium Generated sourceId=gRy91BDToB3T Port 37840 is already in use@gerroon commented on GitHub:
I actually checked processes and Trilium wsa not running prior to starting it.
@zadam commented on GitHub:
This typically happens when Trilium did not correctly exit and thus still occupies this port - #778
@zadam commented on GitHub:
Fixed port is used because web clipper needs to find trilium on an expected port. There is no fallback yet since this is the first time this happened (at least as far as I'm aware).
@gerroon commented on GitHub:
It was used by Firefox then. Would not it better it sets a random port for that time if there is a port collision?
@zadam commented on GitHub:
Well, then that's weird. You can change default port to something else by setting
TRILIUM_PORTenvironment variable.@ivosm commented on GitHub:
yes, you are completely right. I work in Konsole, so the var was still there but was not visible from the new process. I was so focused on the effect, why it magically started to work but the port wasn't changed. The second part is now clear. :-) Thanks. But the first one ...
@ivosm commented on GitHub:
problem description
Even more weird experience. (Kubuntu 20.04)
Today after long time everyday use without any change in settings, upgrade etc. T just didn't start. Trying from cmd and got:
looking netstat, it isn't used, looking processes nothing connected with T is running
so I set the env var
TRILIUM_PORT=37841start T from cmd and T works as usual
! BUT
and
So the env var
TRILIUM_PORTwas not ignored completely but did not change the port.log
may be glue can be the log (connected from end of yesterday and today)
Today until the setting of
TRILIUM_PORTthere was only one line for each start but after the setting it was identical with what I could see in console.suggestion
@abitofevrything commented on GitHub:
In Linux, if you want the variable to last more than a single command (i.e one line), you need to use the
exportdirective, likeexport TRILIUM_PORT=.... Otherwise the variable will be forgotten after the line finishes executing.@zadam commented on GitHub:
Hi,
the port is the same, it looks like the env variable was ignored - how did you set it? In Linux you can run it like:
@ivosm commented on GitHub:
sorry, I wasn't completely precise and slightly kidding.
The meaning of "TRILIUM_PORT was not ignored completely" was, that it just did the magick and T started but what was expected, the changed port didn't work at all.
Yes, there is a difference between the case when
TRILIUM_PORTis set on the same line or not. If this is on the same line, it works. If it isn't, it doesn't work.The weird behavior is, that after setting this var, it magically started to work. Why, if T ignored it (it kept the default port 37840).
I was all the time keeping in mind, that the main point is to not being able to start T and the "story" with port as a possible glue.
@ivosm commented on GitHub:
Today the same problem occurred.
netstat -lntpshows nothing BUTnetstatshows 37840 asconnectedResult: T is right, the port is really in use. FF addon is the cause.
@zadam commented on GitHub:
FF addon connects to the port as a client, in that sense it can't block it (at least AFAIK).
@FliegendeWurst commented on GitHub:
I just had this issue, and it was caused by Thunderbird (
lsofoutput):@dosubot[bot] commented on GitHub:
This is a known issue: Thunderbird (and Firefox) can use port 37840 as an ephemeral local port for outgoing connections, which blocks Trilium from binding to it as a server. This happens because Linux assigns ephemeral ports in the 32768–60999 range, and Trilium’s default port falls within that range. If Thunderbird grabs 37840 before Trilium starts, Trilium will fail with a "port already in use" error—even though no other Trilium process is running. Closing Thunderbird (or whichever app is using the port) will release it and let Trilium start normally. You can also work around this by setting a different port for Trilium using the
TRILIUM_PORTenvironment variable or editingconfig.ini, but note that the web clipper expects the default port, so changing it may affect that feature. More details and discussion are in this thread and here.To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
