IT박스

힘내 bash 오류 : 자식 프로세스를 포크 할 수 없습니다 : 사용 가능한 터미널이 없습니다 (-1)

itboxs 2020. 7. 5. 08:15
반응형

힘내 bash 오류 : 자식 프로세스를 포크 할 수 없습니다 : 사용 가능한 터미널이 없습니다 (-1)


이전에 동시에 최대 8 개의 git bash 터미널을 실행했습니다.

현재 저는 2 명 밖에 없습니다.

나는이 오류를 전에 보지 못했으며 무엇이 원인인지 이해하지 못합니다.

도움을 주시면 감사하겠습니다!

첨부 된 사진 :

여기에 이미지 설명을 입력하십시오


https://groups.google.com/forum/#!topic/git-for-windows/EO27WWvHx64 에서 비슷한 문제와 가능한 해결책을 찾았습니다.

너희들이 여전히 이것에 문제가 있는지 확실하지 않지만, 나에게 도움이되는 매우 간단한 해결책을 발견했다. Windows 명령 프롬프트를 열고 $ tasklist 명령을 실행했습니다.

마치 git bash 쉘에서 만든 ssh 연결이 해당 창을 닫을 때 닫히지 않았고 사용 가능한 git bash 쉘 창에 매달려있는 것처럼 보입니다.

이것은 위험한 해결책 일 수 있지만 Windows 명령 프롬프트에서 $ taskkill / F / IM ssh.exe를 실행했습니다.

이 후 모든 것이 다시 작동하는 것으로 보입니다. 고아 프로세스의 문제가 아니었을 수도 있지만 적어도 나에게는 효과가있었습니다. 행운을 빕니다!


종료를 사용하지 않고 git bash 콘솔을 종료하면 git bash의 창에 문제가 있습니다. 문제를 해결하기 위해 Windows 작업 관리자에서 ssh-agent.exe 작업을 종료하는 것을 발견했습니다.


해결 방법으로이 문제를 해결합니다.

  1. 힘내 배쉬 창을 닫습니다.
  2. 작업 관리자를 엽니 다.
  3. 'Git for Windows'프로세스를 찾으십시오.
  4. 죽여.
  5. Git Bash를 엽니 다.

이제 괜찮을거야.


컴퓨터를 다시 시작하십시오.

(다른 답변은 나를 위해 작동하지 않았습니다. (다시 설치하지 않았습니다. 다시 시작하는 것이 더 빠릅니다.)


나 (또는 ​​독립 실행 형 Selenium / WebDriver 서버를 가동시킬 수있는 각도기를 실행하는 사람) 에게는 테스트를 실행 taskkill하는 특정 웹 드라이버필요했습니다 .

따라서 다른 주장 : 또는 chromedriver 버전 이 다를 수 있습니다.

taskkill /f /im chromedriver_2.34.exe

당신의 참고 드라이버는 달라질 수 있습니다 : IEDriverServer*.*.*.exechromedriver_*.**exe

귀하의 드라이버 5 월의 버전이 다를 수 있습니다 : chromedriver_2.34.exechromedriver_2.33.exe

이 문제는 자동 / 테스트 기반 브라우저를 닫지 않고 각도기 종료 후 나빠졌습니다 (아직 이해하지 못하는 별도의 문제로 인해). 당연히 많은 chromedriver작업이 계속 실행되어 종료됩니다.


작업 관리자를 열고 bash라는 이름으로 프로세스를 종료하십시오.


This happens when you exit git bash without terminating existing process. Just try and kill those processes that you started from git bash. I was running node process inside git bash, so I killed all node processes Steps to kill

  1. Open Task Manager
  2. Goto Details Tab
  3. Look for node.exe(you look for you processes)
  4. Kill it each and every node process
  5. Open Git Bash again

To make life easier (this problems happens quite often) create a file called fixbash.bat in home directory and paste this:

taskkill /F /IM ssh-agent.exe

When problem occurs just open cmd and type fixbash.bat to fix a problem.

Or

Just paste the taskkill command into your cmd if you don't want to create a script.


Seems to be an issue with the processes launched from the git bash indeed, like @mamacdon suggested in his comment on the top answer by @Scott Newson.

For me, the issue appeared if I launched a vscode from the bash with code, and if this instance of vscode launched an integrated git terminal while the original bash was still running.

Doesn't matter whether that terminal was launched at the start or later, as long as it was while the original bash was still running.

Didn't happen when the bash was closed before the integrated terminal was opened. Didn't differentiate between exit and closing bash via windows. Didn't happen with another older bash window still running.

The way to deal with it was for me to close the terminals in vscode with exit or 'Kill Terminal' (be careful not to mix that up with 'close pane'), or of course, closing vscode itself.

If you get this error try to remember what you launched from the bash and kill it. If the other answers worked for you, it's probably just that these are the things launched by your bash or launched by processes you launched from the bash and they somehow were getting a child of your original bash.


finally figured out what was causing this.

if we use code like this (explicitly or implicitly) i.e. in .bashrc file

eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa

it spawns a new process.

if you don't exit it and just close the window, that process is still running. so each new bash opened just keeps adding new ones w/out disposing old ones.

when done with a bash window, simply hit ctrl+d or type exit to kill the agent process, and you should not run out of forks.


Open your Task manager, search "sh" procces and kill them. Good luck


If you are using Visual Studio Code and you can't find ssh-agent.exe or can't taskkill it and after opening Git Bash you get that error, just go to your VSCode open Terminal>New Terminal and just press the trashbin icon the (Kill Terminal). e.g (1:bash) if you got multiple then just kill them all and you should be good.


I tried to kill all my git terminals in task manager solves the problem. This works for me too. good luck.


On a more recent version of git for windows, the process to kill in task manager was "GitExtensions.exe". Killed that and the terminals restarted with no issues.


Please find the ssh-agent process in the Task Manager window. After you stop or kill the ssh-agent process the error will disappear.


In my case, it was related with the use of VS code. Previously I have openen VS code using a git bash terminal and executing

code .

then closing the terminal.

The problem is solved by closing all the VS code windows opened.


Reinstalled git, it is now working fine.


In my case I had visual studio code running and closing it resolved the issue.


Windows 10 this worked for me:

1) open cmd as administrator

2) type:

taskkill /f /im git-bash.exe


3) If there was an Error: The process "ssh-agent.exe" not found. then:

type:

tasklist

4) Find and kill every process with words like "bash" or "git" (This may be a dangerous solution, but once you will find the process name, next time you will know.)

taskkill /f /im ***.exe

i found that killing msys2 terminal in task manager solves the problem


Open Task manager, find bash.exe process and kill it. Helped in my case.


In system bash type:

ps

Kill any bad looking process:

kill -9 <ID>

나를 위해 일했다.


컴퓨터를 다시 시작하십시오. 컴퓨터를 다시 시작하는 동안이 문제가 해결되었습니다.

참고 URL : https://stackoverflow.com/questions/45799650/git-bash-error-could-not-fork-child-process-there-are-no-available-terminals

반응형