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

404 Not found /app-...-min.js and /app-...-min.css #2153

Closed
felodel opened this issue Aug 1, 2018 · 13 comments
Closed

404 Not found /app-...-min.js and /app-...-min.css #2153

felodel opened this issue Aug 1, 2018 · 13 comments
Labels

Comments

@felodel
Copy link

felodel commented Aug 1, 2018

Hello,

I deployed zipkin on kubernetes but when i try to access to zipkin, it not found:

  • app-6a05bdd92a449a6ee72a.min.css
  • app-6a05bdd92a449a6ee72a.min.js

https://hostname/zipkin/app-6a05bdd92a449a6ee72a.min.js

timestamp 2018-08-01T09:31:28.410+0000
status 404
error Not Found
message Not Found
path /app-6a05bdd92a449a6ee72a.min.js

https://hostname/zipkin/app-6a05bdd92a449a6ee72a.min.css

timestamp 2018-08-01T09:31:28.410+0000
status 404
error Not Found
message Not Found
path /app-6a05bdd92a449a6ee72a.min.css

https://hostname/zipkin/zipkin/config.json
environment | ""
queryLimit | 10
defaultLookback | 3600000
instrumented | ".*"
logsUrl | null
basepath | "/zipkin"
searchEnabled | true
dependency |  
lowErrorRate | 0.5
highErrorRate | 0.75

my k8s ingress:
{
"path": "/zipkin",
"backend": {
"serviceName": "zipkin-service",
"servicePort": 9411
}
},

In local with docker, It runs correctly.

Thank you for your time.

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Aug 1, 2018 via email

@felodel
Copy link
Author

felodel commented Aug 2, 2018

Hello Adrian,

Thank you for your help.

I have already tried:

     - name: ZIPKIN_UI_BASEPATH
       value: "/zipkin/zipkin

I check that the env parameter is set. I check it in /zipkin/env :

ZIPKIN_UI_BASEPATH | "/zipkin/zipkin"

Nevertheless, zipkin don´t work.

I find a workaround to solve it: knikitin@6330e76

Using that docker image: knikitin/zipkin-service

But, that docker image is old (two years ago) and when I try to regiter my application in zipkin with:

spring.zipkin.baseUrl= http://zipkin-service:9411
spring.sleuth.sampler.percentage= 0.2

My application don´t connect with zipkin.

I only want a zipkin in memory storage.

Any solution ?

Thank you for your time. :)

@codefromthecrypt
Copy link
Member

@zeagord do you have any hints or kubernetes deployment advice for this?

@felodel
Copy link
Author

felodel commented Aug 2, 2018

Adrian,

Do you now how I can generate a new image from https://github.com/openzipkin/zipkin where I modify zipkin-ui/js files?

like this commit: knikitin@6330e76

My problem is that there are zipkin-ui and zipkin-server with each poms, so I want a docker image with those changes and las version zipkin.

is It possible? do you have a dockerfile to generate a image?

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Aug 2, 2018 via email

@zeagord
Copy link
Member

zeagord commented Aug 2, 2018

Can you try set the base path to/? I'm using like the below one in the latest zipkin version and found no problems.

