Start Failed, Internal error: recovering IDE to the working state after the critical startup error

John Doe ·

850 Views

JetBrains IDE가 갑자기 실행이 안되고 다음과 같은 에러를 뿜어댄다면?

Internal error. Please refer to http://jb.gg/ide/critical-startup-errors

java.util.concurrent.CompletionException: java.net.BindException: Address already in use: bind
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
    at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.net.BindException: Address already in use: bind
    at java.base/sun.nio.ch.Net.bind0(Native Method)
    at java.base/sun.nio.ch.Net.bind(Net.java:455)
    at java.base/sun.nio.ch.Net.bind(Net.java:447)
    at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227)
    at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:132)
    at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:551)
    at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1346)
    at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:503)
    at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:488)
    at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:985)
    at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:247)
    at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:344)
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:510)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:518)
    at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1044)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    ... 1 more

-----
JRE 11.0.5+10-b520.30 amd64 by JetBrains s.r.o
D:\Jetbrains\apps\CLion\ch-0\193.6015.37\jbr

 

1. cmd를 관리자모드로 실행

2. hyper-v 비활성화 (몇 번의 재시작이 필요함)

dism.exe /Online /Disable-Feature:Microsoft-Hyper-V

3. 필요한 모든 재시작을 완료하면 원하는 포트를 예약하여 hyper-v가 다시 예약하지 않도록 한다.

netsh int ipv4 add excludedportrange protocol=tcp startport=50051 numberofports=1

4. hyper-v를 다시 활성화 (이과정에서도 재부팅이 발생)

dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All

 

문제의 해결법을 보면 알 수 있듯이 window가 부팅하면서 JetBrains사의 IDE가 사용하는 포트를 hyper-v가 점유하여 실행이 안된 것이었다. 위처럼 hyper-v를 끄고 재시작만 수행해도 인텔리제이는 실행되었으나 hyper-v는 사용해야 하기에 추가작업을 실행하였다.

https://jb.gg/ide/critical-startup-errors

 

파이참이 실행되지 않을 땐 pycharm.bat를 실행해보자.
그러면 마찬가지로 다음과 같은 오류메시지를 통해서 정확한 원인을 알 수 있다.

java.util.concurrent.CompletionException: java.net.BindException: Address already in use: bind
		at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
		at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
		at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
		at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
		at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
		at java.base/java.security.AccessController.doPrivileged(Native Method)
		at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
		at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.net.BindException: Address already in use: bind
		at java.base/sun.nio.ch.Net.bind0(Native Method)
		at java.base/sun.nio.ch.Net.bind(Net.java:455)
		at java.base/sun.nio.ch.Net.bind(Net.java:447)
		at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227)
		at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:134)
		at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:550)
		at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334)
		at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:506)
		at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:491)
		at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973)
		at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:248)
		at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:356)
		at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
		at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
		at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
		at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
		at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
		at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
		... 1 more
-----
JRE 11.0.9+11-b1145.21 amd64 by JetBrains s.r.o.
C:\Program Files\JetBrains\PyCharm Community Edition 2020.3\jbr

 

간단히 다음 명령어 입력으로 해결할 수 있었다.

C:\WINDOWS\system32>net stop winnat
The Windows NAT Driver service was stopped successfully.

C:\WINDOWS\system32>net start winnat
The Windows NAT Driver service was started successfully.

https://intellij-support.jetbrains.com/hc/en-us/community/posts/360010020399-Pycharm-2020-3-Internal-Error-java-net-BindException-Address-already-in-use-bind-Windows-10

JetBrains PyCharm