Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect to elasticsearch #349

Open
kashmax opened this issue Apr 6, 2022 · 7 comments
Open

Cannot connect to elasticsearch #349

kashmax opened this issue Apr 6, 2022 · 7 comments

Comments

@kashmax
Copy link

kashmax commented Apr 6, 2022

Hi,
I have followed the below steps.

Downloaded code from https://github.com/OWASP/Python-Honeypot.git
cd Python-Honeypot
docker-compose -f docker-compose-host.yml up
and
docker-compose

But throws this error. Thanks

root@Python-Honeypot-master# docker-compose up
Starting elasticsearch ... done
Starting python-honeypot-master_ohp_1 ... done
Starting grafana ... done
Attaching to elasticsearch, python-honeypot-master_ohp_1, grafana
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable.
grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
grafana | mkdir: cannot create directory '/var/lib/grafana/plugins': Permission denied
grafana exited with code 1
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:46:56,153Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "version[7.13.3], pid[7], build[default/docker/5d21bea28db1e89ecc1f66311ebdec9dc3aa7d64/2021-07-02T12:06:10.804015202Z], OS[Linux/5.4.0-105-generic/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/16/16+36]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:46:56,157Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "JVM home [/usr/share/elasticsearch/jdk], using bundled JDK [true]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:46:56,157Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "JVM arguments [-Xshare:auto, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -XX:+ShowCodeDetailsInExceptionMessages, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=SPI,COMPAT, --add-opens=java.base/java.io=ALL-UNNAMED, -XX:+UseG1GC, -Djava.io.tmpdir=/tmp/elasticsearch-4171500607543486750, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Des.cgroups.hierarchy.override=/, -Xms4096m, -Xmx4096m, -XX:MaxDirectMemorySize=2147483648, -XX:G1HeapRegionSize=4m, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=15, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/usr/share/elasticsearch/config, -Des.distribution.flavor=default, -Des.distribution.type=docker, -Des.bundled_jdk=true]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,096Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [aggs-matrix-stats]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,096Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [analysis-common]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,096Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [constant-keyword]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,097Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [frozen-indices]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,098Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [ingest-common]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,098Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [ingest-geoip]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,100Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [ingest-user-agent]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,103Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [kibana]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,110Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [lang-expression]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,111Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [lang-mustache]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,112Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [lang-painless]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,112Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [mapper-extras]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,114Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [mapper-version]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,115Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [parent-join]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,115Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [percolator]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,116Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [rank-eval]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,118Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [reindex]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,119Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [repositories-metering-api]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,120Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [repository-encrypted]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,120Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [repository-url]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,123Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [runtime-fields-common]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,124Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [search-business-rules]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,124Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [searchable-snapshots]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,126Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [snapshot-repo-test-kit]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,127Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [spatial]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,128Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [transform]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,129Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [transport-netty4]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,135Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [unsigned-long]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,135Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [vectors]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,136Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [wildcard]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,137Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-aggregate-metric]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,138Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-analytics]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,139Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-async]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,139Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-async-search]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,140Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-autoscaling]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,142Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-ccr]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,142Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-core]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,146Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-data-streams]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,147Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-deprecation]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,148Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-enrich]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,149Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-eql]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,150Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-fleet]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,151Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-graph]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,152Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-identity-provider]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,153Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-ilm]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,154Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-logstash]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,155Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-ml]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,158Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-monitoring]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,159Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-ql]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,160Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-rollup]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,160Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-security]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,161Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-shutdown]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,162Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-sql]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,162Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-stack]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,166Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-text-structure]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,170Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-voting-only-node]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,172Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "loaded module [x-pack-watcher]" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,174Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "no plugins loaded" }
elasticsearch | {"type": "server", "timestamp": "2022-04-06T11:47:02,376Z", "level": "ERROR", "component": "o.e.b.ElasticsearchUncaughtExceptionHandler", "cluster.name": "docker-cluster", "node.name": "6f1df84c0b6e", "message": "uncaught exception in thread [main]",
elasticsearch | "stacktrace": ["org.elasticsearch.bootstrap.StartupException: ElasticsearchException[failed to bind service]; nested: AccessDeniedException[/usr/share/elasticsearch/data/nodes];",
elasticsearch | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-7.13.3.jar:7.13.3]",
elasticsearch | "at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-7.13.3.jar:7.13.3]",
elasticsearch | "at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75) ~[elasticsearch-7.13.3.jar:7.13.3]",
elasticsearch | "at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116) ~[elasticsearch-cli-7.13.3.jar:7.13.3]",
elasticsearch | "at org.elasticsearch.cli.Command.main(Command.java:79) ~[elasticsearch-cli-7.13.3.jar:7.13.3]",
elasticsearch | "at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) ~[elasticsearch-7.13.3.jar:7.13.3]",
elasticsearch | "at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81) ~[elasticsearch-7.13.3.jar:7.13.3]",
elasticsearch | "Caused by: org.elasticsearch.ElasticsearchException: failed to bind service",
elasticsearch | "at org.elasticsearch.node.Node.(Node.java:782) ~[elasticsearch-7.13.3.jar:7.13.3]",
elasticsearch | "at org.elasticsearch.node.Node.(Node.java:278) ~[elasticsearch-7.13.3.jar:7.13.3]",
elasticsearch | "at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:217) ~[elasticsearch-7.13.3.jar:7.13.3]",
elasticsearch | "at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:217) ~[elasticsearch-7.13.3.jar:7.13.3]",
elasticsearch | "at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:397) ~[elasticsearch-7.13.3.jar:7.13.3]",
elasticsearch | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.13.3.jar:7.13.3]",
elasticsearch | "... 6 more",
elasticsearch | "Caused by: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/data/nodes",
elasticsearch | "at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?]",
elasticsearch | "at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?]",
elasticsearch | "at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]",
elasticsearch | "at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:396) ~[?:?]",
elasticsearch | "at java.nio.file.Files.createDirectory(Files.java:694) ~[?:?]",
elasticsearch | "at java.nio.file.Files.createAndCheckIsDirectory(Files.java:801) ~[?:?]",
elasticsearch | "at java.nio.file.Files.createDirectories(Files.java:787) ~[?:?]",
elasticsearch | "at org.elasticsearch.env.NodeEnvironment.lambda$new$0(NodeEnvironment.java:265) ~[elasticsearch-7.13.3.jar:7.13.3]",
elasticsearch | "at org.elasticsearch.env.NodeEnvironment$NodeLock.(NodeEnvironment.java:202) ~[elasticsearch-7.13.3.jar:7.13.3]",
elasticsearch | "at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:262) ~[elasticsearch-7.13.3.jar:7.13.3]",
elasticsearch | "at org.elasticsearch.node.Node.(Node.java:368) ~[elasticsearch-7.13.3.jar:7.13.3]",
elasticsearch | "at org.elasticsearch.node.Node.(Node.java:278) ~[elasticsearch-7.13.3.jar:7.13.3]",
elasticsearch | "at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:217) ~[elasticsearch-7.13.3.jar:7.13.3]",
elasticsearch | "at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:217) ~[elasticsearch-7.13.3.jar:7.13.3]",
elasticsearch | "at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:397) ~[elasticsearch-7.13.3.jar:7.13.3]",
elasticsearch | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.13.3.jar:7.13.3]",
elasticsearch | "... 6 more"] }
elasticsearch | uncaught exception in thread [main]
elasticsearch | ElasticsearchException[failed to bind service]; nested: AccessDeniedException[/usr/share/elasticsearch/data/nodes];
elasticsearch | Likely root cause: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/data/nodes
elasticsearch | at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
elasticsearch | at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
elasticsearch | at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
elasticsearch | at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:396)
elasticsearch | at java.base/java.nio.file.Files.createDirectory(Files.java:694)
elasticsearch | at java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:801)
elasticsearch | at java.base/java.nio.file.Files.createDirectories(Files.java:787)
elasticsearch | at org.elasticsearch.env.NodeEnvironment.lambda$new$0(NodeEnvironment.java:265)
elasticsearch | at org.elasticsearch.env.NodeEnvironment$NodeLock.(NodeEnvironment.java:202)
elasticsearch | at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:262)
elasticsearch | at org.elasticsearch.node.Node.(Node.java:368)
elasticsearch | at org.elasticsearch.node.Node.(Node.java:278)
elasticsearch | at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:217)
elasticsearch | at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:217)
elasticsearch | at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:397)
elasticsearch | at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
elasticsearch | at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
elasticsearch | at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75)
elasticsearch | at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116)
elasticsearch | at org.elasticsearch.cli.Command.main(Command.java:79)
elasticsearch | at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
elasticsearch | at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81)
elasticsearch | For complete error details, refer to the log at /usr/share/elasticsearch/logs/docker-cluster.log
elasticsearch exited with code 1
ohp_1 | ______ __ _____ _____
ohp_1 | / __ \ \ / /\ / | __
ohp_1 | | | | \ \ /\ / / \ | (
| |) |
ohp_1 | | | | |\ / / / /\ \ _
| /
ohp_1 | | |
| | \ /\ / ____ \ ) | |
ohp_1 | _
/ / /
/ __
/||
ohp_1 | _ _ _____ _
ohp_1 | | | | | | __ \ | |
ohp_1 | | || | ___ _ __ ___ _ _| |) |__ | |

