Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Django runserver not working in build machine

I am attempting to run a Django application using the `runserver` management command in a pipelines build machine. I am doing this so that I can perform some testing that requires a running django instance.

 

When I run the runserver command and tell it to run on `0.0.0.0:8000` it does not show the normal startup information, and if I run it with nohup and then try to curl `0.0.0.0:8000` on the build machine I get the error `0curl: (7) Failed to connect to 0.0.0.0 port 8000: Connection refused`.

I can successfully get the django app running with the same commands in a local version of the docker image the build machine uses, so it seems to be something specific to running on the build machine. I have also tried switching up the port it is running on to see if that resolves it but to no avail.

My pipeline looks like:

feature/automate-ui-tests:
- step:
name: Run UI tests
caches:
- node
- pip
script:
- apt-get update && apt-get install -y firefox chromium-browser libcurl4-openssl-dev libssl-dev
- pip3 install virtualenv
- virtualenv -p python3 venv
- . venv/bin/activate
- pip install -r app/test-requirements.txt
- export TZ='Pacific/Auckland'
- nvm install
- npm install
- nohup npm run start &
- python app/manage.py migrate --verbosity=3 --settings=app.settings.test-ui
- python app/manage.py createcachetable --verbosity=3 --settings=app.settings.test-ui
- nohup python app/manage.py runserver 0.0.0.0:8000 --verbosity=3 --settings=app.settings.test-ui & # this step is where I have an issue.
- npm run test-ui -- all -r spec,xunit:./app/test-reports/testcafe.xml
services:
- postgres
- redis

Any thoughts? The other management commands like `migrate` and `createcachetable` work fine so it seems to be specific to `runserver`.

 

Cheers,

1 answer

@Richard_Campen thank you for the question.

Can you share more output from runserver since you run it with verbosity 3, in the case without nohup using?

Perhaps, this way we will be able to help

Cheers,

Galyna

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,320 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you