Script tasks that run in parallel in a vRealize Code Stream pipeline on a Linux machine fail when the MaxSessions value is set too low.

Problem

When a pipeline is executed with multiple script tasks, and you attempt to run a script on the same Linux host simultaneously, several tasks might fail with the following message: Error: channel is not open.

Cause

The SSH MaxSessions configuration, which defines the maximum number of open sessions allowed for a network connection, is set to 10 by default. This value limits the number of script tasks that can run simultaneously on the Linux host.

To resolve the problem, you must configure SSH MaxSessions to use a higher value. The acceptable value is 50. You calculate the value based on the number of script tasks that you expect to run simultaneously on that particular Linux host. To configure the value, follow this procedure.

Procedure

  1. On your Linux machine, edit the file /etc/ssh/sshd_config.
  2. Configure the value for MaxSessions to 50, and save the file.
  3. Restart the SSH service by running the following command:

    service sshd restart

  4. Verify the configured value by running the following command:

    sshd -T | grep -i maxsessions

  5. Run the pipeline again, and verify that the tasks succeed.