From my laptop, I am making ssh connection to remote linux box, where my cylc is running. I am displaying cylc workflow gui using my browser on laptop instead of browser of linux, which I think is default. This setup was working for a few days, but stopped working now. I can login to linux box from windows terminal Ok without asking password, it implies my ssh setup is OK. Any idea?
$ ssh -L 12345:127.0.0.1:12345 linux_box #...connect to linux box from laptop
$ cylc gui --port=12345 --no-browser # ...starts cylc gui
# cntl-clicking on link
http://127.0.0.1:8888/cylc?token=dfdec827176eb03a88f85d20219e7204f4176a0a5f60553b
# ...it does not open page in browser of laptop
# Getting following in std output of cylc gui command:
[I 2026-05-12 14:35:22.870 CylcUIServer] [data-store] register_workflow('~bap001/ex8_workflow/run1', False)
channel 3: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
@bpabla50 - in future posts perhaps you could use some markdown formatting for readability? (So forum admins don’t need to do it for you).
From the information you gave, the GUI did not start on the port you tunneled to.
I’m not sure if you didn’t post the exact commands you used and the results of them, or if something else went wrong - because cylc gui --port=12345 should not result in the GUI starting on port 8888.
By default the cylc gui command will try a different port if the specified port is in use.
I suggest using a command alias like this
alias linux_box-cylc-gui='PORT=$(shuf -i 10000-65000 -n 1); ssh -t -L ${PORT}:localhost:${PORT} linux_box "cylc gui --no-browser --Application.log_level=WARN --port-retries=0 --port=${PORT}"'
This chooses a port at random to reduce the risk of clashing with another user.
It also uses the --port-retries=0 option so that the command will fail if the chosen port is unavailable.
(In that case you’ll need to create the tunnel after starting the GUI and noting the port it chooses).
(Sorry, I didn’t read @dpmatthews comment properly - his alias handles port choice and tunneling)
Thanks @dpmatthews and @hilary.j.oliver .
It worked. My apologies for not formatting the issue. I will use markdown language onwards to reformat e.g three backward quotes for code etc. Just curious, is this interface has preview button so that one can see the contents before posting.
Unless I did not understand fully, it all can not be handled with single alias as above. Windows terminal don’t have shuf command. I ended up opening two terminals on windows laptop. In first window, I executed “ssh -Y linux box”,and ran alias cylc_giveport. Then ran alias cylc_startgui. Once I know the port number on remote, in second window I ran alias cylic_maketunnel.
```
alias cylc_giveport='export PORT=$(shuf -i 10000-65000 -n 1); echo “Port given: $PORT” ’
alias cylc_startgui='pixi run cylc gui --no-browser --Application.log_level=WARN --port-retries=0 --port=${PORT} ’
alias cylic_maketunnel='ssh -t -L ${PORT_LOCAL}:localhost:${PORT_REMOTE} ’
You can still use a single alias. Just choose a fixed port - it should always work unless another user happens to choose the same port.
When editing a post you can switch between the “rich text editor” and the “markdown editor” (which gives you a preview) using the button on the left in the menu.