Welcome to the Linux Foundation Forum!

Chapter 11: ./e2e.sh is failing

Posts: 39
edited October 2020 in LFS261 Class Forum

Looks like postgres is exiting out. Please suggest

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Comments

  • In such cases, to debug, check the logs for the service which is failing i.e. postgres.

    docker-compose logs db

    Root Cause:

    The docker image for db is been updated in the repository by the authors of this docker image. Since then, its expecting you to either provide a password, or enable trust authentication ( Which is disabled by default).

    To fix this, you would have to add POSTGRES_HOST_AUTH_METHOD var and set it to trust.

    1. db:
    2. image: postgres:9.4
    3. volumes:
    4. - db-data:/var/lib/postgresql/data
    5. environment:
    6. POSTGRES_HOST_AUTH_METHOD: trust
    7.  

    This should fix failing postgres db container.

  • I just found a different error in the script, to solve it I made some changes to the script. When the script is executed for the first time the phantomjs script return <!-- , unfortunately bash can't store that string in a variable so I think the sed command was for that. After that I checked if the string is only digits, if not I assume there are no votes yet and assign 1 to current variable.

    1. current=`phantomjs render.js "http://result:4000/" | grep -i vote | cut -d ">" -f 4 | cut -d " " -f1 | sed -e 's/\!//g'`
    2.  
    3. echo $current | grep -q -e "[0-9]\+"
    4. if [[ $? -ne 0 ]]; then
    5. current=1
    6. fi
  • Hi @elsanchez,

    Many thanks for confirming the fix for your case.

    Regards,
    Luis.

  • These kinds of fixes should be added as hyperlinks somewhere on the proper lesson ... because searching for solutions to common problems here is very hard

  • Hi @donquijotedelasnubes , sometimes the issue is associated to the specific environment/shell that the person is using to make the tests. I haven't heard of this issue previously.

    Regards,
    Luis.

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training