SonarQube 5.4 从 UI 重启失败 Windows

SonarQube 5.4 restart from UI failing on Windows

我在 Windows 服务器上使用本地管理员帐户安装了 SQ 5.4 运行。一直以来,从 UI 重新启动挂起,我在日志中找到以下内容。

这似乎是重启逻辑中的错误。

2016.04.06 10:42:32 INFO  web[o.s.s.p.w.RestartAction] SonarQube restart requested by admin
2016.04.06 10:42:32 INFO  app[o.s.p.m.Monitor] Process [web] requested restart
2016.04.06 10:42:32 INFO  app[o.s.p.m.Monitor] Process[web] is stopping
2016.04.06 10:42:33 INFO  web[o.s.p.StopWatcher] Stopping process
2016.04.06 10:42:33 INFO  web[o.a.c.h.Http11NioProtocol] Pausing ProtocolHandler ["http-nio-0.0.0.0-9540"]
2016.04.06 10:42:34 INFO  web[o.s.s.n.NotificationService] Notification service stopped
2016.04.06 10:42:34 INFO  web[o.a.c.h.Http11NioProtocol] Stopping ProtocolHandler ["http-nio-0.0.0.0-9540"]
2016.04.06 10:42:35 INFO  web[o.a.c.h.Http11NioProtocol] Destroying ProtocolHandler ["http-nio-0.0.0.0-9540"]
2016.04.06 10:42:35 INFO  web[o.s.s.a.TomcatAccessLog] Web server is stopped
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=160m; support was removed in 8.0
2016.04.06 10:42:35 INFO   es[o.s.p.StopWatcher]  Stopping process
2016.04.06 10:42:35 INFO   es[o.elasticsearch.node]  [sonar-1459957143004] stopping ...
2016.04.06 10:42:35 INFO  app[o.s.p.m.Monitor] Process[web] is stopped
2016.04.06 10:42:35 INFO  app[o.s.p.m.Monitor] Process[search] is stopping
2016.04.06 10:42:35 INFO   es[o.elasticsearch.node]  [sonar-1459957143004] stopped
2016.04.06 10:42:35 INFO   es[o.elasticsearch.node]  [sonar-1459957143004] closing ...
2016.04.06 10:42:35 INFO   es[o.elasticsearch.node]  [sonar-1459957143004] closed
2016.04.06 10:42:35 INFO  app[o.s.p.m.Monitor] Process[search] is stopped
2016.04.06 10:42:35 INFO  app[o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube-5.4\temp
Exception in thread "Restartor 0" java.lang.RuntimeException: Failed to reset file system
    at org.sonar.process.monitor.Monitor.resetFileSystem(Monitor.java:125)
    at org.sonar.process.monitor.Monitor.startProcesses(Monitor.java:105)
    at org.sonar.process.monitor.Monitor.access0(Monitor.java:38)
    at org.sonar.process.monitor.Monitor$RestartorThread.run(Monitor.java:282)
Caused by: java.nio.file.FileSystemException: C:\sonarqube-5.4\temp\sharedmemory: The process cannot access the file because it is being used by another process.

    at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
    at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
    at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
    at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269)
    at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
    at java.nio.file.Files.delete(Files.java:1126)
    at org.sonar.process.FileUtils$CleanDirectoryFileVisitor.visitFile(FileUtils.java:151)
    at org.sonar.process.FileUtils$CleanDirectoryFileVisitor.visitFile(FileUtils.java:135)
    at java.nio.file.Files.walkFileTree(Files.java:2670)
    at org.sonar.process.FileUtils.cleanDirectoryImpl(FileUtils.java:123)
    at org.sonar.process.FileUtils.cleanDirectory(FileUtils.java:60)
    at org.sonar.application.AppFileSystem.createOrCleanDirectory(AppFileSystem.java:116)
    at org.sonar.application.AppFileSystem.reset(AppFileSystem.java:73)
    at org.sonar.process.monitor.Monitor.resetFileSystem(Monitor.java:122)
    ... 3 more

此错误仅发生在 MS Windows 上。它将在 5.6 版本中修复:https://jira.sonarsource.com/browse/SONAR-7422.