打开pycharm出现异常:io.netty.channel.ChannelException

具体异常如下:

io.netty.channel.ChannelException: Unable to create Channel from class class io.netty.channel.socket.oio.OioServerSocketChannel
    at io.netty.channel.ReflectiveChannelFactory.newChannel(ReflectiveChannelFactory.java:40)
    at io.netty.bootstrap.AbstractBootstrap.initAndRegister(AbstractBootstrap.java:321)
    at io.netty.bootstrap.AbstractBootstrap.doBind(AbstractBootstrap.java:283)
    at io.netty.bootstrap.AbstractBootstrap.bind(AbstractBootstrap.java:279)
    at io.netty.bootstrap.AbstractBootstrap.bind(AbstractBootstrap.java:268)
    at org.jetbrains.io.BuiltInServer.bind(BuiltInServer.java:149)
    at org.jetbrains.io.BuiltInServer.start(BuiltInServer.java:118)
    at org.jetbrains.io.BuiltInServer.startNioOrOio(BuiltInServer.java:105)
    at com.intellij.idea.SocketLock.lambda$lock$2(SocketLock.java:153)
    at com.intellij.idea.SocketLock.underLocks(SocketLock.java:181)
    at com.intellij.idea.SocketLock.lock(SocketLock.java:128)
    at com.intellij.idea.StartupUtil.lockSystemFolders(StartupUtil.java:287)
    at com.intellij.idea.StartupUtil.prepareAndStart(StartupUtil.java:123)
    at com.intellij.idea.MainImpl.start(MainImpl.java:34)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.ide.plugins.PluginManager.lambda$start$0(PluginManager.java:96)
    at java.lang.Thread.run(Thread.java:745)
Caused by: io.netty.channel.ChannelException: Failed to set the server socket timeout.
    at io.netty.channel.socket.oio.OioServerSocketChannel.(OioServerSocketChannel.java:85)
    at io.netty.channel.socket.oio.OioServerSocketChannel.(OioServerSocketChannel.java:66)
    at sun.reflect.GeneratedConstructorAccessor1.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at io.netty.channel.ReflectiveChannelFactory.newChannel(ReflectiveChannelFactory.java:38)
    ... 19 more
Caused by: java.net.SocketException: Unrecognized Windows Sockets error: 87: create
    at java.net.ServerSocket.createImpl(ServerSocket.java:307)
    at java.net.ServerSocket.getImpl(ServerSocket.java:257)
    at java.net.ServerSocket.setSoTimeout(ServerSocket.java:652)
    at io.netty.channel.socket.oio.OioServerSocketChannel.(OioServerSocketChannel.java:82)

    ... 25 more


解决方法如下:

    打开命令提示符,

    输入 netsh winsock reset 这个命令,

    最后重启电脑

你可能感兴趣的:(学习笔记)