Open saniho opened 3 years ago
the same thing happens to me on Raspberry 4
Can you try to run again like this:
docker run -u sonarqube -d --name sonarqube -p 9000:9000 -v ~/projetos/dados/sonar-scanner/plugins:/sonarqube-9.3.0.51899/extensions/plugins paperinik/rpi-sonarqube:latest
after test : 2022.03.07 07:48:14 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /sonarqube-7.6/temp Exception in thread "main" java.nio.file.AccessDeniedException: /sonarqube-7.6/temp/README.txt at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) at java.nio.file.Files.delete(Files.java:1126) at org.sonar.application.AppFileSystem$CleanTempDirFileVisitor.visitFile(AppFileSystem.java:121) at org.sonar.application.AppFileSystem$CleanTempDirFileVisitor.visitFile(AppFileSystem.java:101) at java.nio.file.Files.walkFileTree(Files.java:2670) at org.sonar.application.AppFileSystem.createOrCleanTempDirectory(AppFileSystem.java:96) at org.sonar.application.AppFileSystem.reset(AppFileSystem.java:62) at org.sonar.application.App.start(App.java:55) at org.sonar.application.App.main(App.java:78)
it seems /temp is not map in the container
Looks like you are trying to run with the old version: 7.6
. I created a new image using the lastest version:
9.3.0.51899
Try to use like this:
Create a database in postgres with the name: "sonar"
create database sonar;
Replace these information with your data:
POSTGRES_USER
POSTGRES_PASSWORD
POSTGRES_HOST
Command:
docker run -u sonarqube -d --name sonarqube -p 9000:9000 -e SONARQUBE_JDBC_USERNAME="POSTGRES_USER" -e SONARQUBE_JDBC_PASSWORD="POSTGRES_PASSWORD" -e SONARQUBE_JDBC_URL="jdbc:postgresql://POSTGRES_HOST/sonar" paperinik/rpi-sonarqube:9.3.0.51899
it's better, but I have n ow this error : 2022.03.07 21:41:38 INFO web[][o.a.c.h.Http11Processor] Error parsing HTTP request header\n Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level. java.lang.IllegalArgumentException: Invalid character found in method name [0x160x030x010x020x000x010x000x010xfc0x030x03to0x940x9da0x94!0x170xa70x160x7f0x810xe50xd10x0a0xfd0xf1>o0xb3,0xc00xf20xf40xe7O0x87*0xae<0x900xae ]. HTTP method names must be tokens at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:434) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:511) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:831) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1673) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:829)
any idea?
How did you start the command? can you send an example?
I created my sonarqube folder with full access to write my data:
drwxrwxrwx 6 nobody nogroup 4096 mar 7 18:10 sonarqube
I don't have this directory but only this projetos/dados/sonar-scanner/ normal ?
Try to run without the path to see if is running using default database:
docker run -u sonarqube -d --name sonarqube -p 9000:9000 -e sonarqube:9.3.0.51899
then stop and remove:
docker stop sonarqube && docker rm sonarqube
like this using a mysql database:
docker run -u sonarqube -d --name sonarqube -p 9000:9000 -e SONARQUBE_JDBC_USERNAME="sonar" -e SONARQUBE_JDBC_PASSWORD="mypwd" -e SONARQUBE_JDBC_URL="jdbc:mysql://192.168.167:49167/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true" paperinik/rpi-sonarqube:9.3.0.51899
then stop and remove:
docker stop sonarqube && docker rm sonarqube
like this using a mysql database and volume path:
Create if not exists:
mkdir -p ~/projetos/dados/sonarqube
docker run -u sonarqube -d --name sonarqube -p 9000:9000 -v ~/projetos/dados/sonarqube/extensions:/sonarqube-9.3.0.51899/extensions -v ~/projetos/dados/sonarqube/logs:/sonarqube-9.3.0.51899/logs -v ~/projetos/dados/sonarqube/temp:/sonarqube-9.3.0.51899/temp -v ~/projetos/dados/sonarqube/data:/sonarqube-9.3.0.51899/data -e SONARQUBE_JDBC_USERNAME="sonar" -e SONARQUBE_JDBC_PASSWORD="mypwd" -e SONARQUBE_JDBC_URL="jdbc:mysql://192.168.167:49167/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true" paperinik/rpi-sonarqube:9.3.0.51899
:( mysql is not supported by sonar.... I'll try with postgres .. and see the result
the test progress, now, I have this issue :
2022.03.10 20:35:45 WARN es[][o.e.m.j.JvmGcMonitorService] [gc][young][422][30] duration [26.6s], collections [1]/[34.7s], total [26.6s]/[2.1m], memory [59.5mb]->[37.8mb]/[512mb], all_pools {[survivor] [2mb]->[3mb]/[0b]}{[young] [22mb]->[0b]/[0b]}{[old] [35.5mb]->[34.8mb]/[512mb]} at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767) at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:354) at java.base/java.lang.Thread.run(Thread.java:829)
I have test by dropping /data/es7 .. but same result and every time I start this, my docker restart
hello, after try this image on my rpi3, my container have an error : 2021.02.27 22:04:39 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /sonarqube-7.6/temp
Exception in thread "main" java.nio.file.AccessDeniedException: /sonarqube-7.6/temp/README.txt at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) at java.nio.file.Files.delete(Files.java:1126) at org.sonar.application.AppFileSystem$CleanTempDirFileVisitor.visitFile(AppFileSystem.java:121) at org.sonar.application.AppFileSystem$CleanTempDirFileVisitor.visitFile(AppFileSystem.java:101) at java.nio.file.Files.walkFileTree(Files.java:2670) at org.sonar.application.AppFileSystem.createOrCleanTempDirectory(AppFileSystem.java:96) at org.sonar.application.AppFileSystem.reset(AppFileSystem.java:62) at org.sonar.application.App.start(App.java:55) at org.sonar.application.App.main(App.java:78)
Do you have any idea ?
the cmd docker volume create --name sonarqube_data docker volume create --name sonarqube_logs docker volume create --name sonarqube_extensions docker volume create --name sonarqube_temp
docker run -d --name sonarqube \ -p 9000:9000 \ -e sonar.jdbc.url="jdbc:mysql://192.168.167:49167/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true" \ -e sonar.jdbc.username=sonar \ -e sonar.jdbc.password=mypwd \ -v sonarqube_conf:/opt/sonarqube-7.6/conf \ -v sonarqube_extensions:/sonarqube-7.6/extensions \ -v sonarqube_logs:/opt/sonarqube-7.6/logs \ -v sonarqube_temp:/opt/sonarqube-7.6/temp \ -v sonarqube_data:/opt/sonarqube-7.6/data \ paperinik/rpi-sonarqube