Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start-Service : Service 'OpenSSH SSH Server (sshd)' cannot be started due to the following error: Cannot start service sshd on computer '.'. #107

Open
ascholz opened this issue Mar 18, 2022 · 0 comments

Comments

@ascholz
Copy link

ascholz commented Mar 18, 2022

Jenkins and plugins versions report

I can't even get to the step to mount the container in Jenkins. Because I can't even start the container.

What Operating System are you using (both controller, and any agents involved in the problem)?

Windows Server 2019

Client: Mirantis Container Runtime
Version: 20.10.7
API version: 1.41
Go version: go1.13.15
Git commit: 40ef3b6
Built: 08/19/2021 18:54:26
OS/Arch: windows/amd64
Context: default
Experimental: true

Server: Mirantis Container Runtime
Engine:
Version: 20.10.7
API version: 1.41 (minimum version 1.24)
Go version: go1.13.15
Git commit: e1bf5b9c13
Built: 08/19/2021 18:53:20
OS/Arch: windows/amd64
Experimental: false

Reproduction steps

docker run jenkins/ssh-agent:windowsservercore-ltsc2019-jdk11 "<>"

Expected Results

The container should start and I should be able to connect to the container via SSH.

Actual Results

setup-sshd.ps1 param: <>>'
Authorizing ssh pubkey found in params.
Start-Service : Service 'OpenSSH SSH Server (sshd)' cannot be started due to
the following error: Cannot start service sshd on computer '.'.
At C:\ProgramData\Jenkins\setup-sshd.ps1:103 char:1

  • Start-Service sshd
  •   + CategoryInfo          : OpenError: (System.ServiceProcess.ServiceControl
     ler:ServiceController) [Start-Service], ServiceCommandException
      + FullyQualifiedErrorId : CouldNotStartService,Microsoft.PowerShell.Comman
     ds.StartServiceCommand
    
    
    

Windows IP Configuration

Ethernet adapter vEthernet (Ethernet) 4:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::e0f7:7dbc:9b84:2328%38
IPv4 Address. . . . . . . . . . . : 172.29.106.107
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . : 172.29.96.1

Active Connections

Proto Local Address Foreign Address State
TCP 0.0.0.0:135 3b1d27a5e0d2:0 LISTENING
TCP 0.0.0.0:5985 3b1d27a5e0d2:0 LISTENING
TCP 0.0.0.0:47001 3b1d27a5e0d2:0 LISTENING
TCP 0.0.0.0:49152 3b1d27a5e0d2:0 LISTENING
TCP 0.0.0.0:49153 3b1d27a5e0d2:0 LISTENING
TCP 0.0.0.0:49154 3b1d27a5e0d2:0 LISTENING
TCP 0.0.0.0:49155 3b1d27a5e0d2:0 LISTENING
TCP 0.0.0.0:49157 3b1d27a5e0d2:0 LISTENING
TCP 172.29.106.107:49156 13.89.179.8:https SYN_SENT
TCP [::]:135 3b1d27a5e0d2:0 LISTENING
TCP [::]:5985 3b1d27a5e0d2:0 LISTENING
TCP [::]:47001 3b1d27a5e0d2:0 LISTENING
TCP [::]:49152 3b1d27a5e0d2:0 LISTENING
TCP [::]:49153 3b1d27a5e0d2:0 LISTENING
TCP [::]:49154 3b1d27a5e0d2:0 LISTENING
TCP [::]:49155 3b1d27a5e0d2:0 LISTENING
TCP [::]:49157 3b1d27a5e0d2:0 LISTENING
UDP 0.0.0.0:5353 :
UDP 0.0.0.0:5355 :
UDP 127.0.0.1:49152 :
UDP [::]:5353 :
UDP [::]:5355 :
Get-Content : Cannot find path 'C:\ProgramData\ssh\logs\sshd.log' because it
does not exist.
At C:\ProgramData\Jenkins\setup-sshd.ps1:110 char:1

  • Get-Content -Path "C:\ProgramData\ssh\logs\sshd.log" -Wait
  •   + CategoryInfo          : ObjectNotFound: (C:\ProgramData\ssh\logs\sshd.lo
     g:String) [Get-Content], ItemNotFoundException
      + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetCo
     ntentCommand
    
    

Anything else?

When I start the sshd manually I get the following output. Unfortunately I can't do anything with the error message.

PS C:\Program Files\OpenSSH-Win64> .\sshd.exe
Could not connect to agent "\\.\pipe\openssh-ssh-agent": No such file or directory
sshd: no hostkeys available -- exiting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants