akamai / uls

Unified Log Streamer (ULS)
Apache License 2.0
30 stars 10 forks source link

[BUG]'docker run' goes successfully, but the container goes 'Exited (1)' status. #10

Closed hisashiyamaguchi closed 3 years ago

hisashiyamaguchi commented 3 years ago

I'm getting started ULS and trying to docker run on uls directory. It seems a container has been created successfully, but it goes 'Exited (1)' status automatically. I would like to see whether this is normal behavior or not, and it's not, I would like to see the workaround of the issue.

$ uname -a
Darwin tyo-mpy1d 19.6.0 Darwin Kernel Version 19.6.0: Thu May  6 00:48:39 PDT 2021; root:xnu-6153.141.33~1/RELEASE_X86_64 x86_64

$ pwd
~/uls

$ git branch
* main

$ /usr/local/bin/python3 --version
Python 3.9.6

$ cat ~/.edgerc
[default]
client_secret = xxxx
host = xxxx
access_token = xxxx
client_token = xxxx
contract_id = xxxx

$ docker -v
Docker version 20.10.0, build 7287ab3

$ docker login
Authenticating with existing credentials...
Login Succeeded

$ docker run -d --name uls_etp-threat -ti \
              --mount type=bind,source="/Users/hyamaguc/.edgerc",target="/opt/akamai-uls/.edgerc",readonly \
              akamai/uls \
              --input etp --feed threat --output tcp --host 10.10.10.10 --port 9091

cff6ec3ae16bb71fecbd7a3e835ddf535540dcf39a41b7a71246666ae5fc9ccd

$ docker ps -a
CONTAINER ID   IMAGE                      COMMAND                  CREATED              STATUS                          PORTS                      NAMES
0966eb2a9d71   akamai/uls                 "/usr/local/bin/pyth…"   About a minute ago   Exited (1) About a minute ago                              uls_etp-threat
bitonio commented 3 years ago

It should start pulling data and fail if 10.10.10.10 doesn't listen on port 9091. Glancing at the .edgerc file you shared, it sounds like you are missing the etp_config_id parameter.

hisashiyamaguchi commented 3 years ago

Thanks for the quick follow-up @bitonio . After adding etp_config_id on my .edgerc, it works!