ohp_1 | | __ |/ _ | "_ \ / _ \ | | | / _ | __|
ohp_1 | | | | | (
) | | | | __/ |
| | | | (
) | |_
ohp_1 | || ||_/|| ||_|_, || ___/ _|
ohp_1 | / |
ohp_1 | |
/
ohp_1 |
ohp_1 | [X] [2022-04-06 11:47:04] Cannot connect to elasticsearch
ohp_1 | python-honeypot-master_ohp_1 exited with code 1
root@ub-c2:/home/sk/Python-Honeypot-master# cat /usr/share/elasticsearch/logs/docker-cluster.log
cat: /usr/share/elasticsearch/logs/docker-cluster.log: No such file or directory


OS: Ubuntu

OS Version: 20 LTS

Python Version: Python 3.8.10

@spiderxm
Copy link
Collaborator

try to reduce the RAM allocated to elastic search from 4gb to 1gb in docker file

replace this

     - "ES_JAVA_OPTS=-Xms4096m -Xmx4096m"

with

      - "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"

in docker-compose.yml

@Ali-Razmjoo
Copy link
Collaborator

still facing the issue?

@kashmax
Copy link
Author

kashmax commented Jul 17, 2022

still facing the issue?

Thanks for the reply

Let me check.

P.S. I am accessing the machine remotely via ssh.

