Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network Error when I tried to access http://localhost:5252/allure-docker-service-ui/ #4

Closed
fescobar opened this issue Sep 1, 2020 · 7 comments
Labels
answered Question answered question Further information is requested

Comments

@fescobar
Copy link
Owner

fescobar commented Sep 1, 2020

When I tried to access to http://localhost:5252/allure-docker-service-ui/ returns this:
Screen Shot 2020-09-01 at 8 08 38 PM

@fescobar fescobar added the question Further information is requested label Sep 1, 2020
@fescobar
Copy link
Owner Author

fescobar commented Sep 1, 2020

You have 2 options to verify:
1- Check the access to API http://localhost:5050/allure-docker-service (the link shown in the page)
Screen Shot 2020-09-01 at 8 08 38 PM
If you don't have access to the Swagger API is because you need to start your frankescobar/allure-docker-service. Check if the container is up with:

docker ps

If the container is not up, start the container properly.

CONTAINER ID        IMAGE                                       COMMAND                  CREATED             STATUS                     PORTS                              NAMES
39f9bd405d8e        frankescobar/allure-docker-service:latest  "/bin/sh -c '$ROOT/r…"   4 minutes ago       Up 4 minutes (healthy)     4040/tcp, 0.0.0.0:5050->5050/tcp   ...

If you have access, you should see the Swagger page
Screen Shot 2020-09-01 at 8 14 31 PM

  1. If you can see the Swagger page and still the page error, you have to remove your current frankescobar/allure-docker-service version to pull again the latest one (remember the label latest could change their content during every release).
    First, we need to stop our containers. After that, we need to get the docker image id from the API container:
docker images | grep frankescobar/allure-docker-service

Output:

frankescobar/allure-docker-service           latest       xxxxxxxxxxxxx        5 hours ago         407MB
frankescobar/allure-docker-service-ui      latest       21cb2b71c087        7 hours ago         161MB

Where xxxxxxxxxxxxx is the docker image id. Now you need to remove your current latest version:

docker image rm -f xxxxxxxxxxxxx

With that API container removed it, when you try to run again your containers, a new frankescobar/allure-docker-service latest version will be pulled it again and when you try to access to http://localhost:5252/allure-docker-service-ui/ you will see the page working correctly.

@fescobar fescobar closed this as completed Sep 1, 2020
@fescobar fescobar added the answered Question answered label Sep 1, 2020
@fescobar fescobar mentioned this issue Sep 29, 2020
@zhaoyi007
Copy link

zhaoyi007 commented Dec 10, 2020

hi,According to your operation, it is still unable to solve the problem. What should I do?
I need it very much. @fescobar

@fescobar
Copy link
Owner Author

@zhaoyi007 To be sure that you are using the latest version, use the tag 2.13.6

    image: "frankescobar/allure-docker-service:2.13.6"
    environment:
      CHECK_RESULTS_EVERY_SECONDS: 1
      KEEP_HISTORY: 1
    ports:
      - "5050:5050"
    volumes:
      - ${PWD}/allure-results:/app/allure-results
      - ${PWD}/allure-reports:/app/default-reports

In case it doesn't work share your docker-compose?

@zhaoyi007
Copy link

First of all, thank you for your answer
I used the pytest example

version: '3'

services:
allure:
image: "frankescobar/allure-docker-service"
environment:
CHECK_RESULTS_EVERY_SECONDS: 1
KEEP_HISTORY: 1
ports:
- "5050:5050"
volumes:
- ${PWD}/allure-results:/app/allure-results
- ${PWD}/allure-reports:/app/default-reports

allure-ui:
image: "frankescobar/allure-docker-service-ui"
environment:
ALLURE_DOCKER_PUBLIC_API_URL: "http://localhost:5050"
ALLURE_DOCKER_PUBLIC_API_URL_PREFIX: ""
ports:
- "5252:5252"


This is the container log

allure-ui_1 | ALLURE_DOCKER_API_URL=http://localhost:5050/allure-docker-service
allure-ui_1 | ROUTER_BASE_NAME=/allure-docker-service-ui
allure_1 | Overriding configuration
allure_1 | Checking Allure Results every 1 second/s
allure_1 | ALLURE_VERSION: 2.13.6
allure_1 | Generating default report
allure_1 | Creating executor.json for PROJECT_ID: default
allure_1 | /app/generateAllureReport.sh: line 59: /app/allure-docker-api/static/projects/default/results/executor.json: Permission denied
allure_1 | Generating report for PROJECT_ID: default
allure_1 | [INFO] /app/allure-docker-api/app.py:163 Setting SECURITY_ENABLED=0 by default
allure_1 | Could not generate report
allure_1 | java.nio.file.AccessDeniedException: /app/allure-docker-api/static/projects/default/reports/latest
allure_1 | at java.base/sun.nio.fs.UnixException.translateToIOException(Unknown Source)
allure_1 | at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
allure_1 | at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
allure_1 | at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(Unknown Source)
allure_1 | at java.base/java.nio.file.Files.createDirectory(Unknown Source)
allure_1 | at java.base/java.nio.file.Files.createAndCheckIsDirectory(Unknown Source)
allure_1 | at java.base/java.nio.file.Files.createDirectories(Unknown Source)
allure_1 | at io.qameta.allure.CommonJsonAggregator.aggregate(CommonJsonAggregator.java:51)
allure_1 | at io.qameta.allure.CompositeAggregator.aggregate(CompositeAggregator.java:43)
allure_1 | at io.qameta.allure.ReportGenerator.aggregate(ReportGenerator.java:53)
allure_1 | at io.qameta.allure.ReportGenerator.generate(ReportGenerator.java:70)
allure_1 | at io.qameta.allure.ReportGenerator.generate(ReportGenerator.java:58)
allure_1 | at io.qameta.allure.Commands.generate(Commands.java:104)
allure_1 | at io.qameta.allure.CommandLine.run(CommandLine.java:152)
allure_1 | at io.qameta.allure.CommandLine$$Lambda$11/00000000F0339F40.get(Unknown Source)
allure_1 | at java.base/java.util.Optional.orElseGet(Unknown Source)
allure_1 | at io.qameta.allure.CommandLine.main(CommandLine.java:88)
allure_1 | ls: cannot access '/app/allure-docker-api/static/projects/default/reports/*': No such file or directory
allure_1 | Retrying call http://localhost:5050/allure-docker-service/emailable-report/render?project_id=default in 2 seconds
allure_1 | Retrying call http://localhost:5050/allure-docker-service/emailable-report/render?project_id=default in 2 seconds

@fescobar
Copy link
Owner Author

@zhaoyi007 that is a different problem not related with the UI. It's related to the backend.
You have a problem with permissions.
fescobar/allure-docker-service#108

@VahanA9
Copy link

VahanA9 commented Oct 11, 2022

Good evening
how i can delete swagger from Dockerfile , i don't want to use it .

@fescobar
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered Question answered question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants