-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Continuous SSH "Session Failed To Exit" Spam In Log #20473
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
Comments
Tagging @zeripath as I believe they worked on the loggers before? |
hmm...
these lines seem pointless as there is no point logging EOFs so those should be dropped. What is a problem however are:
The logging here isn't being very helpful but it appears that these SSH commands are always exiting with status 1 - be that pushes or pulls. The command being called here is equivalent to: env SSH_ORIGINAL_COMMAND=$SSH_ORIGINAL_COMMAND SKIP_MINWINSVC=1 $PATH_TO_GITEA/gitea serv key-$KEY_ID --config=$GITEA_CONFIG_FILE Now this is always exiting with a status 1. The stderr is being sent to whatever is sshing in. So the question is... What is happening on the other end? Why are they always exiting with status 1? It's probable that we should not ever log anything here, it's not helpful for the server as all of the error information is being sent to the client. |
These happen regardless of if there is any activity on the server. No push/pulls happening, and like clockwork every minute it logs this. I'm happy to dig further if it helps, but mainly I'd like to avoid seeing these "errors" as they very quickly clutter up actual meaningful errors that I can action. |
The code in modules/ssh/ssh.go:sessionHandler() currently cause an error to be logged if `gitea serv` exits with a exit(1). This logging is useless because the accompanying stderr is not provided and in any case the exit(1) is most likely due to permissions errors. Further it then causes the EOF to be logged - even though this is not helpful. This PR simply checks the errors returned and stops logging them. In the case of misconfigurations causing `gitea serv` to fail with exit(1) the current logging is not helpful at determining this and users should simply review the message passed over the ssh connection. Fix go-gitea#20473 Signed-off-by: Andrew Thornton <[email protected]>
Someone or something is initiating SSH requests to the server with a valid public key that is matching one of the public keys that Gitea knows about. That is the only way that this can get logged. The command If you want to investigate further you need to provide us with debug logging, as the issue template requests. See https://docs.gitea.io/en-us/logging-configuration/#debugging-problems Clearly the current logging is pointless and unhelpful. There are many many ways in which |
Thanks for the explanation! I'll try the debug logging and hopefully that sheds some light and report back! |
The code in modules/ssh/ssh.go:sessionHandler() currently cause an error to be logged if `gitea serv` exits with a exit(1). This logging is useless because the accompanying stderr is not provided and in any case the exit(1) is most likely due to permissions errors. Further it then causes the EOF to be logged - even though this is not helpful. This PR simply checks the errors returned and stops logging them. In the case of misconfigurations causing `gitea serv` to fail with exit(1) the current logging is not helpful at determining this and users should simply review the message passed over the ssh connection. Fix #20473 Signed-off-by: Andrew Thornton <[email protected]>
Backport go-gitea#20476 The code in modules/ssh/ssh.go:sessionHandler() currently cause an error to be logged if `gitea serv` exits with a exit(1). This logging is useless because the accompanying stderr is not provided and in any case the exit(1) is most likely due to permissions errors. Further it then causes the EOF to be logged - even though this is not helpful. This PR simply checks the errors returned and stops logging them. In the case of misconfigurations causing `gitea serv` to fail with exit(1) the current logging is not helpful at determining this and users should simply review the message passed over the ssh connection. Fix go-gitea#20473 Signed-off-by: Andrew Thornton <[email protected]>
Backport #20476 The code in modules/ssh/ssh.go:sessionHandler() currently cause an error to be logged if `gitea serv` exits with a exit(1). This logging is useless because the accompanying stderr is not provided and in any case the exit(1) is most likely due to permissions errors. Further it then causes the EOF to be logged - even though this is not helpful. This PR simply checks the errors returned and stops logging them. In the case of misconfigurations causing `gitea serv` to fail with exit(1) the current logging is not helpful at determining this and users should simply review the message passed over the ssh connection. Fix #20473 Signed-off-by: Andrew Thornton <[email protected]>
So after some testing, @zeripath, I've found that it is GitKraken that is causing the update check on the repository. What I find strange is with the handling of the key, which says it is This was the entirety of the log, and it just repeats. Does any of it help? And is there anything I can do to stop the spam?
|
Really we'd need to see what git kraken is actually getting across its stderr/stdout. There's a PR which will be merged very soon which will stop these messages from being logged so that will stop the spam. |
The code in modules/ssh/ssh.go:sessionHandler() currently cause an error to be logged if `gitea serv` exits with a exit(1). This logging is useless because the accompanying stderr is not provided and in any case the exit(1) is most likely due to permissions errors. Further it then causes the EOF to be logged - even though this is not helpful. This PR simply checks the errors returned and stops logging them. In the case of misconfigurations causing `gitea serv` to fail with exit(1) the current logging is not helpful at determining this and users should simply review the message passed over the ssh connection. Fix go-gitea#20473 Signed-off-by: Andrew Thornton <[email protected]>
Description
Every minute I get the following in my logs. Is this an issue that needs to be looked into? I am using the internal Gitea SSH server.
Gitea Version
1.17.0
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
2.37.1
Operating System
Windows 10
How are you running Gitea?
From the latest Windows x64 binary directly from the Gitea downloads.
Database
No response
The text was updated successfully, but these errors were encountered: