Skip to content

Allow more tuning for SSHD on Docker distribution #16008

Closed
@louzadod

Description

@louzadod
  • Gitea version (or commit ref): 1.14.2
  • Git version: any git client using SSH as protocol
  • Operating system: any
  • Database (use [x]): any
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

git fetch --tags --force --progress -- origin +refs/heads/:refs/remotes/origin/ # timeout=10
hudson.plugins.git.GitException: Command "git fetch --tags --force --progress -- origin +refs/heads/:refs/remotes/origin/" returned status code 128:
stdout:
stderr: ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2430)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2044)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:81)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:569)
at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:370)
at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:330)
at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:396)
at jenkins.scm.api.SCMSource.fetch(SCMSource.java:582)
at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:98)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)

Finished: FAILURE

Description

SSHD server inside Gitea container does not allow more concurrent access. Our CD/CD infrastructure is based on SSH. So I had to put sshd_config template file on an external volume and customize it with:

MaxStartups ${SSHD_MAX_STARTUPS}
MaxSessions ${SSHD_MAX_SESSIONS}

The variables are environment variables passed by docker-compose environment.
After increasing the values, my environment became stable again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions