reportportal icon indicating copy to clipboard operation
reportportal copied to clipboard

No python application found - service-metrics-gatherer

Open WaddyAU opened this issue 2 years ago • 9 comments

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

image

WaddyAU avatar Jun 08 '22 22:06 WaddyAU

download the latest repo, and exec: docker build -t reportportal/service-metrics-gatherer:local .

and modify the docker-compose.yml's image

kisscelia avatar Jun 22 '22 10:06 kisscelia

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?

WaddyAU avatar Jun 28 '22 22:06 WaddyAU

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. image

So, you can use the latest code.

kisscelia avatar Jun 30 '22 01:06 kisscelia

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.

Erankur91 avatar Jul 08 '22 08:07 Erankur91

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 avatar Jul 11 '22 09:07 kisscelia

@kisscelia Can you please let me know the branch or tag to pull and documentation to build the service.

Erankur91 avatar Jul 13 '22 06:07 Erankur91

@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. image

and then you can use the image that you build locally.

kisscelia avatar Jul 15 '22 01:07 kisscelia

@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. image

It was built 9 days ago. but I don't try it......

kisscelia avatar Jul 15 '22 01:07 kisscelia

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.

LubikR avatar Aug 19 '22 09:08 LubikR

Hi @WaddyAU , @Erankur91, as i see you have found the solution, is the issue still actual or can be closed?

MaryiaRymarchyk avatar May 16 '23 11:05 MaryiaRymarchyk

@MaryiaRymarchyk : Thanks to everyone. The solution worked for me. Please close.

WaddyAU avatar May 17 '23 23:05 WaddyAU