{
  "path": "/",
  "backend": {
  "serviceName": "zipkin-service",
  "servicePort": 9411
}

@felodel
Copy link
Author

felodel commented Aug 2, 2018

Helli @zeagord

I tried that solution:

        {
          "path": "/zipkin",
          "backend": {
            "serviceName": "zipkin-service",
            "servicePort": 9411
          }
        }

But, it doesn´t work.

I only solve with knikitin@6330e76

But my application doesn´t connect with zipkin.

So I want to create a new zipkin-ui docker image with relative url changes, but:

  • Do you know how can I create a one docker image with zipkin-server and zipkin-ui?
    or
  • Do you know how I can create two dokcer images (zipkin-server and zipkin-ui) and to run each other ?

That are my service and deployment on k8s:

apiVersion: v1
kind: Service
metadata:
name: zipkin-service
spec:
ports:

  • port: 9411
    targetPort: 9411
    name: http
    selector:
    app: zipkin
    type: NodePort

#Deployment
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: zipkin-deployment
spec:
selector:
matchLabels:
app: zipkin
replicas: 1 # tells deployment to run 2 pods matching the template
template: # create pods using pod definition in this template
metadata:
labels:
app: zipkin
spec:
containers:
- name: zipkin
image: openzipkin/zipkin:2.10.4
imagePullPolicy: Always
env:
- name: ZIPKIN_UI_BASEPATH
value: "/zipkin/zipkin"

@felodel
Copy link
Author

felodel commented Aug 3, 2018

any solution ?
could you tell me how I can generate my own image zipkin from: https://github.com/openzipkin/zipkin?

I could change code as knikitin@6330e76 and to make a new image.

Or also I have thought that I could modify zipkin-server-shared.yml (base-path param), to set base-path: /zipkin/zipkin and remake a image.

What do you think about that?

Thank you for your time.

@zeagord
Copy link
Member

zeagord commented Aug 3, 2018

Small tip. Wrap the deployment script with ```. So that it will be readable.

Try the below deployment script. I assume you're using Minkube. If that's true. Enable the ingress by minikube addons enable ingress. If not you have choose a ingress controller.

apiVersion: v1
kind: Service
metadata:
  namespace: default
  name: zipkin-service
spec:
  ports:
    - port: 9411
  selector:
    app: zipkin

---

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  namespace: default
  name: zipkin
spec:
  replicas: 2
  selector:
    matchLabels:
      app: zipkin
  template:
    metadata:
      labels:
        app: zipkin
    spec:
      containers:
      - name: zipkin
        image: openzipkin/zipkin
      readinessProbe:
        httpGet:
        path: "/actuator/health"
        port: 9411
        initialDelaySeconds: 5
        
---

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: zipkin-ingress
  annotations:
    kubernetes.io/ingress.allow-http: "true"
spec:
  backend:
    serviceName: zipkin-service
    servicePort: 9411

@felodel
Copy link
Author

felodel commented Aug 3, 2018

I have my own ingress:

        {
          "path": "/zipkin",
          "backend": {
            "serviceName": "zipkin-service",
            "servicePort": 9411
          }
        },

and when I request: https://hostname/zipkin to carry on the same error with js and css

This is my ingress:

{
"kind": "Ingress",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "gateway-ingress",
"namespace": "default",
"selfLink": "/apis/extensions/v1beta1/namespaces/default/ingresses/gateway-ingress",
"uid": "ee983f7f-544e-11e8-a23a-005056941e4e",
"resourceVersion": "10060924",
"generation": 111,
"creationTimestamp": "2018-05-10T12:37:42Z",
"annotations": {
"ingress.kubernetes.io/secure-backends": "true",
"ingress.kubernetes.io/ssl-redirect": "false",
"kubernetes.io/ingress.class": "nginx",
"nginx.ingress.kubernetes.io/add-base-url": "true",
"nginx.ingress.kubernetes.io/rewrite-target": "/"
}
},
"spec": {
"backend": {
"serviceName": "default-http-backend",
"servicePort": 80
},
"tls": [
{
"hosts": [
"HOSTNAME"
],
"secretName": "tls-secret"
}
],
"rules": [
{
"host": "HOSTNAME",
"http": {
"paths": [
{
"path": "/device",
"backend": {
"serviceName": "deviceservice-service",
"servicePort": 7083
}
},
{
"path": "/pairing",
"backend": {
"serviceName": "pairingservice-service",
"servicePort": 15248
}
},
{
"path": "/frontendwebapps",
"backend": {
"serviceName": "frontendwebapps-service",
"servicePort": 7090
}
},
{
"path": "/zipkin",
"backend": {
"serviceName": "zipkin-service",
"servicePort": 9411
}
},
{
"path": "/config",
"backend": {
"serviceName": "fermaxconfigcloud-service",
"servicePort": 8888
}
},
{
"path": "/",
"backend": {
"serviceName": "oauth2service-service",
"servicePort": 8090
}
},
{
"path": "/admin",
"backend": {
"serviceName": "fermaxadmincloud-service",
"servicePort": 1111
}
},
{
"path": "/user",
"backend": {
"serviceName": "userservice-service",
"servicePort": 15245
}
},
{
"path": "/provisioning",
"backend": {
"serviceName": "provisioningfermaxservice-service",
"servicePort": 8889
}
},
{
"path": "/emma",
"backend": {
"serviceName": "emmafront-service",
"servicePort": 7082
}
},
{
"path": "/emmaback",
"backend": {
"serviceName": "emmaback-service",
"servicePort": 7081
}
},
{
"path": "/emu",
"backend": {
"serviceName": "emufront-service",
"servicePort": 7085
}
},
{
"path": "/twinchangehandler",
"backend": {
"serviceName": "twinchangehandlerservice-service",
"servicePort": 15250
}
},
{
"path": "/emuback",
"backend": {
"serviceName": "emuback-service",
"servicePort": 7093
}
}
]
}
}
]
},
"status": {
"loadBalancer": {
"ingress": [
{}
]
}
}
}

How can I user zipkin-ingress to request zipkin ?

Thank you for your help @zeagord

@zeagord
Copy link
Member

zeagord commented Aug 3, 2018

I honestly think, this is not a Zipkin issue since it has nothing to do it. It is more specific on how you design your ingress or routes. It should be a question that might be suit well for stackoverflow or kubernetes.

@felodel
Copy link
Author

felodel commented Aug 3, 2018

But the others services work ok, only zipkin doesn´t work. And when knikitin@6330e76 css and js is found. So If I change zipkin, zipkin will work.

If I user knikitin@6330e76 my appications aren´t registered on zipkin.

so I think, I need zipkin with changes in zipkin-ui or zipkin-server-shared.yml.

anyway, i will open a question on stackoverflow.

Thank you for your help @zeagord

anyway, how can I use zipkin-ingress to use zipkin ?

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Aug 3, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants