使用netstat -lntp来看看有侦听在网络某端口的进程。当然,也可以使用 lsof。

Error opening log file 'logs/gc.log': Permission denied

Elasticsearch | 作者 Edith | 发布于2019年10月18日 | 阅读数:1123

今天尝试在另外一台服务器上用docker-compose构建一个节es节点时报了以下的错误:
错误原因我也不太清除,可能是权限什么的吧。望解答,感激不尽。
[0.001s][error][logging] Error opening log file 'logs/gc.log': Permission denied
Initialization of output 'file=logs/gc.log' using options 'filecount=32,filesize=64m' failed.
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Invalid -Xlog option '-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
docker-compose.yml
version: '3.1'
services:
elasticsearch:
image: elasticsearch:6.4.3
container_name: elasticsearch
restart: always
ports:
- "9200:9200"
- "9300:9300"
environment:
cluster.name: Niska
node.name: Niska-04
network.host: *******
discovery.zen.ping.unicast.hosts: *********
配置文件应该是没什么问题,差不多是按照之前集群的配置来的。
已邀请:

supolu

赞同来自:

这日志很清楚了~就是当前用户没有权限打开logs/gc.log

要回复问题请先登录注册