SonarQube-docker : Plugin issue when running with external database

245 views
Skip to first unread message

cedric...@gmail.com

unread,
Apr 9, 2018, 5:36:51 PM4/9/18
to SonarQube

Running the SonarQube docker version (7.0 or 6.7.2) with docker image.

And i am able to get Rules / plugin at the first startup, but at the second run all is lost.


Scenario :

With a new postgresql database, without data, when i start the docker run -p 9000:9000 -p 9092:9092 -e SONARQUBE_JDBC_USERNAME=XXXX -e SONARQUBE_JDBC_PASSWORD=XXXXX -e SONARQUBE_JDBC_URL=jdbc:postgresql://XXXX:1223/dbname sonarqube

the plugin are well loaded

2018.04.05 09:09:10 INFO web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: /opt/sonarqube 2018.04.05 09:09:10 INFO web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled 2018.04.05 09:09:10 INFO web[][o.s.s.p.d.m.h.MigrationHistoryTableImpl] Creating table schema_migrations 2018.04.05 09:09:11 INFO web[][o.s.s.p.ServerPluginRepository] Plugin SonarPython [python] installed 2018.04.05 09:09:11 INFO web[][o.s.s.p.ServerPluginRepository] Plugin SonarJava [java] installed 2018.04.05 09:09:11 INFO web[][o.s.s.p.ServerPluginRepository] Plugin SonarTS [typescript] installed 2018.04.05 09:09:11 INFO web[][o.s.s.p.ServerPluginRepository] Plugin SonarJS [javascript] installed 2018.04.05 09:09:11 INFO web[][o.s.s.p.ServerPluginRepository] Plugin SonarQube :: Plugins :: SCM :: SVN [scmsvn] installed 2018.04.05 09:09:11 INFO web[][o.s.s.p.ServerPluginRepository] Plugin SonarPHP [php] installed 2018.04.05 09:09:11 INFO web[][o.s.s.p.ServerPluginRepository] Plugin SonarXML [xml] installed 2018.04.05 09:09:11 INFO web[][o.s.s.p.ServerPluginRepository] Plugin SonarQube :: Plugins :: SCM :: Git [scmgit] installed 2018.04.05 09:09:11 INFO web[][o.s.s.p.ServerPluginRepository] Plugin Flex [flex] installed 2018.04.05 09:09:11 INFO web[][o.s.s.p.ServerPluginRepository] Plugin SonarC# [csharp] installed 2018.04.05 09:09:11 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin Flex / 2.3 / 79167f762219bea1fd181ff5ef6ca4b34abd1675 2018.04.05 09:09:11 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarC# / 6.7.1.4347 / c8c4474682a3cd67f345ff46b2a7e1c62c85441c 2018.04.05 09:09:11 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarJS / 4.0.0.5862 / 7c3166ea3f0526e74aa53e521d2fee2290fa0820 2018.04.05 09:09:11 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarJava / 5.1.0.13090 / 5d2c41b3da0a3a6c11417a6d17d011d7a1fe8ba2 2018.04.05 09:09:11 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarPHP / 2.12.1.3018 / 75c2cebff53eeee63fe7eafc5e31c188270d5fe8 2018.04.05 09:09:11 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarPython / 1.9.0.2010 / f17988b34c750c96c13ef5bdcc0645167233e3ad 2018.04.05 09:09:11 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarQube :: Plugins :: SCM :: Git / 1.3.0.869 / 4da53e3f9e55f4f2e5796625cb0c5768ed152079 2018.04.05 09:09:11 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarQube :: Plugins :: SCM :: SVN / 1.6.0.860 / 2111fdbd1dddda4ad6d4ed6486fd0b18c1010d3b 2018.04.05 09:09:11 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarTS / 1.5.0.2122 / 7eb12e7593b8e02616914773451c6118f230c57a 2018.04.05 09:09:11 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarXML / 1.4.3.1027 / 39588245cecf538bb27be4e496ff303b0143d20b 2018.04.05 09:09:12 INFO web[][o.s.s.p.d.m.c.PostgresCharsetHandler] Verify that database charset supports UTF8 2018.04.05 09:09:12 INFO web[][o.s.s.p.d.m.AutoDbMigration] Automatically perform DB migration on fresh install


So all is ok at the first run.

When i restart the container , the server will disable all rules.

2018.04.05 09:23:42 INFO web[][o.s.s.s.GeneratePluginIndex] Generate scanner plugin index 2018.04.05 09:23:42 INFO web[][o.s.s.s.RegisterPlugins] Register plugins 2018.04.05 09:23:42 INFO web[][o.s.s.s.RegisterMetrics] Register metrics 2018.04.05 09:23:51 INFO web[][o.s.s.r.RegisterRules] Register rules 2018.04.05 09:23:52 INFO web[][o.s.s.r.RegisterRules] Disable rule Pylint:R0801 2018.04.05 09:23:52 INFO web[][o.s.s.r.RegisterRules] Disable rule squid:UselessParenthesesCheck 2018.04.05 09:23:52 INFO web[][o.s.s.r.RegisterRules] Disable rule squid:RightCurlyBraceSameLineAsNextBlockCheck 2018.04.05 09:23:52 INFO web[][o.s.s.r.RegisterRules] Disable rule javascript:S138 2018.04.05 09:23:52 INFO web[][o.s.s.r.RegisterRules] Disable rule squid:S1764 2018.04.05 09:23:52 INFO web[][o.s.s.r.RegisterRules] Disable rule csharpsquid:S112 d
 

Simon Brandhof

unread,
Apr 11, 2018, 4:01:14 PM4/11/18
to cedric...@gmail.com, SonarQube
Hi Cédric,

It's the expected behavior when all plugins are uninstalled. To prevent this situation, the directory extensions/plugins should not be volatile and should be mount to a Docker volume.

I hope it helps,
Regards 

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/7b809c4a-eeea-4db9-9eb3-ddd581259431%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Simon Brandhof | SonarSource

Co-Founder & Tech Lead

@SimonBrandhof

http://sonarsource.com
Reply all
Reply to author
Forward
0 new messages