SonarQube 5.4 restart from UI failing on Windows - sonarqube-5.4

I've SQ 5.4 running on Windows server under local admin account. Consistently, restart from UI hangs and I find below in the log.
This seems like a bug in the restart logic.
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.access$500(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

This bug occurs on MS Windows only. It will be fixed in version 5.6: https://jira.sonarsource.com/browse/SONAR-7422.

Related

Logs tab not showing up in IntelliJ 2017.1EAP

This worked fine with previous intelliJ versions. Logs tab is not activated after GlassFish is started. Restore Layout button does not help.
UPDATE
Here is a part of idea.log with exceptions(not sure if it's related to the issue):
*2017-02-09 15:19:01,969 [3649406] INFO - notification.NotificationGroup - Notification group JavaEE is already registered
java.lang.Throwable
at com.intellij.notification.NotificationGroup.<init>(NotificationGroup.java:65)
at com.intellij.notification.NotificationGroup.<init>(NotificationGroup.java:50)
at com.intellij.notification.NotificationGroup.toolWindowGroup(NotificationGroup.java:82)
at com.intellij.notification.NotificationGroup.toolWindowGroup(NotificationGroup.java:87)
at com.intellij.javaee.oss.server.JavaeeServerInstanceImpl.createConnectErrorNotification(JavaeeServerInstanceImpl.java:358)
at com.intellij.javaee.oss.server.JavaeeServerInstanceImpl$ConnectLogger.reportError(JavaeeServerInstanceImpl.java:544)
at com.intellij.javaee.oss.server.JavaeeServerInstanceImpl.disconnect(JavaeeServerInstanceImpl.java:186)
at com.intellij.javaee.oss.server.JavaeeServerConnector.shutdown(JavaeeServerConnector.java:115)
at com.intellij.javaee.run.execution.J2EEProcessHandlerHelper.destroy(J2EEProcessHandlerHelper.java:199)
at com.intellij.javaee.run.execution.LocalJavaeeServerProcessHandler.destroyProcessImpl(LocalJavaeeServerProcessHandler.java:157)
at com.intellij.javaee.run.execution.LocalJavaeeServerProcessHandler.detachProcessImpl(LocalJavaeeServerProcessHandler.java:167)
at com.intellij.execution.process.ProcessHandler$2.run(ProcessHandler.java:126)
at com.intellij.execution.process.ProcessHandler$TasksRunner.execute(ProcessHandler.java:260)
at com.intellij.execution.process.ProcessHandler.detachProcess(ProcessHandler.java:121)
at com.intellij.javaee.run.execution.LocalJavaeeServerProcessHandler.destroyProcess(LocalJavaeeServerProcessHandler.java:78)
at com.intellij.javaee.run.execution.J2EEProcessHandlerWrapper$4.onProcess(J2EEProcessHandlerWrapper.java:194)
at com.intellij.javaee.run.execution.J2EEProcessHandlerWrapper$ProcessCall.lambda$new$0(J2EEProcessHandlerWrapper.java:360)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:212)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2017-02-09 15:19:14,501 [3661938] INFO - ij.compiler.impl.CompileDriver - COMPILATION STARTED (BUILD PROCESS)
2017-02-09 15:19:14,627 [3662064] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [system]: "C:\Program Files\Java\jbsdk8u112b657_windows_x64\jre\bin\java" -Xmx700m -Djava.awt.headless=true -Djava.endorsed.dirs=\"\"... (many lines)
2017-02-09 15:19:15,084 [3662521] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: C:/Program Files (x86)/JetBrains/IntelliJ IDEA 171.2014.21/lib/jps-launcher.jar;C:/Program Files/Java/jbsdk8u112b657_windows_x64/lib/tools.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA 171.2014.21/lib/optimizedFileManager.jar
2017-02-09 15:19:25,665 [3673102] INFO - lij.compiler.impl.CompilerUtil - COMPILATION FINISHED (BUILD PROCESS); Errors: 0; warnings: 0 took 11175 ms: 0 min 11sec
2017-02-09 15:19:25,666 [3673103] INFO - CompilerBackwardReferenceIndex - C:\Users\***\.IntelliJIdea2017.1\system\compile-server\***_pom_b5d31051\backward-refs\version (The system cannot find the path specified)
java.io.FileNotFoundException: C:\Users\***\.IntelliJIdea2017.1\system\compile-server\***_pom_b5d31051\backward-refs\version (The system cannot find the path specified)
at java.io.FileInputStream.$$YJP$$open0(Native Method)
at java.io.FileInputStream.open0(FileInputStream.java)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at org.jetbrains.jps.backwardRefs.CompilerBackwardReferenceIndex.versionDiffers(CompilerBackwardReferenceIndex.java:155)
at com.intellij.compiler.backwardRefs.CompilerReferenceReader.exists(CompilerReferenceReader.java:109)
at com.intellij.compiler.backwardRefs.CompilerReferenceReader.create(CompilerReferenceReader.java:116)
at com.intellij.compiler.backwardRefs.CompilerReferenceServiceImpl.a(CompilerReferenceServiceImpl.java:359)
at com.intellij.compiler.backwardRefs.CompilerReferenceServiceImpl.access$600(CompilerReferenceServiceImpl.java:70)
at com.intellij.compiler.backwardRefs.CompilerReferenceServiceImpl$2.b(CompilerReferenceServiceImpl.java:126)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:212)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2017-02-09 15:19:25,669 [3673106] INFO - ntellij.analysis.SonarLintTask - Running SonarLint Analysis for 9 files in 2 modules
2017-02-09 15:19:25,715 [3673152] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [system]: "C:\Program Files\Java\jbsdk8u112b657_windows_x64\jre\bin\java" -Xmx700m -Djava.awt.headless=true -Djava.endorsed.dirs=\"\".... (many lines)
2017-02-09 15:19:26,196 [3673633] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: C:/Program Files (x86)/JetBrains/IntelliJ IDEA 171.2014.21/lib/jps-launcher.jar;C:/Program Files/Java/jbsdk8u112b657_windows_x64/lib/tools.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA 171.2014.21/lib/optimizedFileManager.jar
2017-02-09 15:19:27,597 [3675034] INFO - svn.commandLine.CommandRuntime - Detected warning - svn: warning: W155010: The node 'C:\***\Pom\.idea\sonarlint\.sonartmp' was not found.
2017-02-09 15:19:31,779 [3679216] INFO - ntellij.analysis.SonarLintTask - SonarLint analysis done
2017-02-09 15:19:58,557 [3705994] INFO - svn.commandLine.CommandRuntime - Detected warning - svn: warning: W155010: The node 'C:\***\Pom\.idea\sonarlint\.sonartmp' was not found.*
I had a .bat script (which stops glassfish domain and deletes old logs) set to be executed before launch in GlassFish server configuration, and IntelliJ for some reason does not load recreated (during deploy process) log files. It loads only those existed before starting deploy.

