{"record":{"id":"f0ceb665fbcaf18e","repo":"RocketChat/Rocket.Chat","slug":"invalid-connection-details","errorCode":"Invalid connection details","errorMessage":"Invalid connection details","messagePattern":"Invalid connection details","errorType":"exception","errorClass":"Meteor.Error","httpStatus":null,"severity":"error","filePath":"apps/meteor/server/meteor-methods/auth/crowd.ts","lineNumber":50,"sourceCode":"\n\t\tif (settings.get('CROWD_Enable') !== true) {\n\t\t\tthrow new Meteor.Error('crowd_disabled');\n\t\t}\n\n\t\ttry {\n\t\t\tconst crowd = new CROWD();\n\t\t\tawait crowd.checkConnection();\n\n\t\t\treturn {\n\t\t\t\tmessage: 'Crowd_Connection_successful' as const,\n\t\t\t\tparams: [],\n\t\t\t};\n\t\t} catch (err) {\n\t\t\tlogger.error({\n\t\t\t\tmsg: 'Invalid crowd connection details, check the url and application username/password and make sure this server is allowed to speak to crowd',\n\t\t\t\terr,\n\t\t\t});\n\t\t\tthrow new Meteor.Error('Invalid connection details', '', { method: 'crowd_test_connection' });\n\t\t}\n\t},\n\tasync crowd_sync_users() {\n\t\tconst user = await Meteor.userAsync();\n\t\tif (settings.get('CROWD_Enable') !== true) {\n\t\t\tthrow new Meteor.Error('crowd_disabled');\n\t\t}\n\n\t\tif (!user || !(await hasPermissionAsync(user, 'sync-auth-services-users'))) {\n\t\t\tthrow new Meteor.Error('error-not-authorized', 'Not authorized', {\n\t\t\t\tmethod: 'crowd_sync_users',\n\t\t\t});\n\t\t}\n\n\t\ttry {\n\t\t\tconst crowd = new CROWD();\n\t\t\tconst startTime = Date.now();\n\t\t\tawait crowd.sync();","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/meteor-methods/auth/crowd.ts#L32-L68","documentation":"crowd_test_connection instantiates CROWD() and awaits checkConnection(); any failure (unreachable URL, wrong Crowd application name/password, Crowd rejecting this client) is logged server-side as 'Invalid crowd connection details...' and rethrown as Meteor.Error('Invalid connection details'). The underlying cause is only visible in the server log, not in the thrown error.","triggerScenarios":"Wrong CROWD URL/host; wrong Crowd application username or password; the Rocket.Chat server IP is not in the Crowd application's allowed remote addresses; DNS, firewall, or TLS certificate problems between the Rocket.Chat host and Crowd.","commonSituations":"Credentials rotated in Crowd but not updated in Rocket.Chat settings; reverse proxy TLS mismatch; Crowd allowlist blocking the app server; hostname typo in the settings.","solutions":["From the Rocket.Chat host, verify the Crowd REST endpoint is reachable (curl the Crowd URL with the application credentials)","Re-enter the Crowd application name/password exactly as defined in the Crowd console","Add the Rocket.Chat server IP to the Crowd application's allowed remote addresses","Check the server log for the caught err to see the real cause before changing anything"],"exampleFix":"# before — hostname typo\nCROWD_URL=https://crowd.exmaple.com/crowd\n\n# after — correct host, verified from the Rocket.Chat host\nCROWD_URL=https://crowd.example.com/crowd\ncurl -u appname:apppassword https://crowd.example.com/crowd/rest/usermanagement/1/ping","handlingStrategy":"try-catch","validationCode":"// pre-flight: confirm the Crowd REST endpoint answers from this host\nconst res = await fetch(`${crowdUrl}/rest/usermanagement/1/ping`, {\n  headers: { Authorization: `Basic ${btoa(`${appName}:${appPassword}`)}` },\n});\nif (!res.ok) {\n  // fix URL/credentials/network before calling crowd_test_connection\n}","typeGuard":null,"tryCatchPattern":"try {\n  await Meteor.callAsync('crowd_test_connection');\n} catch (err) {\n  if (err instanceof Meteor.Error && err.error === 'Invalid connection details') {\n    // check the server log for the underlying err, then fix URL/credentials/allowlist\n  }\n}","preventionTips":["Verify the Crowd URL, application name, and password with a direct ping before saving settings","Keep Crowd application credentials in sync when they are rotated","Ensure the Rocket.Chat server IP is allowlisted in the Crowd application"],"tags":["crowd","network","configuration","sso","connection"],"backgroundTag":"service-connection-failed","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}