SonarQube 6.7 failed to start because CONFIG_SECCOMP not compiled into kernel

孤街醉人 提交于 2019-12-10 15:55:21

问题


I've just upgraded SonarQube from 6.0 to 6.7 LTS running in a CentOS 6 box, and noticed that ElasticSearch (ES) failed to start because the kernel (2.6.32-696.3.1.el6.x86_64) doesn't have seccomp available.

This is officially documented at System call filter check and a correct workaround for systems without this feature is to configure bootstrap.system_call_filter to false in elasticsearch.yml.

The issue here is because Sonar creates the ES configuration at startup, writing in $SONAR_HOME/temp/conf/es/elasticsearch.yml and I haven't found a way to set bootstrap.system_call_filter property.

I tried a natural (undocumented) way introducing sonar.search.bootstrap.system_call_filter and bootstrap.system_call_filter properties in sonar.properties but it doesn't work.


回答1:


We had the same problem. At first we used the above solution but after searching in the sonar code on github found the place where this setting should be placed:

Edit the sonar.properties file and change the line:

#sonar.search.javaAdditionalOpts=

to

sonar.search.javaAdditionalOpts=-Dbootstrap.system_call_filter=false




回答2:


Hi I tried to echo bootstrap.system_call_filter: 'false' to temp/conf/es/elasticsearch.yml, I see the line in that file, but got same error during start of sonarqube 6.7 on centos6.

Has someone tested that with success?




回答3:


First of all: don't even try to update elasticsearch.yml . SonarQube self-manages its ElasticSearch component config, so any attempt of manual intervention will be harmful. (reminder: the only config file that should ever be modified to operate SonarQube is sonar.properties)

More interestingly regarding that seccomp component:

  • the seccomp requirement does come from underlying ElasticSearch requirement, and transitively applies to operating SonarQube
  • if you run SonarQube locally with default config (specifically: default sonar.search.host), then the seccomp check may not be fatal (i.e. just a warning)
  • if you did override sonar.search.host , then the first thing you should wonder is: does the ElasticSearch JVM really needs to listen on other interfaces than loopback ? (knowing that SonarQube uses ES locally, except with the Data Center Edition). If no good answer to that, then keep sonar.search.host at its default value.

Last but not least, the golden path here is obviously to follow the requirement (i.e. have seccomp available on your OS), even if that involves upgrading to a more recent Linux kernel. And to wrap it all up: we've edited SonarQube Requirements to transparently share this situation.




回答4:


You could really cheat and edit /${SONAR_HOME}/elasticsearch/bin/elasticsearch.

Add

echo "bootstrap.system_call_filter = 'false'" >> 
/${SONAR_HOME}/temp/conf/es/elasticsearch.yml

before the "demonized" variable is set.



来源:https://stackoverflow.com/questions/47210302/sonarqube-6-7-failed-to-start-because-config-seccomp-not-compiled-into-kernel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!