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

x/crypto: ssh.Client.NewSession() return {OpenChannelError: 2} when create sftp client with one same ssh client #37057

Closed
ling2yt opened this issue Feb 5, 2020 · 1 comment
Milestone

Comments

@ling2yt
Copy link

@ling2yt ling2yt commented Feb 5, 2020

What version of Go are you using (go version)?

$ go version
go version go1.13.4 darwin/amd64

Does this issue reproduce with the latest release?

not check

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="****"
GOENV="****"
GOEXE=""
GOFLAGS=" -mod="
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="****"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/usr/local/Cellar/go/1.13.4/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.13.4/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="****"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/y1/_847f7z555g5vt1p8d85kh1w0000gn/T/go-build040337807=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

I create one ssh client and new almost 12 sftp client on
the func is as follows:
sftpClient, err := sftp.NewClient(sshClient)

I got the error when I create the 11th or 12th sftp session like :
{
Reason: 2,
Message: "open failed",
}

Is there any restrict of the number when creating the sftp client on one ssh client ?

What did you expect to see?

What did you see instead?

@gopherbot gopherbot added this to the Unreleased milestone Feb 5, 2020
@cagedmantis
Copy link
Contributor

@cagedmantis cagedmantis commented Feb 7, 2020

We don't really use our issue tracker for questions. More people will see your question, and you will get better answers, if you ask on a forum rather than on the issue tracker. See https://golang.org/wiki/Questions.

@cagedmantis cagedmantis closed this Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.