Skip to content

Recurrent errors in logs #14110

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

Closed
2 of 6 tasks
vdeville opened this issue Dec 22, 2020 · 6 comments · Fixed by #15849
Closed
2 of 6 tasks

Recurrent errors in logs #14110

vdeville opened this issue Dec 22, 2020 · 6 comments · Fixed by #15849
Labels

Comments

@vdeville
Copy link

vdeville commented Dec 22, 2020

Hey,

I have multiples issue on my instance (cause 502). I have a first middleware error and an another error into the SSH server.

  • Gitea version : 1.13

  • Git version: Built-in docker image

  • Operating system:
    Run in docker with image tag gitea/gitea 1.13 2d0be3e110e0

  • Database (use [x]):

    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:

    • Yes (provide example URL)
    • No

Description

For example when i go to /issues or randomly when i navigate to the instance. Sometime when get the user avatar /avatars/d41d8cd98f00b204xxxx8ecf8427e
Logs:

web_1  | [Macaron] PANIC: middleware render hasn't been registered
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/render.go:653 (0xd91398)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/render.go:710 (0xd9137d)
web_1  | /go/src/code.gitea.io/gitea/routers/routes/routes.go:166 (0x21aa215)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:79 (0xd87492)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:157 (0xd85e14)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:135 (0xd85bb9)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:121 (0xd8761c)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:112 (0x219de92)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/gzip/gzip.go:140 (0x219de85)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:79 (0xd87492)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:157 (0xd85e14)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:135 (0xd85bb9)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:121 (0xd8761c)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:112 (0xd991a5)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/recovery.go:161 (0xd99198)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/logger.go:40 (0xd8b1d7)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:157 (0xd85e14)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:135 (0xd85bb9)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:121 (0xd8761c)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:112 (0xd984a9)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/logger.go:52 (0xd98494)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/logger.go:40 (0xd8b1d7)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:157 (0xd85e14)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:135 (0xd85bb9)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:121 (0xd8761c)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/router.go:187 (0xd9a3f0)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/router.go:303 (0xd93b85)
web_1  | /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/macaron.go:218 (0xd8c54d)
web_1  | /go/src/code.gitea.io/gitea/vendor/github.com/gorilla/context/context.go:141 (0x1293493)
web_1  | /usr/local/go/src/net/http/server.go:2042 (0x77b583)
web_1  | /usr/local/go/src/net/http/server.go:2843 (0x77eb82)
web_1  | /usr/local/go/src/net/http/server.go:1925 (0x77a38c)
web_1  | /usr/local/go/src/runtime/asm_amd64.s:1374 (0x477dc0)

And, the second error when user connect to the SSH server.

web_1  | Could not load host certificate "/data/ssh/ssh_host_ed25519_cert": No such file or directory
web_1  | Could not load host certificate "/data/ssh/ssh_host_rsa_cert": No such file or directory
web_1  | Could not load host certificate "/data/ssh/ssh_host_ecdsa_cert": No such file or directory
web_1  | Could not load host certificate "/data/ssh/ssh_host_dsa_cert": No such file or directory

Tell me if you need more debug logs. Thanks

@noerw noerw added the type/bug label Jan 17, 2021
@lunny
Copy link
Member

lunny commented Jan 26, 2021

Looks like related with #13684

@jeanlucmongrain
Copy link
Contributor

Looks like related with #13684

@lunny no, it's constantly pouring in the logs (I use helm chart). Not just when a user is actively using the webui. Maybe a k8s probe call.

But why the panic aren't logged properly?

@zeripath
Copy link
Contributor

Update to 1.13.1

@jeanlucmongrain
Copy link
Contributor

jeanlucmongrain commented Feb 11, 2021

Update to 1.13.1

that fixed it... but that logs:

Unable to negotiate with 10.42.0.116 port 49242: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1 [preauth]
Could not load host certificate "/data/ssh/ssh_host_ed25519_cert": No such file or directory
Could not load host certificate "/data/ssh/ssh_host_rsa_cert": No such file or directory
Could not load host certificate "/data/ssh/ssh_host_ecdsa_cert": No such file or directory
Could not load host certificate "/data/ssh/ssh_host_dsa_cert": No such file or directory

is still there in a loop

@zeripath
Copy link
Contributor

Those can be ignored except for that you say they are in a loop indicating that it is constantly restarting which is a configuration issue that you will have to look at.

If you really don't want to see them edit your sshd_config to fix them (either the template or /etc/sshd_config). They will be caused by the:

HostCertificate /data/ssh/ssh_host_ed25519_cert

HostCertificate /data/ssh/ssh_host_rsa_cert

HostCertificate /data/ssh/ssh_host_ecdsa_cert

HostCertificate /data/ssh/ssh_host_dsa_cert

Which can be removed if you never intend to use certificates.

@mschoettle
Copy link
Contributor

Wouldn't the other way around be better? By default it is disabled and if someone wants to use certs they can customize the config. The comment in PR #13143 "Afaik, adding these lines does nothing unless the file(s) are present" is not true since it does cause errors and spams the log.

How can I edit the template to remove those lines? Is it possible such that an upgrade to Gitea will keep these settings?

zeripath added a commit to zeripath/gitea that referenced this issue May 12, 2021
A common bug report is the otherwise harmless sshd logging:

```
Could not load host certificate "/data/ssh/ssh_host_ed25519_cert": No such file or directory
```

This PR simply checks if these files exist before creation of sshd_config and if
they do not exist, doesn't add a reference to them.

Fix go-gitea#14110 amongst others.

Signed-off-by: Andrew Thornton <[email protected]>
lafriks added a commit that referenced this issue May 13, 2021
A common bug report is the otherwise harmless sshd logging:

```
Could not load host certificate "/data/ssh/ssh_host_ed25519_cert": No such file or directory
```

This PR simply checks if these files exist before creation of sshd_config and if
they do not exist, doesn't add a reference to them.

Fix #14110 amongst others.

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: silverwind <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
zeripath added a commit to zeripath/gitea that referenced this issue May 13, 2021
Backport go-gitea#15849

A common bug report is the otherwise harmless sshd logging:

```
Could not load host certificate "/data/ssh/ssh_host_ed25519_cert": No such file or directory
```

This PR simply checks if these files exist before creation of sshd_config and if
they do not exist, doesn't add a reference to them.

Fix go-gitea#14110 amongst others.

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: silverwind <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
techknowlogick pushed a commit that referenced this issue May 13, 2021
Backport #15849

A common bug report is the otherwise harmless sshd logging:

```
Could not load host certificate "/data/ssh/ssh_host_ed25519_cert": No such file or directory
```

This PR simply checks if these files exist before creation of sshd_config and if
they do not exist, doesn't add a reference to them.

Fix #14110 amongst others.

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: silverwind <[email protected]>
Co-authored-by: Lauris BH <[email protected]>

Co-authored-by: silverwind <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: 6543 <[email protected]>
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this issue Aug 10, 2021
A common bug report is the otherwise harmless sshd logging:

```
Could not load host certificate "/data/ssh/ssh_host_ed25519_cert": No such file or directory
```

This PR simply checks if these files exist before creation of sshd_config and if
they do not exist, doesn't add a reference to them.

Fix go-gitea#14110 amongst others.

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: silverwind <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants