BitBucket Search Eleasticsearch Windows service

Torsten Sievers June 29, 2016

Setup: Win 2008 Server including current updates, Java SE 1.8.0_91.

The 'AtlassianBitbucketElasticsearch' runs on a window server only if it was installed during installation of Bitbucket 4.7.1 with elasticserach.

If the service is removed by "<bitbucket-install-dir>\elasticksearch\bin\service.bat remove" and then installed again with "<bitbucket-install-dir>\elasticksearch\bin\service.bat remove" following the description on https://confluence.atlassian.com/bitbucketserver/running-bitbucket-server-as-a-windows-service-776640048.html. Installation yielded ran smoothly. However, the service will start and then fail imediately with the following error:

- <System>
  <Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
  <EventID Qualifiers="49152">7024</EventID>
  <Version>0</Version>
  <Level>2</Level>
  <Task>0</Task>
  <Opcode>0</Opcode>
  <Keywords>0x8080000000000000</Keywords>
  <TimeCreated SystemTime="2016-06-30T08:56:55.664670700Z" />
  <EventRecordID>19614</EventRecordID>
  <Correlation />
  <Execution ProcessID="488" ThreadID="5672" />
  <Channel>System</Channel>
  <Computer>bitbuck.company.local</Computer>
  <Security />
  </System>
- <EventData>
  <Data Name="param1">Atlassian Bitbucket Elasticsearch 2.3.1 (AtlassianBitbucketElasticsearch)</Data>
  <Data Name="param2">%%1</Data>
  </EventData>
  </Event>

Result service name could not be adjusted. However the the manual installation of AtlassianBitbucket-service gives a stable running service.

Nevertheless, Bitbucket as well as elasticsearch work properly if started by "<bitbucket-install-dir>\bin\start-bitbucket.bat"

Any advices?

1 answer

0 votes
Nick Darlington July 19, 2016

In your Atlassian\ApplicationData\Bitbucket\logs\search folder there should be a stderr file for elastic search.

Does it also contain this same error that I'm seeing (jar hell on trying to read an existing jar file, that the .\atlbucket user has full access to)?

 

-- 

 

2016-07-19 17:53:40 Commons Daemon procrun stderr initialized
Java HotSpot(TM) 64-Bit Server VM warning: Using the ParNew young collector with the Serial old collector is deprecated and will likely be removed in a future release
Exception in thread "main" les/Atlassian/Bitbucket/4.8.0/elasticsearch/modules/lang-expression/asm-5.0.4.jar, file:/J:/Program%20Files/Atlassian/Bitbucket/4.8.0/elasticsearch/modules/lang-expression/asm-commons-5.0.4.jar, file:/J:/Program%20Files/Atlassian/Bitbucket/4.8.0/elasticsearch/modules/lang-expression/lang-expression-2.3.1.jar, file:/J:/Program%20Files/Atlassian/Bitbucket/4.8.0/elasticsearch/modules/lang-expression/lucene-expressions-5.5.0.jar] due to jar hell
Likely root cause: java.security.AccessControlException: access denied ("java.io.FilePermission" "J:\Program Files\Atlassian\Bitbucket\4.8.0\elasticsearch\modules\lang-expression\antlr4-runtime-4.5.1-1.jar" "read")
        at java.security.AccessControlContext.checkPermission(Unknown Source)
        at java.security.AccessController.checkPermission(Unknown Source)
        at java.lang.SecurityManager.checkPermission(Unknown Source)
        at java.lang.SecurityManager.checkRead(Unknown Source)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.jar.JarFile.<init>(Unknown Source)
        at java.util.jar.JarFile.<init>(Unknown Source)
        at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:174)
        at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:419)
        at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:115)
        at org.elasticsearch.node.Node.<init>(Node.java:158)
        at org.elasticsearch.node.Node.<init>(Node.java:140)
        at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:143)
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Refer to the log for complete error details.
-- 
Excepting for the fact our installation paths differ.
I haven't found a solution myself yet, but I think this information might lead to more of a reason for the issue than the Windows event log message (which exists but was the same as yours and not very informative).

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events