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

Compose not working #8

Open
renedlog opened this issue Feb 25, 2020 · 1 comment
Open

Compose not working #8

renedlog opened this issue Feb 25, 2020 · 1 comment

Comments

@renedlog
Copy link

Seems like the new docker-compose file is not working on windows due to a mongodb error.
https://actionml.com/docs/harness_container_guide

08:11:09.365 INFO  cluster           - Cluster created with settings {hosts=[mongo:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
08:11:09.408 INFO  package$          -

               _   _             __  __ _
     /\       | | (_)           |  \/  | |
    /  \   ___| |_ _  ___  _ __ | \  / | |
   / /\ \ / __| __| |/ _ \| '_ \| |\/| | |
  / ____ \ (__| |_| | (_) | | | | |  | | |____
 /_/    \_\___|\__|_|\___/|_| |_|_|  |_|______|

    _    _
   | |  | |
   | |__| | __ _ _ __ _ __   ___  ___ ___
   |  __  |/ _` | '__| '_ \ / _ \/ __/ __|
   | |  | | (_| | |  | | | |  __/\__ \__ \
   |_|  |_|\__,_|_|  |_| |_|\___||___/___/



08:11:09.491 INFO  cluster           - No server chosen by com.mongodb.async.client.ClientSessionHelper$1@f1a45f8 from cluster description ClusterDescription{type=UNKNOWN, connectionMode=SINGLE, serverDescriptions=[ServerDescription{address=mongo:27017, type=UNKNOWN, state=CONNECTING}]}. Waiting for 30000 ms before timing out
08:11:09.522 INFO  cluster           - No server chosen by com.mongodb.async.client.ClientSessionHelper$1@537c8c7e from cluster description ClusterDescription{type=UNKNOWN, connectionMode=SINGLE, serverDescriptions=[ServerDescription{address=mongo:27017, type=UNKNOWN, state=CONNECTING}]}. Waiting for 30000 ms before timing out
08:11:10.236 INFO  cluster           - Exception in monitor thread while connecting to server mongo:27017
com.mongodb.MongoSocketException: mongo: Name does not resolve
        at com.mongodb.ServerAddress.getSocketAddresses(ServerAddress.java:211)
        at com.mongodb.internal.connection.AsynchronousSocketChannelStream.openAsync(AsynchronousSocketChannelStream.java:58)
        at com.mongodb.internal.connection.AsynchronousChannelStream.open(AsynchronousChannelStream.java:112)
        at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:126)
        at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:117)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.UnknownHostException: mongo: Name does not resolve
        at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
        at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929)
        at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1324)
        at java.net.InetAddress.getAllByName0(InetAddress.java:1277)
        at java.net.InetAddress.getAllByName(InetAddress.java:1193)
        at java.net.InetAddress.getAllByName(InetAddress.java:1127)
        at com.mongodb.ServerAddress.getSocketAddresses(ServerAddress.java:203)
        ... 5 common frames omitted
08:11:10.739 INFO  cluster           - Exception in monitor thread while connecting to server mongo:27017
com.mongodb.MongoSocketException: mongo
        at com.mongodb.ServerAddress.getSocketAddresses(ServerAddress.java:211)
        at com.mongodb.internal.connection.AsynchronousSocketChannelStream.openAsync(AsynchronousSocketChannelStream.java:58)
        at com.mongodb.internal.connection.AsynchronousChannelStream.open(AsynchronousChannelStream.java:112)
        at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:126)
        at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:117)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.UnknownHostException: mongo
        at java.net.InetAddress.getAllByName0(InetAddress.java:1281)
        at java.net.InetAddress.getAllByName(InetAddress.java:1193)
        at java.net.InetAddress.getAllByName(InetAddress.java:1127)
        at com.mongodb.ServerAddress.getSocketAddresses(ServerAddress.java:203)
        ... 5 common frames omitted
08:11:14.530 ERROR MongoAsyncDao     - Sync DAO error
java.util.concurrent.TimeoutException: Futures timed out after [5 seconds]
        at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:223)
        at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:227)
        at scala.concurrent.Await$$anonfun$result$1.apply(package.scala:190)
        at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53)
        at scala.concurrent.Await$.result(package.scala:190)
        at com.actionml.core.store.SyncDao$class.sync(Dao.scala:70)
        at com.actionml.core.store.SyncDao$class.findMany(Dao.scala:81)
        at com.actionml.core.store.backends.MongoAsyncDao.findMany(MongoAsyncDao.scala:41)
        at com.actionml.core.store.SyncDao$class.findMany(Dao.scala:79)
        at com.actionml.core.store.backends.MongoAsyncDao.findMany(MongoAsyncDao.scala:41)
        at com.actionml.admin.MongoAdministrator.init(MongoAdministrator.scala:47)
        at com.actionml.BaseModule.administrator$lzycompute(HarnessServer.scala:76)
        at com.actionml.BaseModule.administrator(HarnessServer.scala:74)
        at com.actionml.BaseModule.<init>(HarnessServer.scala:81)
        at com.actionml.HarnessServer$.delayedEndpoint$com$actionml$HarnessServer$1(HarnessServer.scala:45)
        at com.actionml.HarnessServer$delayedInit$body.apply(HarnessServer.scala:43)
        at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
        at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
        at scala.App$$anonfun$main$1.apply(App.scala:76)
        at scala.App$$anonfun$main$1.apply(App.scala:76)
        at scala.collection.immutable.List.foreach(List.scala:392)
        at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
        at scala.App$class.main(App.scala:76)
        at com.actionml.HarnessServer$.main(HarnessServer.scala:43)
        at com.actionml.HarnessServer.main(HarnessServer.scala)
Exception in thread "main" java.util.concurrent.TimeoutException: Futures timed out after [5 seconds]
        at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:223)
        at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:227)
        at scala.concurrent.Await$$anonfun$result$1.apply(package.scala:190)
        at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53)
        at scala.concurrent.Await$.result(package.scala:190)
        at com.actionml.core.store.SyncDao$class.sync(Dao.scala:70)
        at com.actionml.core.store.SyncDao$class.findMany(Dao.scala:81)
        at com.actionml.core.store.backends.MongoAsyncDao.findMany(MongoAsyncDao.scala:41)
        at com.actionml.core.store.SyncDao$class.findMany(Dao.scala:79)
        at com.actionml.core.store.backends.MongoAsyncDao.findMany(MongoAsyncDao.scala:41)
        at com.actionml.admin.MongoAdministrator.init(MongoAdministrator.scala:47)
        at com.actionml.BaseModule.administrator$lzycompute(HarnessServer.scala:76)
        at com.actionml.BaseModule.administrator(HarnessServer.scala:74)
        at com.actionml.BaseModule.<init>(HarnessServer.scala:81)
        at com.actionml.HarnessServer$.delayedEndpoint$com$actionml$HarnessServer$1(HarnessServer.scala:45)
        at com.actionml.HarnessServer$delayedInit$body.apply(HarnessServer.scala:43)
        at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
        at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
        at scala.App$$anonfun$main$1.apply(App.scala:76)
        at scala.App$$anonfun$main$1.apply(App.scala:76)
        at scala.collection.immutable.List.foreach(List.scala:392)
        at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
        at scala.App$class.main(App.scala:76)
        at com.actionml.HarnessServer$.main(HarnessServer.scala:43)
        at com.actionml.HarnessServer.main(HarnessServer.scala)
Starting Harness server in the foreground, to run as a daemon use with "-d"
@renedlog
Copy link
Author

renedlog commented Feb 28, 2020

here is a small fix for anyone looking to run it.
I'll make a pull request as soon as I find time to do so....

services:
  harness:
    restart: always
    image: actionml/harness:develop
    container_name: harness
    ports:
      - "9090:9090"
    environment:
      MONGO_URI: mongodb://mongo:27017
      HARNESS_URI: http://0.0.0.0:9090
      ELASTICSEARCH_URI: http://elasticsearch:9200
    depends_on:
      - mongo
      - elasticsearch
    volumes:
      - HARNESS_LOGS:/harness/logs
      - HARNESS_DATA:/data
      
  mongo:
    restart: always
    image: mongo
    command: --logappend --logpath=/tmp/mongod.log
    ports:
      - 27017:27017
    volumes:
      - MONGO_LOGS:/logs
      - MONGO_DATA:/data/db

  elasticsearch:
    restart: always
    image: elasticsearch:7.6.0
    container_name: elasticsearch
    environment:
      ES_JAVA_OPTS: ${ES_JAVA_OPTS}
      discovery.seed_hosts: elasticsearch
      discovery.type: single-node
    ports:
      - "9200:9200"
    volumes:
      - ES_DATA:/usr/share/elasticsearch/data

  harness-cli:
    restart: always
    image: actionml/harness-cli:develop
    container_name: harness-cli
    environment:
        HARNESS_SERVER_ADDRESS: harness
    volumes:
    - HARNESS_DATA:/data

  watchtower:
    restart: always
    image: v2tec/watchtower
    container_name: watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: --interval 3000

volumes:
  MONGO_LOGS:
  MONGO_DATA:
  HARNESS_LOGS:
  HARNESS_DATA:
  ES_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

1 participant