Sonarqube启动不了,异常提示:远程主机强迫关闭了一个现有的连接

Sonar.log的日志查看:
java.io.IOException: 远程主机强迫关闭了一个现有的连接。
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDirectByteBuf.java:433)
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132)
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:656)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:591)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:508)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:470)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
at java.lang.Thread.run(Unknown Source)
2020.12.02 14:01:58 WARN app[][o.e.t.TcpTransport] exception caught on transport layer [Netty4TcpChannel{localAddress=/127.0.0.1:50116, remoteAddress=/127.0.0.1:9001}], closing connection

百度一下发现给出的方案
1.端口号被占用
用cmd查了,本地的9000端口没有被占用
2.检查配置文件
在配置文件sonar.properties里的数据库名改为你创建的数据库名,并在mysql字段结尾添加?&useSSL=false
在这里插入图片描述

3.结束任务管理器中的Java进程
在这里插入图片描述

4.根据sonar.properties里面的注释,mysql版本不能低于5.6,另外如果联接数据库的帐号密码错误,也会报这个错。

再次检查一下都没问题我用的是mysql5.7,数据库的账号和密码也没有问题

没道理呀!前几天是跑起来的,为什么今天不行了
重启计算机,删除数据库操作一下,还是不行

回想一下最近做了啥操作,好像下载了sonar-l10n-zh-plugin-8.5.jar放到了C:\Sonar\sonarqube-7.7\extensions\plugins目录下,这个是一个汉化的文件,删除一下,清空日志和sonar数据库,重新启动一下,成功了(唉,还是谷歌浏览器自带的翻译“香”)

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_42874924/article/details/110483755