@kashmax
Copy link
Author

kashmax commented Jul 18, 2022

still facing the issue?

Hi,

docker-compose -f docker-compose.yml up

Still the same error.

Starting elasticsearch ... done Starting python-honeypot_ohp_1 ... done Starting grafana ... done Attaching to elasticsearch, python-honeypot_ohp_1, grafana grafana | mkdir: cannot create directory '/var/lib/grafana/plugins': Permission denied grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable. grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later grafana exited with code 1 elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:11,159Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "version[7.13.3], pid[6], build[default/docker/5d21bea28db1e89ecc1f66311ebdec9dc3aa7d64/2021-07-02T12:06:10.804015202Z], OS[Linux/5.4.0-122-generic/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/16/16+36]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:11,166Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "JVM home [/usr/share/elasticsearch/jdk], using bundled JDK [true]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:11,167Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "JVM arguments [-Xshare:auto, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -XX:+ShowCodeDetailsInExceptionMessages, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=SPI,COMPAT, --add-opens=java.base/java.io=ALL-UNNAMED, -XX:+UseG1GC, -Djava.io.tmpdir=/tmp/elasticsearch-10396742377549620063, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Des.cgroups.hierarchy.override=/, -Xms1024m, -Xmx1024m, -XX:MaxDirectMemorySize=536870912, -XX:G1HeapRegionSize=4m, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=15, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/usr/share/elasticsearch/config, -Des.distribution.flavor=default, -Des.distribution.type=docker, -Des.bundled_jdk=true]" } xelasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,586Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [aggs-matrix-stats]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,602Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [analysis-common]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,603Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [constant-keyword]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,604Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [frozen-indices]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,604Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [ingest-common]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,605Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [ingest-geoip]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,605Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [ingest-user-agent]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,607Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [kibana]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,607Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [lang-expression]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,608Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [lang-mustache]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,609Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [lang-painless]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,609Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [mapper-extras]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,610Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [mapper-version]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,610Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [parent-join]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,610Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [percolator]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,610Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [rank-eval]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,611Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [reindex]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,611Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [repositories-metering-api]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,611Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [repository-encrypted]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,612Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [repository-url]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,612Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [runtime-fields-common]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,612Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [search-business-rules]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,613Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [searchable-snapshots]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,614Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [snapshot-repo-test-kit]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,614Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [spatial]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,614Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [transform]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,615Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [transport-netty4]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,615Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [unsigned-long]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,615Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [vectors]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,616Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [wildcard]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,616Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-aggregate-metric]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,617Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-analytics]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,617Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-async]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,618Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-async-search]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,618Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-autoscaling]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,618Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-ccr]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,619Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-core]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,619Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-data-streams]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,619Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-deprecation]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,620Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-enrich]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,620Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-eql]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,621Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-fleet]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,621Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-graph]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,621Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-identity-provider]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,622Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-ilm]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,622Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-logstash]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,622Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-ml]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,622Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-monitoring]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,623Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-ql]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,623Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-rollup]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,624Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-security]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,624Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-shutdown]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,625Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-sql]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,625Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-stack]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,627Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-text-structure]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,627Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-voting-only-node]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,628Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "loaded module [x-pack-watcher]" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,629Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "no plugins loaded" } elasticsearch | {"type": "server", "timestamp": "2022-07-18T07:50:14,724Z", "level": "ERROR", "component": "o.e.b.ElasticsearchUncaughtExceptionHandler", "cluster.name": "docker-cluster", "node.name": "bffae7bdf303", "message": "uncaught exception in thread [main]", elasticsearch | "stacktrace": ["org.elasticsearch.bootstrap.StartupException: ElasticsearchException[failed to bind service]; nested: AccessDeniedException[/usr/share/elasticsearch/data/nodes];", elasticsearch | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-7.13.3.jar:7.13.3]", elasticsearch | "at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-7.13.3.jar:7.13.3]", elasticsearch | "at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75) ~[elasticsearch-7.13.3.jar:7.13.3]", elasticsearch | "at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116) ~[elasticsearch-cli-7.13.3.jar:7.13.3]", elasticsearch | "at org.elasticsearch.cli.Command.main(Command.java:79) ~[elasticsearch-cli-7.13.3.jar:7.13.3]", elasticsearch | "at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) ~[elasticsearch-7.13.3.jar:7.13.3]", elasticsearch | "at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81) ~[elasticsearch-7.13.3.jar:7.13.3]", elasticsearch | "Caused by: org.elasticsearch.ElasticsearchException: failed to bind service", elasticsearch | "at org.elasticsearch.node.Node.<init>(Node.java:782) ~[elasticsearch-7.13.3.jar:7.13.3]", elasticsearch | "at org.elasticsearch.node.Node.<init>(Node.java:278) ~[elasticsearch-7.13.3.jar:7.13.3]", elasticsearch | "at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:217) ~[elasticsearch-7.13.3.jar:7.13.3]", elasticsearch | "at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:217) ~[elasticsearch-7.13.3.jar:7.13.3]", elasticsearch | "at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:397) ~[elasticsearch-7.13.3.jar:7.13.3]", elasticsearch | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.13.3.jar:7.13.3]", elasticsearch | "... 6 more", elasticsearch | "Caused by: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/data/nodes", elasticsearch | "at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?]", elasticsearch | "at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?]", elasticsearch | "at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]", elasticsearch | "at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:396) ~[?:?]", elasticsearch | "at java.nio.file.Files.createDirectory(Files.java:694) ~[?:?]", elasticsearch | "at java.nio.file.Files.createAndCheckIsDirectory(Files.java:801) ~[?:?]", elasticsearch | "at java.nio.file.Files.createDirectories(Files.java:787) ~[?:?]", elasticsearch | "at org.elasticsearch.env.NodeEnvironment.lambda$new$0(NodeEnvironment.java:265) ~[elasticsearch-7.13.3.jar:7.13.3]", elasticsearch | "at org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:202) ~[elasticsearch-7.13.3.jar:7.13.3]", elasticsearch | "at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:262) ~[elasticsearch-7.13.3.jar:7.13.3]", elasticsearch | "at org.elasticsearch.node.Node.<init>(Node.java:368) ~[elasticsearch-7.13.3.jar:7.13.3]", elasticsearch | "at org.elasticsearch.node.Node.<init>(Node.java:278) ~[elasticsearch-7.13.3.jar:7.13.3]", elasticsearch | "at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:217) ~[elasticsearch-7.13.3.jar:7.13.3]", elasticsearch | "at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:217) ~[elasticsearch-7.13.3.jar:7.13.3]", elasticsearch | "at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:397) ~[elasticsearch-7.13.3.jar:7.13.3]", elasticsearch | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.13.3.jar:7.13.3]", elasticsearch | "... 6 more"] } elasticsearch | uncaught exception in thread [main] elasticsearch | ElasticsearchException[failed to bind service]; nested: AccessDeniedException[/usr/share/elasticsearch/data/nodes]; elasticsearch | Likely root cause: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/data/nodes elasticsearch | at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) elasticsearch | at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) elasticsearch | at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) elasticsearch | at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:396) elasticsearch | at java.base/java.nio.file.Files.createDirectory(Files.java:694) elasticsearch | at java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:801) elasticsearch | at java.base/java.nio.file.Files.createDirectories(Files.java:787) elasticsearch | at org.elasticsearch.env.NodeEnvironment.lambda$new$0(NodeEnvironment.java:265) elasticsearch | at org.elasticsearch.env.NodeEnvironment$NodeLock.<init>(NodeEnvironment.java:202) elasticsearch | at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:262) elasticsearch | at org.elasticsearch.node.Node.<init>(Node.java:368) elasticsearch | at org.elasticsearch.node.Node.<init>(Node.java:278) elasticsearch | at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:217) elasticsearch | at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:217) elasticsearch | at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:397) elasticsearch | at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) elasticsearch | at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) elasticsearch | at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75) elasticsearch | at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116) elasticsearch | at org.elasticsearch.cli.Command.main(Command.java:79) elasticsearch | at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) elasticsearch | at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81) elasticsearch | For complete error details, refer to the log at /usr/share/elasticsearch/logs/docker-cluster.log elasticsearch exited with code 1 ohp_1 | ______ __ _____ _____ ohp_1 | / __ \ \ / /\ / ____| __ \ ohp_1 | | | | \ \ /\ / / \ | (___ | |__) | ohp_1 | | | | |\ \/ \/ / /\ \ \___ \| ___/ ohp_1 | | |__| | \ /\ / ____ \ ____) | | ohp_1 | \____/ \/ \/_/ \_\_____/|_| ohp_1 | _ _ _____ _ ohp_1 | | | | | | __ \ | | ohp_1 | | |__| | ___ _ __ ___ _ _| |__) |__ | |_ ohp_1 | | __ |/ _ \| "_ \ / _ \ | | | ___/ _ \| __| ohp_1 | | | | | (_) | | | | __/ |_| | | | (_) | |_ ohp_1 | |_| |_|\___/|_| |_|\___|\__, |_| \___/ \__| ohp_1 | __/ | ohp_1 | |___/ ohp_1 | ohp_1 | [X] [2022-07-18 07:50:37] Cannot connect to elasticsearch ohp_1 | python-honeypot_ohp_1 exited with code 1

