Change path of data file

I change path in file elasticsearch.yml but it not working!

# ----------------------------------- Paths ------------------------------------
# Path to directory where to store the data (separate multiple locations by comma):
# "C:\\env_thuanhieu\\data\\elasticsearch"
# Path to log files:
#path.logs: /path/to/logs


You need to uncomment the line I think. Instead of: "C:\\env_thuanhieu\\data\\elasticsearch"

Write: "C:\\env_thuanhieu\\data\\elasticsearch"
1 Like


Do i need move old file in data to the new data file? (

because i have some trouble after that !
I can't login into elasticsearch, I have error like

http client did not trust this server's certificate, closing connection Netty4HttpChannel{localAddress=/[0:0:0:0:0:0:0:1]:9200, remoteAddress=/[0:0:0:0:0:0:0:1]:51462}
Authentication of [elastic] was terminated by realm [reserved] - failed to authenticate user [elastic]


I comment it again then it woking normal!

You did not say that you had existing data.

If you don't, I think you need to restart from scratch. If you did have existing data, Elasticsearch is not going to move that for you so yes I assume you need to do it first.

1 Like

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