RocketChat/Rocket.Chat · error · Meteor.Error

Invalid connection details

Invalid connection details

Error message

Invalid connection details

What it means

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.

Source

Thrown at apps/meteor/server/meteor-methods/auth/crowd.ts:50

		if (settings.get('CROWD_Enable') !== true) {
			throw new Meteor.Error('crowd_disabled');
		}

		try {
			const crowd = new CROWD();
			await crowd.checkConnection();

			return {
				message: 'Crowd_Connection_successful' as const,
				params: [],
			};
		} catch (err) {
			logger.error({
				msg: 'Invalid crowd connection details, check the url and application username/password and make sure this server is allowed to speak to crowd',
				err,
			});
			throw new Meteor.Error('Invalid connection details', '', { method: 'crowd_test_connection' });
		}
	},
	async crowd_sync_users() {
		const user = await Meteor.userAsync();
		if (settings.get('CROWD_Enable') !== true) {
			throw new Meteor.Error('crowd_disabled');
		}

		if (!user || !(await hasPermissionAsync(user, 'sync-auth-services-users'))) {
			throw new Meteor.Error('error-not-authorized', 'Not authorized', {
				method: 'crowd_sync_users',
			});
		}

		try {
			const crowd = new CROWD();
			const startTime = Date.now();
			await crowd.sync();

View on GitHub (pinned to b2c16d5842)

Solutions

  1. From the Rocket.Chat host, verify the Crowd REST endpoint is reachable (curl the Crowd URL with the application credentials)
  2. Re-enter the Crowd application name/password exactly as defined in the Crowd console
  3. Add the Rocket.Chat server IP to the Crowd application's allowed remote addresses
  4. Check the server log for the caught err to see the real cause before changing anything

Example fix

# before — hostname typo
CROWD_URL=https://crowd.exmaple.com/crowd

# after — correct host, verified from the Rocket.Chat host
CROWD_URL=https://crowd.example.com/crowd
curl -u appname:apppassword https://crowd.example.com/crowd/rest/usermanagement/1/ping
Defensive patterns

Strategy: try-catch

Validate before calling

// pre-flight: confirm the Crowd REST endpoint answers from this host
const res = await fetch(`${crowdUrl}/rest/usermanagement/1/ping`, {
  headers: { Authorization: `Basic ${btoa(`${appName}:${appPassword}`)}` },
});
if (!res.ok) {
  // fix URL/credentials/network before calling crowd_test_connection
}

Try / catch

try {
  await Meteor.callAsync('crowd_test_connection');
} catch (err) {
  if (err instanceof Meteor.Error && err.error === 'Invalid connection details') {
    // check the server log for the underlying err, then fix URL/credentials/allowlist
  }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of RocketChat/Rocket.Chat@b2c16d5842 (2026-08-18). Data as JSON: /api/errors/f0ceb665fbcaf18e. Report an issue: GitHub.