# Unable to start python django APM

**URL:** <https://discuss.elastic.co/t/unable-to-start-python-django-apm/243034>\
**Category:** APM\
**Tags:** python\
**Created:** [July 29, 2020, 10:39am UTC](https://discuss.elastic.co/t/unable-to-start-python-django-apm/243034 "2020-07-29T10:39:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![itssameer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itssameer/32/45030_2.png) [@itssameer](https://discuss.elastic.co/u/itssameer)\
**Post date:** [July 29, 2020, 10:39am UTC](https://discuss.elastic.co/t/unable-to-start-python-django-apm/243034/1 "2020-07-29T10:39:20Z")

</div>

Hi ,

I have installed latest version of python agent, apm-server & ELK stack. But i am unable to find the service in APM dashboard. I can see the below error log in apm-server logs:

_**2020-07-29T10:26:27.692Z ERROR [request] middleware/log\_middleware.go:95 404 page not found {"request\_id": "9f3a51bb-1e2b-4f82-ae8d-024258c4fc18", "method": "POST", "URL": "/v1/transactions", "content\_length": 1765, "remote\_address": "127.0.0.1", "user-agent": "elasticapm-python/2.0.0", "response\_code": 404, "error": "404 page not found"}**_

Please help.

---

<div class="post-metadata">

**Author:** ![itssameer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itssameer/32/45030_2.png) [@itssameer](https://discuss.elastic.co/u/itssameer)\
**Post date:** [July 29, 2020, 10:40am UTC](https://discuss.elastic.co/t/unable-to-start-python-django-apm/243034/2 "2020-07-29T10:40:15Z")

</div>

I have added the below configuration in my django application file:

INSTALLED\_APPS = (  
'elasticapm.contrib.django',  
)

ELASTIC\_APM = {  
'SERVICE\_NAME': 'Staging-API'  
'SERVER\_URL': '[http://localhost:8200](https://www.google.com/url?q=http://localhost:8200&sa=D&source=hangouts&ust=1596007417069000&usg=AFQjCNHRBTg1niiCJdtidUc8U1DYzraIxA)',  
}

MIDDLEWARE = (  
'elasticapm.contrib.django.middleware.TracingMiddleware',  
)

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [July 30, 2020, 9:03am UTC](https://discuss.elastic.co/t/unable-to-start-python-django-apm/243034/3 "2020-07-30T09:03:48Z")

</div>

Hi and thanks for your question.

It looks like you're using an incompatible combination of the Python agent and APM Server version. I suggest updating to the latest Python agent version.

See also [https://www.elastic.co/guide/en/apm/get-started/current/agent-server-compatibility.html](https://www.elastic.co/guide/en/apm/get-started/current/agent-server-compatibility.html)

---

<div class="post-metadata">

**Author:** ![itssameer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itssameer/32/45030_2.png) [@itssameer](https://discuss.elastic.co/u/itssameer)\
**Post date:** [August 4, 2020, 7:30am UTC](https://discuss.elastic.co/t/unable-to-start-python-django-apm/243034/4 "2020-08-04T07:30:52Z")

</div>

Hi Barny,

Below are my python agent & apm-server version. Kindly help

_ **Name: elastic-apm** _

_ **Version: 5.8.1** _

_ **Name: apm-server** _

_ **Version: 7.8.0** _

---

<div class="post-metadata">

**Author:** ![basepi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/basepi/32/53056_2.png) [@basepi](https://discuss.elastic.co/u/basepi)\
**Post date:** [August 4, 2020, 2:42pm UTC](https://discuss.elastic.co/t/unable-to-start-python-django-apm/243034/5 "2020-08-04T14:42:04Z")

</div>

Can you try uninstalling and reinstalling the python agent? The reason we think you may be on an old version is that the error is showing from a `/v1/transactions` URL -- modern versions of the agent send to `/intake/v2/events`.

`pip freeze` from inside your app's virtualenv would also be useful.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 1, 2020, 2:42pm UTC](https://discuss.elastic.co/t/unable-to-start-python-django-apm/243034/6 "2020-09-01T14:42:07Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
