FredrikNoren / ungit

The easiest way to use git. On any platform. Anywhere.
MIT License
10.43k stars 636 forks source link

Can't stop ungit from remote session after SSH broken pipe #1414

Closed aablakely closed 3 years ago

aablakely commented 4 years ago

Hi!

I am setting up ungit on a remote development server. Due to unrelated VPN/connection issues the SSH connection broke. When I reconnected and tried to rerun the "ungit" command, it says "Ungit server already running". What service should I be searching running processes for that is serving ungit? I would like to be able to kill it, or some other process-related solution, since I can no longer Ctrl-C.

(This dev server runs apache because the project is a web application. Which means I have to be able to alternate between Apache/Ungit, but I definitely need to be able to stop serving Ungit!)

TIA.

aablakely commented 4 years ago

I forgot to add I am on Linux (CentOS 7)

I was finally able to end the server (/usr/lib/node_modules/ungit/source/server.js) with the following:

  1. find the session withwho or w
  2. locate the pid for the tty with ps -ft <tty> e.g. pts/1
  3. kill <pid> e.g. kill 32255

If anyone else runs into the same issue.

jung-kim commented 3 years ago

Yes so this has nothing to do with ungit but your ssh connection disconnect causing orphaned process and the port being used up. Your approach is correct to kill the process that way.

Also, if you want you can use tmux or screen to have process run on background regardless of ssh connection