# SonarQube 10.3 server is not starting when run through docker on Amazon Linux 2

**URL:** <https://community.sonarsource.com/t/sonarqube-10-3-server-is-not-starting-when-run-through-docker-on-amazon-linux-2/107092>\
**Category:** SonarQube Server / Community Build\
**Tags:** sonarqube\
**Created:** [January 9, 2024, 9:22pm UTC](https://community.sonarsource.com/t/sonarqube-10-3-server-is-not-starting-when-run-through-docker-on-amazon-linux-2/107092 "2024-01-09T21:22:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jnallan](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@jnallan](https://community.sonarsource.com/u/jnallan)\
**Post date:** [January 9, 2024, 9:22pm UTC](https://community.sonarsource.com/t/sonarqube-10-3-server-is-not-starting-when-run-through-docker-on-amazon-linux-2/107092/1 "2024-01-09T21:22:41Z")

</div>

We’ve installed sonarQube 10.3 using docker command below `docker run -d --name sonarqube \ -p 9000:9000 \ -e SONAR_JDBC_URL=... \ -e SONAR_JDBC_USERNAME=... \ -e SONAR_JDBC_PASSWORD=... \ -v sonarqube_data:/opt/sonarqube/data \ -v sonarqube_extensions:/opt/sonarqube/extensions \ -v sonarqube_logs:/opt/sonarqube/logs \ <image_name>`

We see the below error.

```auto
ava.lang.IllegalStateException: Unable to access 'path.data' (/opt/sonarqube/data/es8)
        at org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath(FilePermissionUtils.java:66) ~[elasticsearch-8.11.0.jar:?]
        at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:236) ~[elasticsearch-8.11.0.jar:?]
        at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:178) ~[elasticsearch-8.11.0.jar:?]
        at org.elasticsearch.bootstrap.Security.configure(Security.java:125) ~[elasticsearch-8.11.0.jar:?]
        at org.elasticsearch.bootstrap.Elasticsearch.initPhase2(Elasticsearch.java:198) ~[elasticsearch-8.11.0.jar:?]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:72) ~[elasticsearch-8.11.0.jar:?]
Caused by: java.nio.file.AccessDeniedException: /opt/sonarqube/data/es8
        at sun.nio.fs.UnixException.translateToIOException(Unknown Source) ~[?:?]
        at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source) ~[?:?]
        at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source) ~[?:?]
        at sun.nio.fs.UnixFileSystemProvider.createDirectory(Unknown Source) ~[?:?]
        at java.nio.file.Files.createDirectory(Unknown Source) ~[?:?]
        at java.nio.file.Files.createAndCheckIsDirectory(Unknown Source) ~[?:?]
        at java.nio.file.Files.createDirectories(Unknown Source) ~[?:?]
        at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:330) ~[elasticsearch-8.11.0.jar:?]
        at org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath(FilePermissionUtils.java:64) ~[elasticsearch-8.11.0.jar:?]
        ... 5 more
ERROR: Elasticsearch did not exit normally - check the logs at /opt/sonarqube/logs/sonarqube.log

ERROR: Elasticsearch exited unexpectedly, with exit code 1
2024.01.09 21:09:51 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2024.01.09 21:09:51 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2024.01.09 21:09:51 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
21:09:52.390 [main] WARN org.sonar.application.config.AppSettingsLoaderImpl -- Configuration file not found: /opt/sonarqube/conf/sonar.properties

```

Update: we are able to setup without any data attached to the docker ( without the -v). But when we add the data mounted and run the sonar with docker, we get this issue again. We need to have docker run with -v option to persist the data.  
Any Advice on what is causing the access denied on this folder /opt/sonarqube/data/es8

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [January 16, 2024, 3:24pm UTC](https://community.sonarsource.com/t/sonarqube-10-3-server-is-not-starting-when-run-through-docker-on-amazon-linux-2/107092/2 "2024-01-16T15:24:35Z")

</div>

Hi,

Welcome to the community!

I’m going to preface my dumb question with the fact that I don’t have much Docker experience… But does the relevant user have perms to `/opt/sonarqube/data`?

&nbsp;  
Ann
