Docker-Compose and ELK, inaccessable from web

Below is my Docker-Compose file, I can't seem to access it when I type in the port and IP.

version: '2.2'
services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.16.2
    container_name: elasticsearch
    environment:
      - node.name=es01
      - discovery.type=single-node
      - cluster.name=es-docker-cluster
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
      - data01:/usr/share/elasticsearch/data
    ports:
      - 8443:9200 #re-route host 8443 port to docker 9200 port
  kibana:
    image: docker.elastic.co/kibana/kibana:7.16.2
    container_name: kibana
    environment:
      ELASTICSEARCH_URL: http://elasticsearch:8443
      ELASTICSEARCH_HOSTS: '["http://elasticsearch:8443"]'
    volumes:
      - ./kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml
    ports:
      - 9443:5601

  logstash:
    image: docker.elastic.co/logstash/logstash:7.16.2
    container_name: logstash
    environment:
      ELASTICSEARCH_URL: http://elasticsearch:8443
      ELASTICSEARCH_HOSTS: '["http://elasticsearch:8443"]'
    volumes:
      - ./logstash/config/logstashconfig.config:/usr/share/logstash/logstashC.config
    links: [elasticsearch]
    depends_on:
      - elasticsearch
    ports:
      - 80:5044
volumes:
  data01:
    driver: local

Here are some warnings I get on start up:
Geoip database issue

elasticsearch    | {"type": "server", "timestamp": "2022-01-18T18:37:27,281Z", "level": "ERROR", "component": "o.e.i.g.GeoIpDownloader", "cluster.name": "es-docker-cluster", "node.name": "es01", "message": "exception during geoip databases update", "cluster.uuid": "055GXghSTUmBAubBb_WgHw", "node.id": "jMO8BikrRfm0wrWPy9xVTw" , 
elasticsearch    | "stacktrace": ["java.net.SocketTimeoutException: Connect timed out",
elasticsearch    | "at sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:546) ~[?:?]",
elasticsearch    | "at sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597) ~[?:?]",
elasticsearch    | "at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) ~[?:?]",
elasticsearch    | "at java.net.Socket.connect(Socket.java:633) ~[?:?]",
elasticsearch    | "at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:299) ~[?:?]",
elasticsearch    | "at sun.net.NetworkClient.doConnect(NetworkClient.java:178) ~[?:?]",
elasticsearch    | "at sun.net.www.http.HttpClient.openServer(HttpClient.java:498) ~[?:?]",
elasticsearch    | "at sun.net.www.http.HttpClient.openServer(HttpClient.java:603) ~[?:?]",
elasticsearch    | "at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:266) ~[?:?]",
elasticsearch    | "at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:380) ~[?:?]",
elasticsearch    | "at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:189) ~[?:?]",
elasticsearch    | "at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1242) ~[?:?]",
elasticsearch    | "at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1128) ~[?:?]",
elasticsearch    | "at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:175) ~[?:?]",
elasticsearch    | "at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1665) ~[?:?]",
elasticsearch    | "at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589) ~[?:?]",
elasticsearch    | "at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:529) ~[?:?]",
elasticsearch    | "at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:308) ~[?:?]",
elasticsearch    | "at org.elasticsearch.ingest.geoip.HttpClient.lambda$get$0(HttpClient.java:55) ~[ingest-geoip-7.16.2.jar:7.16.2]",
elasticsearch    | "at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]",
elasticsearch    | "at org.elasticsearch.ingest.geoip.HttpClient.doPrivileged(HttpClient.java:97) ~[ingest-geoip-7.16.2.jar:7.16.2]",
elasticsearch    | "at org.elasticsearch.ingest.geoip.HttpClient.get(HttpClient.java:49) ~[ingest-geoip-7.16.2.jar:7.16.2]",
elasticsearch    | "at org.elasticsearch.ingest.geoip.HttpClient.getBytes(HttpClient.java:40) ~[ingest-geoip-7.16.2.jar:7.16.2]",
elasticsearch    | "at org.elasticsearch.ingest.geoip.GeoIpDownloader.fetchDatabasesOverview(GeoIpDownloader.java:135) ~[ingest-geoip-7.16.2.jar:7.16.2]",
elasticsearch    | "at org.elasticsearch.ingest.geoip.GeoIpDownloader.updateDatabases(GeoIpDownloader.java:123) ~[ingest-geoip-7.16.2.jar:7.16.2]",
elasticsearch    | "at org.elasticsearch.ingest.geoip.GeoIpDownloader.runDownloader(GeoIpDownloader.java:260) [ingest-geoip-7.16.2.jar:7.16.2]",
elasticsearch    | "at org.elasticsearch.ingest.geoip.GeoIpDownloaderTaskExecutor.nodeOperation(GeoIpDownloaderTaskExecutor.java:97) [ingest-geoip-7.16.2.jar:7.16.2]",
elasticsearch    | "at org.elasticsearch.ingest.geoip.GeoIpDownloaderTaskExecutor.nodeOperation(GeoIpDownloaderTaskExecutor.java:43) [ingest-geoip-7.16.2.jar:7.16.2]",
elasticsearch    | "at org.elasticsearch.persistent.NodePersistentTasksExecutor$1.doRun(NodePersistentTasksExecutor.java:42) [elasticsearch-7.16.2.jar:7.16.2]",
elasticsearch    | "at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:777) [elasticsearch-7.16.2.jar:7.16.2]",
elasticsearch    | "at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26) [elasticsearch-7.16.2.jar:7.16.2]",
elasticsearch    | "at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]",
elasticsearch    | "at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]",
elasticsearch    | "at java.lang.Thread.run(Thread.java:833) [?:?]"] }

I can't curl Elasticsearch or kibana either but I do see this:

elasticsearch    | {"type": "server", "timestamp": "2022-01-18T18:37:18,370Z", "level": "INFO", "component": "o.e.c.r.a.AllocationService", "cluster.name": "es-docker-cluster", "node.name": "es01", "message": "Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[.apm-custom-link][0], [.ds-.logs-deprecation.elasticsearch-default-2022.01.18-000001][0], [.kibana-event-log-7.16.2-000001][0], [.ds-ilm-history-5-2022.01.18-000001][0]]]).", "cluster.uuid": "055GXghSTUmBAubBb_WgHw", "node.id": "jMO8BikrRfm0wrWPy9xVTw"  }

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