SonarQube 5.2 Upgrade failed

I tried upgrading SonarQube from 5.1.2 to 5.2, but the Upgrade failed. I have the following message in the Sonar.log:
2015.11.23 07:44:36 ERROR web[o.s.s.d.m.PlatformDatabaseMigration] DB Migration or container restart failed. Process ended with an exception
org.jruby.exceptions.RaiseException: (StandardError) An error has occurred, this and all later migrations canceled:
ActiveRecord::JDBCError: Cannot find the object "project_links" because it does not exist or you do not have permissions.: ALTER TABLE project_links ADD [component_uuid] NVARCHAR(50)
2015.11.23 08:03:50 INFO app[o.s.p.m.TerminatorThread] Process[web] is stopping
2015.11.23 08:03:51 INFO web[o.s.p.StopWatcher] Stopping process
2015.11.23 08:03:51 INFO web[o.a.c.h.Http11NioProtocol] Pausing ProtocolHandler ["http-nio-0.0.0.0-9000"]
2015.11.23 08:03:52 INFO web[o.a.c.h.Http11NioProtocol] Stopping ProtocolHandler ["http-nio-0.0.0.0-9000"]
2015.11.23 08:03:53 INFO web[o.a.c.h.Http11NioProtocol] Destroying ProtocolHandler ["http-nio-0.0.0.0-9000"]
2015.11.23 08:03:53 INFO web[o.s.s.a.TomcatAccessLog] Web server is stopped
When I execute the failed ALTER TABLE command in SQL Server Management Studio, it does work. I was able to connect to the sonar database with Visual Studio with the user/password that SonarQube uses. I gave the sonar user schema owner and read and write permissions. I tried changeing from the encrypted password to the clear text password. What could be wrong?
The DB user has permissions to read multiple SonarQube schemas. It must be restricted to a single schema.

In Eclipse UNable to run the script in IE But IE its get launching

I am facing some issue with eclipse, I am running the script with TestNg, but it was unable to run the script itis hangover by launching IE application
Showing this message, nothing has been doing...
HI
I am facing some issue with eclipse, I am running the script with TestNg, but it was unable to run the script itis hangover by launching IE application
Showing this message, nothing has been doing...
18:09:04.942 INFO - Java: Oracle Corporation 23.2-b09
18:09:04.942 INFO - OS: Windows 7 6.1 amd64
18:09:04.953 INFO - v2.35.0, with Core v2.35.0. Built from revision c916b9d
18:09:05.087 INFO - RemoteWebDriver instances should connect to: 18:09:05.088 INFO - Version Jetty/5.1.x
18:09:05.097 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
18:09:05.098 INFO - Started HttpContext[/selenium-server,/selenium-server]
18:09:05.099 INFO - Started HttpContext[/,/]
18:09:05.101 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#7de41969
18:09:05.101 INFO - Started HttpContext[/wd,/wd]
18:09:05.104 INFO - Started SocketListener on 0.0.0.0:4444
18:09:05.104 INFO - Started org.openqa.jetty.jetty.Server#3d9f242f
18:09:05.147 INFO - Checking Resource aliases
18:09:05.150 INFO - Command request: getNewBrowserSession[*iexplore, https://login.salesforce.com/, ] on session null
18:09:05.152 INFO - creating new remote session
18:09:05.163 INFO - Allocated session 4f8177c22aab4672a62cef88f6d66878 for https://login.salesforce.com/, launching...
jar:file:/C:/Selenium/selenium-server-standalone-2.35.0.jar!/core
18:09:05.455 INFO - Launching Embedded Internet Explorer...
18:09:05.709 INFO - Launching Internet Explorer HTA...
Make sure your zoom is at 100%. Also in Internet Options > security you need to make sure that 'Enable protected mode' is selected on all 4 zones.

Tomcat 7 getting CreateJavaVM Failed Error

I have an Apache tomcat 7.0.5 Server on a Windows R2 Server and I've deployed a webApp ( java JSF) on it, everything was working fine, but it suddenly stopped and won't run again. when I try to run it, it tells me "Error 1067: The Process terminated unexpectedly" and In the logs I get these files:
tomcat7-stdout.2012-08-08.log
2012-08-08 18:00:06 Commons Daemon procrun stdout initialized
commons-daemon.2012-08-08.log
[2012-08-08 19:02:30] [info] Commons Daemon procrun finished
[2012-08-08 19:13:02] [info] Commons Daemon procrun (1.0.4.0 64-bit) started
[2012-08-08 19:13:02] [info] Running 'Tomcat7' Service...
[2012-08-08 19:13:02] [info] Starting service...
[2012-08-08 19:13:02] [error] CreateJavaVM Failed
[2012-08-08 19:13:03] [info] Service started in 1000 ms.
[2012-08-08 19:13:03] [info] Run service finished.
[2012-08-08 19:13:03] [info] Commons Daemon procrun finished
tomcat7-stderr.2012-08-08.log
2012-08-08 18:00:06 Commons Daemon procrun stderr initialized
Please use CMSClassUnloadingEnabled in place of CMSPermGenSweepingEnabled in the future
Unrecognized VM option '+HeapDumpOnOutOfMemoryError '
since I was having some 'perm gen' memory error I added some stuff to my apache Tomcat properties, folowing this link how to handle Perm Gen
so my Java Options look like this:
-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 7.0
-Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 7.0
-Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 7.0\endorsed
-Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 7.0\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\logging.properties
-XX:+CMSClassUnloadingEnabled
-XX:+CMSPermGenSweepingEnabled
-XX:PermSize=256m
-XX:MaxPermSize=256m
-XX:+HeapDumpOnOutOfMemoryError
Any ideas as to why the server won't start anymore? THANKS!
~Myy
After spending hours trying to figure this out, I finally found it. I had an extra space at the end of VM command.
'+HeapDumpOnOutOfMemoryError '
which was giving me the Unrecognized VM option.....
Thanks for reading, hopefully when you get this error, you can take extra precautions to verify the syntax.
to manage the memory you need to set some Xms and Xmx parameter
Xms manages the initial heap size
Xmx manages the maximum heap size
Thus try to add :
-Xms=256m -Xmx=256m
regards
The error is on option "HeapDumpOnOutOfMemoryError" which is not even listed in your post. Can you post a screen print of the "Java" tab from the "tomcat" service screen (similar to the link you have provided) ? This will tell us the actual options you are using and also the memory you have set.
copy the file msvcr71.dll from the bin dir of your java installation, to the bin dir of the tomcat installation.

Problem running Selenium-RC

I have Selenium running under Cruise Control to test our site once a day. On Saturday Selenium started throwing the error below.
No code was changed between the tests running sucessfully on Friday night. Also, the same thing has happened on three different machines so I assume it must be something on the machine such as windows updates. I can't see that any were deployed though.
How would I go about debugging this?
java -jar selenium-server.jar -port 4445
14:00:35.375 INFO - Java: Sun Microsystems Inc. 14.3-b01
14:00:35.375 INFO - OS: Windows 2003 5.2 x86
14:00:35.390 INFO - v1.0 [2677], with Core v#VERSION# [#REVISION#]
14:00:35.500 INFO - Version Jetty/5.1.x
14:00:35.500 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
14:00:35.515 INFO - Started HttpContext[/selenium-server,/selenium-server]
14:00:35.515 INFO - Started HttpContext[/,/]
14:00:35.531 INFO - Started SocketListener on 0.0.0.0:4445
14:00:35.546 INFO - Started org.mortbay.jetty.Server#dbe178
14:00:42.812 INFO - Checking Resource aliases
14:00:42.843 INFO - Command request: getNewBrowserSession[*iexplore, http://test.com/, ] on session null
14:00:42.859 INFO - creating new remote session
14:00:42.968 INFO - Allocated session 1e1f23e664184a3ebdd30c06c4759960 for http://test.com/, launching...
14:00:42.968 ERROR - Failed to start new browser session, shutdown browser and clear all session data
java.lang.IllegalArgumentException: Resource not found: /core
at org.openqa.selenium.server.browserlaunchers.ResourceExtractor.extractResourcePath(ResourceExtractor.java:39)
at org.openqa.selenium.server.browserlaunchers.HTABrowserLauncher.createHTAFiles(HTABrowserLauncher.java:85)
at org.openqa.selenium.server.browserlaunchers.HTABrowserLauncher.launch(HTABrowserLauncher.java:60)
at org.openqa.selenium.server.browserlaunchers.HTABrowserLauncher.launchRemoteSession(HTABrowserLauncher.java:140)
at org.openqa.selenium.server.browserlaunchers.InternetExplorerLauncher.launchRemoteSession(InternetExplorerLauncher.java:77)
at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:357)
at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:122)
at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:84)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:697)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:394)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:365)
at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:126)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.http.HttpServer.service(HttpServer.java:909)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
14:00:42.968 INFO - Got result: Failed to start new browser session: Error while
launching browser on session null
14:00:43.046 INFO - Command request: testComplete[, ] on session null
14:00:43.046 INFO - Got result: OK on session null
I've had a similar problem. No matter what browser I was trying to launch, it sit there for a while (with the process started, but no visible window), and then eventually fail.This was on Windows 7, executing the tests through java.
It turned out I just needed to end all other browsers. I couldn't have IE, Firefox, or chrome open at the time of testing. Maybe you should try that? Good luck!
I upgraded the Selenium RC server to 1.0.3 (released 23 Feb 2010) and the tests started working again! I don't know what the issue was, but that fixed it.