AccessDeniedException

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.

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

1 Like

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.

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