Hello! I'm trying to launch heketi-ui under openshift 3.9 (kubernetes) and get this error messages in logs.
I have these environment variables and heketi work with them if I'm using heketi-cli
HEKETI_SERVER_URL=http://heketi-storage-glusterfs.paas.lab.test.com
HEKETI_SERVER_USER=admin
HEKETI_SERVER_SECRET=djfuH2vTfW2coydjfhHk/PzbYELyx+YQHxEi1CgRw=
[email protected] start /usr/src/app
| > node ./bin/www
|
| GET / 304 11.018 ms - -
| GET /inline.bundle.js 304 2.399 ms - -
| GET /styles.bundle.js 304 2.173 ms - -
| GET /polyfills.bundle.js 304 2.244 ms - -
| GET /vendor.bundle.js 304 2.093 ms - -
| GET /main.bundle.js 304 3.134 ms - -
| GET /assets/images/github-circle-white-transparent.svg 304 0.446 ms - -
| GET /api/clusters - - ms - -
| { Error: connect ETIMEDOUT 172.30.65.222:8080
| at Object._errnoException (util.js:992:11)
| at _exceptionWithHostPort (util.js:1014:20)
| at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)
| code: 'ETIMEDOUT',
| errno: 'ETIMEDOUT',
| syscall: 'connect',
| address: '172.30.65.222',
| port: 8080,
| config:
| { adapter: [Function: httpAdapter],
| transformRequest: { '0': [Function: transformRequest] },
| transformResponse: { '0': [Function: transformResponse] },
| timeout: 0,
| xsrfCookieName: 'XSRF-TOKEN',
| xsrfHeaderName: 'X-XSRF-TOKEN',
| maxContentLength: -1,
| validateStatus: [Function: validateStatus],
| headers:
| { Accept: 'application/json, text/plain, */*',
| 'Content-Type': 'application/json',
| Authorization: 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhZG1pbiIsImlhdCI6IjIwMTgtMTItMTFUMDg6MDU6MzArMDA6MDAiLCJleHAiOiIyMDE4LTEyLTE4VDA4OjA1OjMwKzAwOjAwIiwicXNoIjoiNDc0OWE1OWRlODdjMjdjOWIyZjQ5NWM1ZjEzMDliMjUyNTY4MWRmZTMwYzhhN2I4MzYyNTkwMWIxMzJhOWMyNiJ9.L5Bq_Rf_4BBsm-M-HyxWDQi4lYj9VLJ7wH8aDhE7oYQ',
| 'User-Agent': 'axios/0.17.1' },
| baseURL: 'http://heketi-storage.glusterfs.svc:8080' ,
| method: 'get',
| url: 'http://heketi-storage.glusterfs.svc:8080/clusters' ,
| params: undefined,
| data: undefined },
| request:
| Writable {
| _writableState:
| WritableState {
| objectMode: false,
| highWaterMark: 16384,
| finalCalled: false,
| needDrain: false,
| ending: false,
| ended: false,
| finished: false,
| destroyed: false,
| decodeStrings: true,
| defaultEncoding: 'utf8',
| length: 0,
| writing: false,
| corked: 0,
| sync: true,
| bufferProcessing: false,
| onwrite: [Function: bound onwrite],
| writecb: null,
| writelen: 0,
| bufferedRequest: null,
| lastBufferedRequest: null,
| pendingcb: 0,
| prefinished: false,
| errorEmitted: false,
| bufferedRequestCount: 0,
| corkedRequestsFree: [Object] },
| writable: true,
| domain: null,
| _events:
| { response: [Function: handleResponse],
| error: [Function: handleRequestError] },
| _eventsCount: 2,
| _maxListeners: undefined,
| _options:
| { protocol: 'http:',
| maxRedirects: 21,
| maxBodyLength: 10485760,
| hostname: 'heketi-storage.glusterfs.svc',
| port: '8080',
| path: '/clusters',
| method: 'get',
| headers: [Object],
| agent: undefined,
| auth: undefined,
| nativeProtocols: [Object],
| pathname: '/clusters' },
| _redirectCount: 0,
| _redirects: [],
| _requestBodyLength: 0,
| _requestBodyBuffers: [],
| _onNativeResponse: [Function],
| _currentRequest:
| ClientRequest {
| domain: null,
| _events: [Object],
| _eventsCount: 6,
| _maxListeners: undefined,
| output: [],
| outputEncodings: [],
| outputCallbacks: [],
| outputSize: 0,
| writable: true,
| _last: true,
| upgrading: false,
| chunkedEncoding: false,
| shouldKeepAlive: false,
| useChunkedEncodingByDefault: false,
| sendDate: false,
| _removedConnection: false,
| _removedContLen: false,
| _removedTE: false,
| _contentLength: 0,
| _hasBody: true,
| _trailer: '',
| finished: true,
| _headerSent: true,
| socket: [Object],
| connection: [Object],
| _header: 'GET /clusters HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nContent-Type: application/json\r\nAuthorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhZG1pbiIsImlhdCI6IjIwMTgtMTItMTFUMDg6MDU6MzArMDA6MDAiLCJleHAiOiIyMDE4LTEyLTE4VDA4OjA1OjMwKzAwOjAwIiwicXNoIjoiNDc0OWE1OWRlODdjMjdjOWIyZjQ5NWM1ZjEzMDliMjUyNTY4MWRmZTMwYzhhN2I4MzYyNTkwMWIxMzJhOWMyNiJ9.L5Bq_Rf_4BBsm-M-HyxWDQi4lYj9VLJ7wH8aDhE7oYQ\r\nUser-Agent: axios/0.17.1\r\nHost: heketi-storage.glusterfs.svc:8080\r\nConnection: close\r\n\r\n',
| _onPendingData: [Function: noopPendingOutput],
| agent: [Object],
| socketPath: undefined,
| timeout: undefined,
| method: 'GET',
| path: '/clusters',
| _ended: false,
| res: null,
| aborted: undefined,
| timeoutCb: null,
| upgradeOrConnect: false,
| parser: null,
| maxHeadersCount: null,
| _redirectable: [Circular],
| [Symbol(outHeadersKey)]: [Object] },
| _currentUrl: 'http://heketi-storage.glusterfs.svc:8080/clusters' },
| response: undefined }
| (node:17) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'status' of undefined
| at exports.getAll (/usr/src/app/server/controllers/clusters.controller.js:32:42)
| at <anonymous>
| at process._tickCallback (internal/process/next_tick.js:188:7)
| (node:17) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
| (node:17) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
> [email protected] start /usr/src/app
--
| > node ./bin/www
|
| GET /clusters/ 304 9.317 ms - -
| GET / 304 1.206 ms - -
| GET /inline.bundle.js 304 3.792 ms - -
| GET /polyfills.bundle.js 304 1.101 ms - -
| GET /styles.bundle.js 304 1.652 ms - -
| GET /main.bundle.js 304 1.384 ms - -
| GET /vendor.bundle.js 304 2.096 ms - -
| GET /assets/images/github-circle-white-transparent.svg 304 0.987 ms - -
| { Error: Request failed with status code 401
| at createError (/usr/src/app/node_modules/axios/lib/core/createError.js:16:15)
| at settle (/usr/src/app/node_modules/axios/lib/core/settle.js:18:12)
| at IncomingMessage.handleStreamEnd (/usr/src/app/node_modules/axios/lib/adapters/http.js:192:11)
| at emitNone (events.js:111:20)
| at IncomingMessage.emit (events.js:208:7)
| at endReadableNT (_stream_readable.js:1064:12)
| at _combinedTickCallback (internal/process/next_tick.js:138:11)
| at process._tickCallback (internal/process/next_tick.js:180:9)
| config:
| { adapter: [Function: httpAdapter],
| transformRequest: { '0': [Function: transformRequest] },
| transformResponse: { '0': [Function: transformResponse] },
| timeout: 0,
| xsrfCookieName: 'XSRF-TOKEN',
| xsrfHeaderName: 'X-XSRF-TOKEN',
| maxContentLength: -1,
| validateStatus: [Function: validateStatus],
| headers:
| { Accept: 'application/json, text/plain, */*',
| 'Content-Type': 'application/json',
| Authorization: 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhZG1pbiIsImlhdCI6IjIwMTgtMTItMTFUMDg6MjM6NDQrMDA6MDAiLCJleHAiOiIyMDE4LTEyLTE4VDA4OjIzOjQ0KzAwOjAwIiwicXNoIjoiNDc0OWE1OWRlODdjMjdjOWIyZjQ5NWM1ZjEzMDliMjUyNTY4MWRmZTMwYzhhN2I4MzYyNTkwMWIxMzJhOWMyNiJ9.DSf5WoRUirG6Ehqk20691zIgFodMGSUw75cW8sF3w5Q',
| 'User-Agent': 'axios/0.17.1' },
| baseURL: 'http://heketi-storage-glusterfs.paas.lab.test.com' ,
| method: 'get',
| url: 'http://heketi-storage-glusterfs.paas.lab.test.com/clusters' ,
| params: undefined,
| data: undefined },
| request:
| ClientRequest {
| domain: null,
| _events:
| { socket: [Function],
| abort: [Function],
| aborted: [Function],
| error: [Function],
| timeout: [Function],
| prefinish: [Function: requestOnPrefinish] },
| _eventsCount: 6,
| _maxListeners: undefined,
| output: [],
| outputEncodings: [],
| outputCallbacks: [],
| outputSize: 0,
| writable: true,
| _last: true,
| upgrading: false,
| chunkedEncoding: false,
| shouldKeepAlive: false,
| useChunkedEncodingByDefault: false,
| sendDate: false,
| _removedConnection: false,
| _removedContLen: false,
| _removedTE: false,
| _contentLength: 0,
| _hasBody: true,
| _trailer: '',
| finished: true,
| _headerSent: true,
| socket:
| Socket {
| connecting: false,
| _hadError: false,
| _handle: null,
| _parent: null,
| _host: 'heketi-storage-glusterfs.paas.lab.test.com',
| _readableState: [Object],
| readable: false,
| domain: null,
| _events: [Object],
| _eventsCount: 8,
| _maxListeners: undefined,
| _writableState: [Object],
| writable: false,
| allowHalfOpen: false,
| _bytesDispatched: 509,
| _sockname: null,
| _pendingData: null,
| _pendingEncoding: '',
| server: null,
| _server: null,
| parser: null,
| _httpMessage: [Circular],
| _idleNext: null,
| _idlePrev: null,
| _idleTimeout: -1,
| [Symbol(asyncId)]: 123,
| [Symbol(bytesRead)]: 381 },
| connection:
| Socket {
| connecting: false,
| _hadError: false,
| _handle: null,
| _parent: null,
| _host: 'heketi-storage-glusterfs.paas.lab.test.com',
| _readableState: [Object],
| readable: false,
| domain: null,
| _events: [Object],
| _eventsCount: 8,
| _maxListeners: undefined,
| _writableState: [Object],
| writable: false,
| allowHalfOpen: false,
| _bytesDispatched: 509,
| _sockname: null,
| _pendingData: null,
| _pendingEncoding: '',
| server: null,
| _server: null,
| parser: null,
| _httpMessage: [Circular],
| _idleNext: null,
| _idlePrev: null,
| _idleTimeout: -1,
| [Symbol(asyncId)]: 123,
| [Symbol(bytesRead)]: 381 },
| _header: 'GET /clusters HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nContent-Type: application/json\r\nAuthorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhZG1pbiIsImlhdCI6IjIwMTgtMTItMTFUMDg6MjM6NDQrMDA6MDAiLCJleHAiOiIyMDE4LTEyLTE4VDA4OjIzOjQ0KzAwOjAwIiwicXNoIjoiNDc0OWE1OWRlODdjMjdjOWIyZjQ5NWM1ZjEzMDliMjUyNTY4MWRmZTMwYzhhN2I4MzYyNTkwMWIxMzJhOWMyNiJ9.DSf5WoRUirG6Ehqk20691zIgFodMGSUw75cW8sF3w5Q\r\nUser-Agent: axios/0.17.1\r\nHost: heketi-storage-glusterfs.paas.lab.test.com\r\nConnection: close\r\n\r\n',
| _onPendingData: [Function: noopPendingOutput],
| agent:
| Agent {
| domain: null,
| _events: [Object],
| _eventsCount: 1,
| _maxListeners: undefined,
| defaultPort: 80,
| protocol: 'http:',
| options: [Object],
| requests: {},
| sockets: [Object],
| freeSockets: {},
| keepAliveMsecs: 1000,
| keepAlive: false,
| maxSockets: Infinity,
| maxFreeSockets: 256 },
| socketPath: undefined,
| timeout: undefined,
| method: 'GET',
| path: '/clusters',
| _ended: true,
| res:
| IncomingMessage {
| _readableState: [Object],
| readable: false,
| domain: null,
| _events: [Object],
| _eventsCount: 3,
| _maxListeners: undefined,
| socket: [Object],
| connection: [Object],
| httpVersionMajor: 1,
| httpVersionMinor: 1,
| httpVersion: '1.1',
| complete: true,
| headers: [Object],
| rawHeaders: [Array],
| trailers: {},
| rawTrailers: [],
| upgrade: false,
| url: '',
| method: null,
| statusCode: 401,
| statusMessage: 'Unauthorized',
| client: [Object],
| _consuming: true,
| _dumped: false,
| req: [Circular],
| responseUrl: 'http://heketi-storage-glusterfs.paas.lab.test.com/clusters' ,
| redirects: [],
| read: [Function] },
| aborted: undefined,
| timeoutCb: null,
| upgradeOrConnect: false,
| parser: null,
| maxHeadersCount: null,
| _redirectable:
| Writable {
| _writableState: [Object],
| writable: true,
| domain: null,
| _events: [Object],
| _eventsCount: 2,
| _maxListeners: undefined,
| _options: [Object],
| _redirectCount: 0,
| _redirects: [],
| _requestBodyLength: 0,
| _requestBodyBuffers: [],
| _onNativeResponse: [Function],
| _currentRequest: [Circular],
| _currentUrl: 'http://heketi-storage-glusterfs.paas.lab.test.com/clusters' },
| [Symbol(outHeadersKey)]:
| { accept: [Array],
| 'content-type': [Array],
| authorization: [Array],
| 'user-agent': [Array],
| host: [Array] } },
| response:
| { status: 401,
| statusText: 'Unauthorized',
| headers:
| { 'content-type': 'text/plain; charset=utf-8',
| 'x-content-type-options': 'nosniff',
| date: 'Tue, 11 Dec 2018 08:23:44 GMT',
| 'content-length': '104',
| connection: 'close',
| 'set-cookie': [Array] },
| config:
| { adapter: [Function: httpAdapter],
| transformRequest: [Object],
| transformResponse: [Object],
| timeout: 0,
| xsrfCookieName: 'XSRF-TOKEN',
| xsrfHeaderName: 'X-XSRF-TOKEN',
| maxContentLength: -1,
| validateStatus: [Function: validateStatus],
| headers: [Object],
| baseURL: 'http://heketi-storage-glusterfs.paas.lab.test.com' ,
| method: 'get',
| url: 'http://heketi-storage-glusterfs.paas.lab.test.com/clusters' ,
| params: undefined,
| data: undefined },
| request:
| ClientRequest {
| domain: null,
| _events: [Object],
| _eventsCount: 6,
| _maxListeners: undefined,
| output: [],
| outputEncodings: [],
| outputCallbacks: [],
| outputSize: 0,
| writable: true,
| _last: true,
| upgrading: false,
| chunkedEncoding: false,
| shouldKeepAlive: false,
| useChunkedEncodingByDefault: false,
| sendDate: false,
| _removedConnection: false,
| _removedContLen: false,
| _removedTE: false,
| _contentLength: 0,
| _hasBody: true,
| _trailer: '',
| finished: true,
| _headerSent: true,
| socket: [Object],
| connection: [Object],
| _header: 'GET /clusters HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nContent-Type: application/json\r\nAuthorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhZG1pbiIsImlhdCI6IjIwMTgtMTItMTFUMDg6MjM6NDQrMDA6MDAiLCJleHAiOiIyMDE4LTEyLTE4VDA4OjIzOjQ0KzAwOjAwIiwicXNoIjoiNDc0OWE1OWRlODdjMjdjOWIyZjQ5NWM1ZjEzMDliMjUyNTY4MWRmZTMwYzhhN2I4MzYyNTkwMWIxMzJhOWMyNiJ9.DSf5WoRUirG6Ehqk20691zIgFodMGSUw75cW8sF3w5Q\r\nUser-Agent: axios/0.17.1\r\nHost: heketi-storage-glusterfs.paas.lab.test.com\r\nConnection: close\r\n\r\n',
| _onPendingData: [Function: noopPendingOutput],
| agent: [Object],
| socketPath: undefined,
| timeout: undefined,
| method: 'GET',
| path: '/clusters',
| _ended: true,
| res: [Object],
| aborted: undefined,
| timeoutCb: null,
| upgradeOrConnect: false,
| parser: null,
| maxHeadersCount: null,
| _redirectable: [Object],
| [Symbol(outHeadersKey)]: [Object] },
| data: 'Invalid JWT token: json: cannot unmarshal string into Go struct field HeketiJwtClaims.iat of type int64\n' } }
| GET /api/clusters 401 49.382 ms - 62