Harvest

 View Only
  • 1.  DOCKER CONTAINER PROBLEM

    Posted 13 days ago
    Hi

    We want to use hco command in docker container.
    So I created an image of the command line utility and ran the container.

    I added the broker name to the container hosts file.

    I checked that the port is connected to the broker by using telnet and ping.
    ping EDCM          : OK
    telnet EDCM 5101 : OK

    However, if you use the hco command, you cannot connect to the broker as shown below.
    E0306003e: Could not connect to Broker: EDCM (Error Code = -306 ).
    Error: Could not attach to broker.


    Have you ever used hco command in a docker container?


  • 2.  RE: DOCKER CONTAINER PROBLEM

    Posted 11 days ago

    I haven't done this with docker but the hco and hci commands use more ports than just 5101. If i were you, I'd try a simple hchu or hsql command to start.

    If you have access to the harvest server, check to see if there is a direct_connect_port_range value in your $RTHOME/standard/rtserver.cm. That is where you'll see the port range that harvest will use if you're not using the default. The Implementation guide has more information about that too. Anyway, you may need to expose all those ports. 

    You might also want to look at just having the harvest cli installed on the docker host, hco the files to a say a ./src subdirectory and then start as many containers as you want e.g.
    docker run --rm -v $(pwd)/src:/src -w /src imagename bash

    Or add the hco to a build script just before you docker build command. Then you just need a COPY ./src /src line in your Dockerfile

    Both of those will keep the image size smaller. I'm guessing don't need the harvest cli in your image just the files from harvest.