# AccessDeniedException

**URL:** <https://discuss.elastic.co/t/accessdeniedexception/173127>\
**Category:** Elasticsearch\
**Created:** [March 20, 2019, 11:21am UTC](https://discuss.elastic.co/t/accessdeniedexception/173127 "2019-03-20T11:21:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![junhyuk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/junhyuk/32/41948_2.png) [@junhyuk](https://discuss.elastic.co/u/junhyuk)\
**Post date:** [March 20, 2019, 11:21am UTC](https://discuss.elastic.co/t/accessdeniedexception/173127/1 "2019-03-20T11:21:39Z")

</div>

Hi there, I am beginner user to elasticsearch.  
I have set network.host: 0.0.0.0 (also try to my local IP), http.port: 9200, and give executive authority to my new account. I use centOs6, Java 1.8, and doesn't use root account.  
I want to use elasticsearch on my server, but I have some issue.

my error log is that

```
   > at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.6.2.jar:6.6.2]

```

> ```
> at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:116) ~[elasticsearch-6.6.2.jar:6.6.2]
> at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.6.2.jar:6.6.2]
> 
> ```
> 
> **Caused by: org.elasticsearch.ElasticsearchException: failed to bind service**  
> at org.elasticsearch.node.Node.(Node.java:626) ~[elasticsearch-6.6.2.jar:6.6.2]  
> at org.elasticsearch.node.Node.(Node.java:265) ~[elasticsearch-6.6.2.jar:6.6.2]  
> at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:212) ~[elasticsearch-6.6.2.jar:6.6.2]  
> at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:212) ~[elasticsearch-6.6.2.jar:6.6.2]  
> at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.6.2.jar:6.6.2]  
> at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-6.6.2.jar:6.6.2]  
> ... 6 more  
> **Caused by: java.nio.file.AccessDeniedException: /etc/system-release**  
> 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.newByteChannel(UnixFileSystemProvider.java:214) ~[?:?]  
> at java.nio.file.Files.newByteChannel(Files.java:361) ~[?:1.8.0\_131]  
> at java.nio.file.Files.newByteChannel(Files.java:407) ~[?:1.8.0\_131]  
> at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384) ~[?:1.8.0\_131]  
> at java.nio.file.Files.newInputStream(Files.java:152) ~[?:1.8.0\_131]  
> at java.nio.file.Files.newBufferedReader(Files.java:2784) ~[?:1.8.0\_131]  
> at java.nio.file.Files.readAllLines(Files.java:3202) ~[?:1.8.0\_131]  
> at java.nio.file.Files.readAllLines(Files.java:3242) ~[?:1.8.0\_131]  
> at org.elasticsearch.monitor.os.OsProbe.readOsRelease(OsProbe.java:591) ~[elasticsearch-6.6.2.jar:6.6.2]  
> at org.elasticsearch.monitor.os.OsProbe.getPrettyName(OsProbe.java:546) ~[elasticsearch-6.6.2.jar:6.6.2]  
> at org.elasticsearch.monitor.os.OsProbe.osInfo(OsProbe.java:533) ~[elasticsearch-6.6.2.jar:6.6.2]  
> at org.elasticsearch.monitor.os.OsService.(OsService.java:48) ~[elasticsearch-6.6.2.jar:6.6.2]  
> at org.elasticsearch.monitor.MonitorService.(MonitorService.java:47) ~[elasticsearch-6.6.2.jar:6.6.2]  
> at org.elasticsearch.node.Node.(Node.java:397) ~[elasticsearch-6.6.2.jar:6.6.2]  
> at org.elasticsearch.node.Node.(Node.java:265) ~[elasticsearch-6.6.2.jar:6.6.2]  
> at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:212) ~[elasticsearch-6.6.2.jar:6.6.2]  
> at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:212) ~[elasticsearch-6.6.2.jar:6.6.2]  
> at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.6.2.jar:6.6.2]  
> at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-6.6.2.jar:6.6.2]  
> ... 6 more

I really don't know what's causing the problem. If you could solve this issue, I will very appreciate to you. thanks.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [March 20, 2019, 1:15pm UTC](https://discuss.elastic.co/t/accessdeniedexception/173127/2 "2019-03-20T13:15:09Z")

</div>

Hey,

is it possible that you are referring to a file in your `elasticsearch.yml` configuration that points outside the directory where the config file resides in?

Can you share your configuration file and its path? How did you install elasticsearch? Tar/gz archive or debian package or rpm or one of the repositories?

Thanks for providing all the information, that should help us narrowing the issue down.

--Alex

---

<div class="post-metadata">

**Author:** ![junhyuk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/junhyuk/32/41948_2.png) [@junhyuk](https://discuss.elastic.co/u/junhyuk)\
**Post date:** [March 21, 2019, 1:12am UTC](https://discuss.elastic.co/t/accessdeniedexception/173127/3 "2019-03-21T01:12:45Z")

</div>

Hi,  
my elasticsearch.yml configuration is it

> #cluster.name: my-application
> 
> #------------------------------------ Node ------------------------------------
> 
> #Use a descriptive name for the node:
> 
> #node.name: node-1
> 
> #Add custom attributes to the node:
> 
> #node.attr.rack: r1
> 
> #----------------------------------- Paths ------------------------------------
> 
> #Path to directory where to store the data (separate multiple locations by comma):
> 
> #path.data: /path/to/data
> 
> #Path to log files:
> 
> #path.logs: /path/to/logs
> 
> #----------------------------------- Memory -----------------------------------
> 
> #Lock the memory on startup:
> 
> #bootstrap.memory\_lock: true
> 
> #Make sure that the heap size is set to about half the memory available  
> #on the system and that the owner of the process is allowed to use this  
> #limit.
> 
> #elasticsearch performs poorly when the system is swapping the memory.
> 
> #---------------------------------- Network -----------------------------------
> 
> #Set the bind address to a specific IP (IPv4 or IPv6):
> 
> network.host: 0.0.0.0
> 
> #Set a custom port for HTTP:
> 
> http.port: 9200
> 
> #For more information, consult the network module documentation.
> 
> #--------------------------------- Discovery ----------------------------------
> 
> #Pass an initial list of hosts to perform discovery when new node is started:  
> #The default list of hosts is ["127.0.0.1", "[::1]"]
> 
> #discovery.zen.ping.unicast.hosts: ["host1", "host2"]
> 
> #Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):
> 
> #discovery.zen.minimum\_master\_nodes:
> 
> #For more information, consult the zen discovery module documentation.
> 
> #---------------------------------- Gateway -----------------------------------
> 
> #Block initial recovery after a full cluster restart until N nodes are started:
> 
> #gateway.recover\_after\_nodes: 3
> 
> #For more information, consult the gateway module documentation.
> 
> #---------------------------------- Various -----------------------------------
> 
> #Require explicit names when deleting indices:
> 
> #action.destructive\_requires\_name: true

I didn't change other setting, And I have installed of tar/gz. I couldn't understand my configuration files path. your mean is like /home/testuser/elasticsearch-6.6.2/config/ this?

thanks a lot of your answer.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 18, 2019, 1:12am UTC](https://discuss.elastic.co/t/accessdeniedexception/173127/4 "2019-04-18T01:12:50Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
