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

Allure-Docker-Service-UI ERR_ABORTED 404 #4

Closed
semihural opened this issue Oct 4, 2020 · 3 comments
Closed

Allure-Docker-Service-UI ERR_ABORTED 404 #4

semihural opened this issue Oct 4, 2020 · 3 comments
Labels
answered Question answered question Further information is requested

Comments

@semihural
Copy link

Hi @fescobar ,

I deployed allure-docker-service according to the documentation. I can able to access Allure Docker Service API (Swagger UI) from browser but I could not able to access the UI of https://xxx/allure-ui/allure-docker-service-ui/ although curl response is 200 as below.

I will be appreciate if you can help how can I access the UI of allure.

Here is the chrome console output when I try to access docker-service-ui
GET https://xxx/env-config.js net::ERR_ABORTED 404 (Not Found)

Here is ingress configuration.

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: allure-ingress-service-load-balancer
  namespace: allure-docker-service
  annotations:
    kubernetes.io/ingress.class: traefik
    traefik.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
    - host: xxxx
      http:
        paths:
          - path: /allure-api
            backend:
              serviceName: allure-service-load-balancer
              servicePort: 6060
          - path: /allure-ui
            backend:
              serviceName: allure-service-load-balancer
              servicePort: 7070

here are the pod logs

capel0068340585:~ semural$ kubectl logs -f allure-deployment-66ccc46d94-9xjwh -n allure-docker-service -c allure
ALLURE_VERSION: 2.13.5
Not checking results automatically
Opening existing report
[INFO] /app/allure-docker-api/app.py:132 Setting URL_PREFIX=/allure-api
[INFO] /app/allure-docker-api/app.py:140 Setting SECURITY_USER
[INFO] /app/allure-docker-api/app.py:146 Setting SECURITY_PASS
[INFO] /app/allure-docker-api/app.py:156 Setting SECURITY_ENABLED=0 by default
2020-10-04 11:18:14.496:INFO::main: Logging initialized @368ms to org.eclipse.jetty.util.log.StdErrLog
 kubectl logs -f allure-deployment-66ccc46d94-9xjwh -n allure-docker-service -c allure-ui
ALLURE_DOCKER_API_URL=https://xxx/allure-api/allure-docker-service
ROUTER_BASE_NAME=/allure-ui/allure-docker-service-ui
Here is the curl response

capel0068340585:~ semural$ curl https://xxx/allure-ui/allure-docker-service-ui -ik
HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: public, max-age=0
Content-Length: 2055
Content-Type: text/html; charset=UTF-8
Date: Sun, 04 Oct 2020 13:42:12 GMT
Etag: W/"807-17449812ec8"
Last-Modified: Tue, 01 Sep 2020 11:50:37 GMT
Vary: Accept-Encoding
X-Powered-By: Express

<!doctype html><html lang="en"><head><base href="/"/><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="shortcut icon" href="./favicon.ico"><title>Allure Docker Service UI</title><script src="./env-config.js"></script><link href="./static/css/main.2eaee7e6.chunk.css" rel="stylesheet"></head><body><div id="root"></div><script>!function(e){function r(r){for(var n,l,i=r[0],a=r[1],c=r[2],p=0,s=[];p<i.length;p++)l=i[p],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,c||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var a=t[i];0!==o[a]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="./";var i=this["webpackJsonpallure-docker-service-ui"]=this["webpackJsonpallure-docker-service-ui"]||[],a=i.push.bind(i);i.push=r,i=i.slice();for(var c=0;c<i.length;c++)r(i[c]);var f=a;t()}([])</script><script src="./static/js/2.305ecc37.chunk.js"></script><script src="./static/js/main.9d828d2f.chunk.js"></script></body></html>capel0068340585:~ semural$
@fescobar
Copy link
Owner

fescobar commented Oct 4, 2020

Hi @semihural
Seems to be Kubernetes is not prepared to serve SINGLE PAGE APPLICATIONS, for that reason you should add another path / to your ingress like in the example: https://github.com/fescobar/allure-docker-service-examples/blob/master/allure-docker-kubernetes-example/allure-ingress-service-load-balancer.yml#L29

        paths:
          - path: /allure-api/?(.*)
            backend:
              serviceName: allure-service-load-balancer
              servicePort: 6060
          # Share your configuration if you have a better way to handle a static website
          - path: /allure-ui/?(.*)
            backend:
              serviceName: allure-service-load-balancer
              servicePort: 7070
          - path: /?(.*)
            backend:
              serviceName: allure-service-load-balancer
              servicePort: 7070

The same I will check this problem on this ticket: fescobar/allure-docker-service-ui#7

@fescobar fescobar added the question Further information is requested label Oct 4, 2020
@semihural
Copy link
Author

Hi @fescobar ,

Yeah it works like that.. But my main host serving another services actually. I mean xxx.net ı ve zalenium hub running which I suppose I can manage allure using same host with sub-path.. Can it be alternative solution that no need to add path:/

@fescobar
Copy link
Owner

fescobar commented Nov 9, 2020

@semihural I understand, but I think that is the way it works Kubernetes. It's not oriented to static web pages.

@fescobar fescobar added the answered Question answered label Nov 9, 2020
@fescobar fescobar closed this as completed Nov 9, 2020
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

2 participants