Shields: Locally Self hosted Docker returns internal error

Created on 3 Apr 2020  路  8Comments  路  Source: badges/shields

I started the Docker container locally as per docks and the site runs fine. However none of the badges are created. Is there some component i miss? Are there any instructions to debug it?

image

question self-hosting

All 8 comments

Hi! Shields emits stack traces for the errors to standard output, so you should be able to get more details in the container.

Hi

this is what it reprots

2020-04-05T17:47:15.381086328Z: [ERROR]      at TokenPool._nextBatch (/usr/src/app/core/token-pooling/token-pool.js:268:11)
2020-04-05T17:47:15.381095828Z: [ERROR]      at TokenPool.next (/usr/src/app/core/token-pooling/token-pool.js:305:20)
2020-04-05T17:47:15.381099828Z: [ERROR]      at GithubApiProvider.tokenForUrl (/usr/src/app/services/github/github-api-provider.js:158:34)
2020-04-05T17:47:15.381103628Z: [ERROR]      at GithubApiProvider.request (/usr/src/app/services/github/github-api-provider.js:172:22)
2020-04-05T17:47:15.381107528Z: [ERROR]      at Promise (/usr/src/app/services/github/github-api-provider.js:211:12)
2020-04-05T17:47:15.381111228Z: [ERROR]      at new Promise (<anonymous>)
2020-04-05T17:47:15.381115328Z: [ERROR]      at GithubApiProvider.requestAsPromise (/usr/src/app/services/github/github-api-provider.js:210:12)
2020-04-05T17:47:15.381118928Z: [ERROR]      at GithubStars._requestFetcher (/usr/src/app/services/github/github-auth-service.js:13:23)
2020-04-05T17:47:15.381129928Z: [ERROR]      at GithubStars._request (/usr/src/app/core/base-service/base.js:230:40)
2020-04-05T17:47:15.381134528Z: [ERROR]      at GithubStars._requestJson (/usr/src/app/core/base-service/base-json.js:47:35)

here a more complete version just in case

Configuration:
{ bind: { address: '0.0.0.0' },
  metrics: { prometheus: { enabled: false } },
  ssl: { isSecure: false },
  cors: { allowedOrigin: [] },
  persistence: { dir: './private' },
  services:
   { github:
      { baseUri: 'https://api.github.com/',
        debug: { enabled: false, intervalSeconds: 200 } },
     trace: false },
  profiling: { makeBadge: false },
  cacheHeaders: { defaultCacheLengthSeconds: 120 },
  rateLimit: true,
  handleInternalErrors: true,
  fetchLimit: '10MB' }
0405173356 FsTokenPersistence configured with /usr/src/app/private/github-user-tokens.json
0405173356 Server is starting up: http://0.0.0.0/
0405174424 Error: Token pool is exhausted
    at TokenPool._nextBatch (/usr/src/app/core/token-pooling/token-pool.js:268:11)
    at TokenPool.next (/usr/src/app/core/token-pooling/token-pool.js:305:20)
    at GithubApiProvider.tokenForUrl (/usr/src/app/services/github/github-api-provider.js:156:33)
    at GithubApiProvider.request (/usr/src/app/services/github/github-api-provider.js:172:22)
    at Promise (/usr/src/app/services/github/github-api-provider.js:211:12)
    at new Promise (<anonymous>)
    at GithubApiProvider.requestAsPromise (/usr/src/app/services/github/github-api-provider.js:210:12)
    at GithubForks._requestFetcher (/usr/src/app/services/github/github-auth-service.js:13:23)
    at GithubForks._request (/usr/src/app/core/base-service/base.js:230:40)
    at GithubForks._requestGraphql (/usr/src/app/core/base-service/base-graphql.js:72:35)

so it looks i must be missing something?

To use the GitHub badges, you need to set a GitHub token:

https://github.com/badges/shields/blob/master/doc/server-secrets.md#github

In theory you should be able to generate 60 badges/hr without a token, however this isn't possible because of #2754.

Are you able to get any of the other, non-GitHub badges, to work?

excellent it now works on Azure with minimum efforts, I only added a GH_TOKEN through Azure UI. Great work guys!

I have another question, my needs are to support my Os project and I have shields public on Azure is there some setting that will allow only my Os organization repos to access it?

I have another question, my needs are to support my Os project and I have shields public on Azure is there some setting that will allow only my Os organization repos to access it?

No, there is nothing like this today. If you want to limit access, you'd probably have to host it inside your firewall.

You could also potentially restrict access to your self-hosted Shields instance leveraging Azure features (depending on which services you're leveraging)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

salaros picture salaros  路  3Comments

irgolic picture irgolic  路  3Comments

chadwhitacre picture chadwhitacre  路  4Comments

paulmelnikow picture paulmelnikow  路  3Comments

Turnerj picture Turnerj  路  3Comments