Code Monkey home page Code Monkey logo

Comments (15)

frodenas avatar frodenas commented on August 11, 2024

Can you please try setting the GOPACKAGENAME to github.com/bosh-prometheus/firehose_exporter?

The go buildpack only detects dep dependencies starting at v1.8.9, so my guess is that you're using an older buildpack version. If that's the case, the GOPACKAGENAME env var must be set with the name of the package name (in this case, the github repo name).

from firehose_exporter.

prasadpete avatar prasadpete commented on August 11, 2024

Thanks for the reply @frodenas
I've tried after adding GOPACKAGENAME. Failed again with similar error :

-----> Running go build finalize
       Note: skipping (dep ensure) due to non-empty vendor directory.
       **WARNING** Installing package '.' (default)
-----> Running: go install -tags cloudfoundry -buildmode pie .
Exit status 0
Staging complete
Uploading droplet, build artifacts cache...
Uploading build artifacts cache...
Uploading droplet...
Uploaded build artifacts cache (216B)
Uploaded droplet (16.1M)
Uploading complete
Stopping instance d9e7780a-1278-4ac1-9d2a-5a04b1c8612d
Destroying container
Successfully destroyed container

0 of 1 instances running, 1 crashed
FAILED
Error restarting application: Start unsuccessful

I've pushed using the command cf push -b https://github.com/cloudfoundry/go-buildpack.git

from firehose_exporter.

frodenas avatar frodenas commented on August 11, 2024

This seems to be a different error. The first one reported was about not being able to stage the application. The latter one seems that the application has been staged but it's not started successfully. Have you tried to run cf logs <app-name> --recent to see if there's any error log?

from firehose_exporter.

prasadpete avatar prasadpete commented on August 11, 2024

Sure.
I get this error :

 2018-02-19T08:18:52.52+0100 [API/0] OUT App instance exited with guid c8c25db5-f122-40f6-8771-752282d24020 payload: {"instance"=>"43ebeb20-4e3a-45e8-5fc8-a79d", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"APP/PROC/WEB: Exited with status 1", "crash_count"=>2, "crash_timestamp"=>1519024732470658387, "version"=>"3f28c9cd-2e5c-43c2-9159-c63e730de051"}
   2018-02-19T08:18:52.53+0100 [CELL/0] OUT Creating container
   2018-02-19T08:18:52.91+0100 [CELL/0] OUT Successfully created container
   2018-02-19T08:18:53.02+0100 [CELL/0] OUT Successfully destroyed container
   2018-02-19T08:18:53.52+0100 [CELL/0] OUT Starting health monitoring of container
   2018-02-19T08:18:53.62+0100 [APP/PROC/WEB/0] ERR firehose_exporter: error: required flag --metrics.environment not provided, try --help
   2018-02-19T08:18:53.63+0100 [APP/PROC/WEB/0] OUT Exit status 1
   2018-02-19T08:18:53.64+0100 [CELL/0] OUT Exit status 0
   2018-02-19T08:18:53.64+0100 [CELL/0] OUT Stopping instance b3d09d1f-8e95-4fbd-6ca1-a71a
   2018-02-19T08:18:53.64+0100 [CELL/0] OUT Destroying container
   2018-02-19T08:18:53.66+0100 [API/1] OUT Process has crashed with type: "web"
   2018-02-19T08:18:53.67+0100 [API/1] OUT App instance exited with guid c8c25db5-f122-40f6-8771-752282d24020 payload: {"instance"=>"b3d09d1f-8e95-4fbd-6ca1-a71a", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"APP/PROC/WEB: Exited with status 1", "crash_count"=>3, "crash_timestamp"=>1519024733642539769, "version"=>"3f28c9cd-2e5c-43c2-9159-c63e730de051"}

from firehose_exporter.

frodenas avatar frodenas commented on August 11, 2024

error: required flag --metrics.environment not provided means you need to provide that flag, via Procfile or via the FIREHOSE_EXPORTER_METRICS_ENVIRONMENT environment variable.

from firehose_exporter.

prasadpete avatar prasadpete commented on August 11, 2024

Thanks alot @frodenas . This time it went through.

But, we are not getting a firehose-specific metrics, just the default metrics from the exporter. The logs shows errors like :

   2018-02-19T13:25:55.61+0100 [APP/PROC/WEB/0] ERR time="2018-02-19T12:25:55Z" level=error msg="Error getting oauth token: Received a status code 404 Not Found. Please check your Client ID and Secret." source="uaa_token_refresher.go:39"
   2018-02-19T13:25:55.61+0100 [APP/PROC/WEB/0] ERR time="2018-02-19T12:25:55Z" level=error msg="Error while reading from the Firehose: Received a status code 404 Not Found" source="firehose_nozzle.go:111"
   2018-02-19T13:25:59.63+0100 [APP/PROC/WEB/0] ERR time="2018-02-19T12:25:59Z" level=error msg="Error getting oauth token: Received a status code 404 Not Found. Please check your Client ID and Secret." source="uaa_token_refresher.go:39"
   2018-02-19T13:25:59.63+0100 [APP/PROC/WEB/0] ERR time="2018-02-19T12:25:59Z" level=error msg="Error while reading from the Firehose: Received a status code 404 Not Found" source="firehose_nozzle.go:111"

But I'm sure CLIENT_ID/SECRET that I've mentioned in the manifest.yml is valid and I'm able to authenticate using uaac token client get CLIENT_ID -s SECRET. Secret doesn't have any special character.

from firehose_exporter.

frodenas avatar frodenas commented on August 11, 2024

There're 2 things to check:

  1. The client ID has the right permissions as outlined at the README
  2. If you're using self-signed certificates, you're setting the FIREHOSE_EXPORTER_SKIP_SSL_VERIFY to true

from firehose_exporter.

prasadpete avatar prasadpete commented on August 11, 2024

@frodenas
Thank you. But,CLIENT_ID has right permissions as mentioned in the README.

ubuntu@bosh-stemcell:~$ uaac context

[1]*[https://uaa.sys.adp.allianz]
  skip_ssl_validation: true

  [2]*[prometheus-firehose]
      client_id: prometheus-firehose
      access_token: <token>
      token_type: bearer
      expires_in: 43199
      scope: doppler.firehose
      jti: 6bff49756e80466783532ff740ee2d7f

manifest.yml

applications:
  - name: firehoseexporter
    buildpack: go_buildpack
    env:
      GOPACKAGENAME: github.com/bosh-prometheus/firehose_exporter
      FIREHOSE_EXPORTER_SKIP_SSL_VERIFY: "true"
      FIREHOSE_EXPORTER_METRICS_ENVIRONMENT: "prod"
      FIREHOSE_EXPORTER_UAA_URL: "https://uaa.<domain>/"
      FIREHOSE_EXPORTER_UAA_CLIENT_ID: "prometheus-firehose"
      FIREHOSE_EXPORTER_UAA_CLIENT_SECRET: "pwd"
      FIREHOSE_EXPORTER_DOPPLER_URL: "wss://doppler.<domain>:443"

Still getting the same error as previous comment.

from firehose_exporter.

frodenas avatar frodenas commented on August 11, 2024

Try ssh'ing into the firehoseexporter container and do a curl to your uaa and doppler endpoints. Maybe there's a proxy or ASG preventing the container to access those endpoints.

from firehose_exporter.

prasadpete avatar prasadpete commented on August 11, 2024

Unfortunately, it looks like wss is not supported from container.

vcap@72fee689-c1ed-42a7-607c-de2a:~$ curl -i  "wss://doppler.<domain>:443"
curl: (1) Protocol wss not supported or disabled in libcurl

uaa:

vcap@72fee689-c1ed-42a7-607c-de2a:~$ curl -i https://uaa.<domain> -k
HTTP/1.1 302 Found
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Length: 0
Date: Wed, 21 Feb 2018 08:29:36 GMT
Expires: 0
Location: https://uaa.<domain>/login
Pragma: no-cache
Set-Cookie: X-Uaa-Csrf=2JTLG89YRbPAiXes3y6CU7; Max-Age=2592000; Expires=Fri, 23-Mar-2018 08:29:37 GMT; Secure; HttpOnly
Set-Cookie: JSESSIONID=A2BA57ECB6B89D751A3E3C9434122FB0; Path=/; Secure; HttpOnly
Set-Cookie: __VCAP_ID__=22bec785-a57b-4774-5ac7-6ae4b45381e3; Path=/; HttpOnly; Secure
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Vcap-Request-Id: 6375d0fe-dd70-4c5c-40dc-288d2b8ba5e0
X-Xss-Protection: 1; mode=block

from firehose_exporter.

frodenas avatar frodenas commented on August 11, 2024

Are you using a proxy? if yes, is possible that the proxy does not support wss protocols?

from firehose_exporter.

prasadpete avatar prasadpete commented on August 11, 2024

Hi @frodenas
Yes, we use proxy. But same results even when I ignore the proxy...

vcap@72fee689-c1ed-42a7-607c-de2a:~$ curl --noproxy '*' "wss://doppler.<domain>:443"
curl: (1) Protocol wss not supported or disabled in libcurl

:(

from firehose_exporter.

frodenas avatar frodenas commented on August 11, 2024

That's unrelated, the problem with that curl command is that does not support wss. Is there any way you can run the exporter without a proxy to test if this is the problem?

from firehose_exporter.

prasadpete avatar prasadpete commented on August 11, 2024

@frodenas Sorry for the confusion..
Actually, the container and the doppler are in same network. So, there is no need of proxy in our case.

from firehose_exporter.

frodenas avatar frodenas commented on August 11, 2024

try removing the trailing slash at FIREHOSE_EXPORTER_UAA_URL: "https://uaa.<domain>/" please. This slash was causing some problems at the cf_exporter (see cloudfoundry/cf_exporter#22)

from firehose_exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.