reportportal
reportportal copied to clipboard
No python application found - service-metrics-gatherer
Hello, I am hoping someone can help me with this error I am getting on a new installation of Report Portal with Docker on Ubuntu 20.04. I have scoured the web for a fix and cannot find one.
This is what I am seeing in the Container log:
The error is from reportportal_metrics-gatherer_1 container.
Error: {"log":"--- no python application found, check your startup logs for errors ---\n","stream":"stderr","time":"2022-06-08T21:32:33.566627977Z"} {"log":"[pid: 7|app: -1|req: -1/1170] 127.0.0.1 () {28 vars in 294 bytes} [Wed Jun 8 21:32:33 2022] GET / =\u003e generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)\n","stream":"stderr","time":"2022-06-08T21:32:33.566660879Z"}
And from docker ps
3ac629b7f73c reportportal/service-metrics-gatherer:1.1.19 "/venv/bin/uwsgi --h…" 20 hours ago Up 20 hours (unhealthy) 5000/tcp reportportal_metrics-gatherer_1
download the latest repo, and exec:
docker build -t reportportal/service-metrics-gatherer:local .
and modify the docker-compose.yml's image
Thank you @kisscelia . I have been on leave and will give it a try.
When you say modify docker-compose.yml's image I am unsure what you mean? Currently it is default.
Can you advise?
Thank you @kisscelia . I have been on leave and will give it a try.
When you say modify docker-compose.yml's image I am unsure what you mean? Currently it is default.
Can you advise?
I mean that you can change the image to reportportal/service-metrics-gatherer:local which you build locally.
So, you can use the latest code.
I am also facing similar issue, and looks like this is the issue in metrics-gatherer code.
spawned uWSGI worker 1 (pid: 7, cores: 1) spawned uWSGI http 1 (pid: 8) Traceback (most recent call last): File "main.py", line 24, in
from flask import Flask, Response File "/venv/lib/python3.7/site-packages/flask/init.py", line 14, in from jinja2 import escape ImportError: cannot import name 'escape' from 'jinja2' (/venv/lib/python3.7/site-packages/jinja2/init.py) unable to load app 0 (mountpoint='') (callable not found or import error) *** no app loaded. going in full dynamic mode ***
for this problem, i found following solution on stack over flow.
I am also facing similar issue, and looks like this is the issue in metrics-gatherer code.
spawned uWSGI worker 1 (pid: 7, cores: 1) spawned uWSGI http 1 (pid: 8) Traceback (most recent call last): File "main.py", line 24, in from flask import Flask, Response File "/venv/lib/python3.7/site-packages/flask/init.py", line 14, in from jinja2 import escape ImportError: cannot import name 'escape' from 'jinja2' (/venv/lib/python3.7/site-packages/jinja2/init.py) unable to load app 0 (mountpoint='') (callable not found or import error) *** no app loaded. going in full dynamic mode ***
for this problem, i found following solution on stack over flow.
I think, the source code is updated. but the docker image was not. so we only have to rebuild the image and run.
@kisscelia Can you please let me know the branch or tag to pull and documentation to build the service.
@kisscelia Can you please let me know the branch or tag to pull and documentation to build the service.
Hi, @Erankur91
please pull the latest code:
git clone https://github.com/reportportal/service-metrics-gatherer.git
cd service-metrics-gatherer
docker build -t reportportal/service-metrics-gatherer:local .
cd reportportal
and modify the docker-compose.yml file.
and then you can use the image that you build locally.
@kisscelia Can you please let me know the branch or tag to pull and documentation to build the service.
Maybe you can use the latest image in the docker hub.
It was built 9 days ago. but I don't try it......
As @Erankur91 said, quick solution from StackOverfow is to run: pip uninstall flask then pip install flask inside the container and after restart it is OK.
Hi @WaddyAU , @Erankur91, as i see you have found the solution, is the issue still actual or can be closed?
@MaryiaRymarchyk : Thanks to everyone. The solution worked for me. Please close.