Could not request local forwarding

Hi,
I am trying to do the port forwarding from cryosparc master node to a local machine where I want use port 39000 in local machine browser.
I used the following command:
ssh -N -f -L localhost:39000:localhost:39000 shashi@ipaddr
and I got the error:
bind [127.0.0.1]:39000: Address already in use
channel_setup_fwd_listener_tcpip: cannot listen to port: 39000
Could not request local forwarding.

Please provide me the information.

Thanks in anticipation.

I tried again to forward the port 39000 from master node to local machine, but when I used to navigate through http://localhost:39000, I got the followings error

please let me know how to resolve this error.

Please can you confirm that

  • you ran this command on the computer
    • on which you want to run the web browser, but
    • other than the CryoSPARC computer
  • ipaddr refers to the ip address of the CryoSPARC computer and that computer has an account with username sashi

suggests that you previously ran this command on this computer and the process is still alive. You may have to search for the corresponding process(es) and terminate them. While experimenting with port forwarding, you may want to omit the
ssh -f option to make it easier to find and terminate such processes.

@wtempel I ran this command on the local machine browser. shashi@ipaddr is the username and ip address of the local machine where I want to use cryosparc web interface.

I recommend the following definitions for the purpose of this topic:
host b: The computer on which you run the web browser to access the CryoSPARC UI.
host c: The computer on which cryosparc_master/ software was installed and is running.
userc: Is a Linux user that has ssh access on host c
ipaddrc: The IP address of host c.

If host b and host c are the same computer, port forwarding is not needed; you can access the CryoSPARC UI by pointing your browser to http://localhost:39000.

If host b and host c are different, you would run, on host b

ssh -L 62222:localhost:39000 userc@ipaddrc

and point your browser to http://localhost:62222. This example ssh command deliberately forwards a port with a different number from the UI port on host c, to avoid confusion and conflicts.
You will not be able to access the UI using either method if app is not running, as it is not in Problem with Cryosparc - #13 by shashi.

Thanks for the reply. But app is not running? It still shows, “App is EXITED”. Can you please help in resolving the issue?

@wtempel
I am trying to connect to cryosparc web interface remotely, but I got the following error:

ssh -L 62222:localhost:39000 chunli@10.51.99.109
chunli@10.51.99.109’s password:
bind: Address already in use
channel_setup_fwd_listener_tcpip: cannot listen to port: 62222
Could not request local forwarding.
Activate the web console with: systemctl enable --now cockpit.socket

Can you please help me in this?

is the same error as in your first post, involving a different port on the computer where the web browser is running (host b as defined in Could not request local forwarding - #5 by wtempel).
A possible reason may be that local port forwarding has been previously initiated with this port and may still be ongoing. To confirm, you may want to search for processes on host b that use port 62222. The specific search method depends on the type of OS running on host b.
If you find that port 62222 of host b is already in use for some other reason and you do not wish to terminate the associated process, you could try forwarding an alternative unused local port from host b. For example, if port 62223 is not already in use, you can forward the port like this

ssh -L 62223:localhost:39000 userc@ipaddrc

and point your browser to http://localhost:62223.

I have centOS. Can you tell me the commands to find the processes running with port 62222?

You could try the commands

sudo lsof -i :62222
ps -eo pid,start,command | grep 3900

thank for the information.