infiniband-radar / infiniband-radar-web

Monitoring and visualization of InfiniBand Fabrics
GNU General Public License v3.0
19 stars 6 forks source link

The web API is failing on a new installation with influxDB 2.7 #32

Open nconac opened 5 months ago

nconac commented 5 months ago

While trying to deploy a new infiniband radar stack to monitor our Infinband setup over docker swarm, the API container is failing with the following errors obtainable from docker service logs :

monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |      req:
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |       ClientRequest {
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         domain: null,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         _events: [Object],
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         _eventsCount: 3,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         _maxListeners: undefined,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         output: [],
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         outputEncodings: [],
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         outputCallbacks: [],
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         outputSize: 0,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         writable: true,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         _last: true,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         chunkedEncoding: false,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         shouldKeepAlive: false,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         useChunkedEncodingByDefault: true,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         sendDate: false,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         _removedConnection: false,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         _removedContLen: false,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         _removedTE: false,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         _contentLength: 0,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         _hasBody: true,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         _trailer: '',
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         finished: true,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         _headerSent: true,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         socket: [Socket],
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         connection: [Socket],
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         _header: 'POST /query?p=root&u=root&q=create%20database%20%22infiniband_radar%22 HTTP/1.1\r\ncontent-length: 0\r\nHost: influxdb:8086\r\nConnection: close\r\n\r\n',
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         _onPendingData: [Function: noopPendingOutput],
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         agent: [Agent],
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         socketPath: undefined,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         timeout: 30000,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         method: 'POST',
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         path: '/query?p=root&u=root&q=create%20database%20%22infiniband_radar%22',
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         _ended: true,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         res: [Circular],
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         aborted: undefined,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         timeoutCb: [Function: emitTimeout],
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         upgradeOrConnect: false,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         parser: null,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         maxHeadersCount: null,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         [Symbol(isCorked)]: false,
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |         [Symbol(outHeadersKey)]: [Object] } },
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |   message: 'A 401 Unauthorized error occurred: {"code":"unauthorized","message":"Unauthorized"}' }
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    | npm ERR! code ELIFECYCLE
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    | npm ERR! errno 1
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    | npm ERR! infiniband-radar-api-server@2.4.6 start: `ts-node src/Main.ts`
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    | npm ERR! Exit status 1
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    | npm ERR!
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    | npm ERR! Failed at the infiniband-radar-api-server@2.4.6 start script.
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    |
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    | npm ERR! A complete log of this run can be found in:
monitoring_api.1.lr8kpqr7xjar@hpc-monitoring02    | npm ERR!     /root/.npm/_logs/2024-06-03T13_04_11_483Z-debug.log

It seems like the API cannot connect to our influxDB service (which is working fine, and is currently used by other part of our monitoring stack) Based on the query in error, it seems to me that you try to authenticate on the influxDB API by using root as user and password (yikes for that also), which is not doable with influxDB v2 anymore, as you can only set a password that have at least 8 characters on the influx v1 authentication compatibility layer. Do you know what needs to be edited to modify the authentication parameters for influxDB ?