ros-infrastructure / buildfarm_deployment

Apache License 2.0
30 stars 39 forks source link

ssh connection problems #188

Open jonazpiazu opened 6 years ago

jonazpiazu commented 6 years ago

When running the job kinetic_rosdistro-cache I get several errors over the ssh connection:

16:40:23 SSH: Connecting from host [xxx]
16:40:23 SSH: Connecting with configuration [rosdistro_cache] ...
16:40:23 SSH: Caught exception [Failed to connect and initialize SSH connection. Message: [Failed to connect session for config [rosdistro_cache]. Message [Auth fail]]] Sleeping for [5,000]ms before trying again
16:40:28 SSH: Connecting with configuration [rosdistro_cache] ...
16:40:28 SSH: Caught exception [Failed to connect and initialize SSH connection. Message: [Failed to connect session for config [rosdistro_cache]. Message [Auth fail]]] Sleeping for [5,000]ms before trying again
16:40:33 SSH: Connecting with configuration [rosdistro_cache] ...

I have noticed that both in the agent and in the repo , the authorized_keys file is not correctly deployed. As jenkins is the one making the connection, it should be located in /home/jenkins-agent/.ssh/ , while I find it deployed in the root's folder /root/.ssh/

jonazpiazu commented 6 years ago

I can confirm that copying the file authorized_keys and setting the proper ownership (chown jenkins-agent.jenkins-agent /home/jenkins-agent/.ssh/authorized_keys) fixes the ssh connection error.

nuclearsandwich commented 6 years ago

Thanks for the report. If you're comfortable with puppet, you're welcome to submit a PR updating the config. IF not, I'll add and test it to upcoming work.

jonazpiazu commented 6 years ago

Sorry that my puppet knowledge tends to zero ...

jonazpiazu commented 6 years ago

But regarding the labels, I would say it affects to agent and repo, but not master.

nuclearsandwich commented 6 years ago

I would say it affects to agent and repo, but not master.

I misunderstood which host you applied the workaround for. Fixed.

gavanderhoorn commented 6 years ago

Is this related to ros-infrastructure/buildfarm_deployment_config#29?