@Ali-Razmjoo
Copy link
Collaborator

how much memory your machine has? it seems you having some memory issues.

XX:+UseG1GC, -Djava.io.tmpdir=/tmp/elasticsearch-4171500607543486750, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -

@kashmax
Copy link
Author

kashmax commented Jul 22, 2022

how much memory your machine has? it seems you having some memory issues.

XX:+UseG1GC, -Djava.io.tmpdir=/tmp/elasticsearch-4171500607543486750, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -

Thanks for your reply
I increased to 12G but still not working

root@ub-c2:/home/sk/Python-Honeypot# free -m
              total        used        free      shared  buff/cache   available
Mem:          11739         216       10917           1         606       11274
Swap:          4095           0        4095
root@ub-c2:/home/sk/Python-Honeypot#

@spankywetfish
Copy link

I've just had the same problem, it appears to have been primarily down to perms after install.
i.e.
grafana | mkdir: cannot create directory '/var/lib/grafana/plugins': Permission denied
and
elasticsearch | "stacktrace": ["org.elasticsearch.bootstrap.StartupException: ElasticsearchException[failed to bind service]; nested: AccessDeniedException[/usr/share/elasticsearch/data/nodes];",

The quick fix for me was to add group write perms to the data folder with chmod -R g+w data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants