访问ES提示无权限

linux安装ES,访问9200端口提示被拒绝

curl http://localhost:9200
curl: (7) Failed to connect to localhost port 9200: Connection refused
 

可以使用 `curl` 命令通过用户名和密码对 Elasticsearch 进行身份验证,并进行访问。下面是一个示例命令:

```bash
curl -u username:password http://localhost:9200/_cat/indices
```

在命令中,`-u` 参数后面提供了用户名和密码,用于身份验证。将 `username` 替换为实际的用户名,`password` 替换为实际的密码。

猜你喜欢

转载自blog.csdn.net/seanyang_/article/details/132459458