Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add proper error message if session provider can not be created#35520

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@6543
Copy link
Member

@65436543 commentedSep 22, 2025
edited
Loading

the middleware that creates the session provider just panics if on creation the config is wrong.
this is not catched and so you just get an cryptic stacktrace with no point where to look at (as user).

Before

2025/09/16 03:56:37 ...xer/stats/indexer.go:87:populateRepoIndexer() [I] Done (re)populating the repo stats indexer with existing repositories2025/09/16 03:56:37 modules/ssh/ssh.go:387:Listen() [I] Adding SSH host key: /var/lib/gitea/data/ssh/gitea.rsa2025/09/16 03:56:37 modules/ssh/init.go:26:Init() [I] SSH server started on :1234. Cipher list ([chacha20-poly1305@openssh.com aes128-ctr aes192-ctr aes256-ctr aes128-gcm@openssh.com aes256-gcm@openssh.com]), key exchange algorithms ([curve25519-sha256 ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group14-sha256 diffie-hellman-group14-sha1]), MACs ([hmac-sha2-256-etm@openssh.com hmac-sha2-256 hmac-sha1])2025/09/16 03:56:37 ...s/graceful/server.go:50:NewServer() [I] Starting new SSH server: tcp::1234 on PID: 833372025/09/16 03:56:38 cmd/web.go:231:func1() [F] PANIC: dial tcp 127.0.0.1:6379: connect: connection refusedgitea.com/go-chi/session@v0.0.0-20240316035857-16768d98ec96/session.go:239 (0x1cdb908)code.gitea.io/gitea/routers/common/middleware.go:108 (0x2547f5a)code.gitea.io/gitea/routers/web/web.go:270 (0x278b8e9)code.gitea.io/gitea/routers/init.go:185 (0x2850d89)code.gitea.io/gitea/cmd/web.go:211 (0x295c5ad)code.gitea.io/gitea/cmd/web.go:262 (0x295cacb)code.gitea.io/gitea/cmd/main.go:111 (0x2953422)github.com/urfave/cli/v2@v2.27.2/command.go:276 (0x1cc3dfd)github.com/urfave/cli/v2@v2.27.2/command.go:269 (0x1cc4084)github.com/urfave/cli/v2@v2.27.2/app.go:333 (0x1cc086a)github.com/urfave/cli/v2@v2.27.2/app.go:307 (0x2953f18)code.gitea.io/gitea/cmd/main.go:172 (0x2953efc)code.gitea.io/gitea/main.go:46 (0x2998498)runtime/proc.go:283 (0x4471ca)runtime/asm_amd64.s:1700 (0x484a20)

After

2025/09/22 22:52:35 .../templates/htmlrenderer.go:118:initHTMLRenderer() [D] Creating static HTML Renderer2025/09/22 22:52:35 routers/web/web.go:273:Routes() [F] common.Sessioner failed: failed to create session middleware: dial tcp 127.0.0.1:6379: connect: connection refused

@GiteaBotGiteaBot added the lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelSep 22, 2025
@github-actionsgithub-actionsbot added the modifies/goPull requests that update Go code labelSep 22, 2025
@65436543 added type/enhancementAn improvement of existing functionality and removed modifies/goPull requests that update Go code labelsSep 22, 2025
@github-actionsgithub-actionsbot added the modifies/goPull requests that update Go code labelSep 22, 2025
@GiteaBotGiteaBot added lgtm/need 1This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelsSep 23, 2025
@6543
Copy link
MemberAuthor

PS: looks like we dont use Exist and Count in our codebase at all (beside to define providers to match that interface ...)

this should be an relict from the time we migrated away from macaron to chi ... can we move the code into our codebase and refactore e.g. drop unused stuff etc ?

-> should be another pull and i dont have time to do that atm

@6543
Copy link
MemberAuthor

making changes via mobil via web is hard ...

lunny reacted with laugh emoji

@6543
Copy link
MemberAuthor

@lunny should be ready now 😅

@GiteaBotGiteaBot added lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1This PR needs approval from one additional maintainer to be merged. labelsSep 28, 2025
@lunnylunny added this to the1.26.0 milestoneSep 28, 2025
@65436543enabled auto-merge (squash)September 28, 2025 11:57
@65436543 merged commitfbe80e6 intogo-gitea:mainSep 28, 2025
26 checks passed
@65436543 deleted the propper-error-for-sessioner-creation-fail branchSeptember 28, 2025 14:14
rossigee pushed a commit to rossigee/gitea that referenced this pull requestOct 2, 2025
…itea#35520)the middleware that creates the session provider just panics if oncreation the config is wrong.this is not catched and so you just get an cryptic stacktrace with nopoint where to look at (as user).## Before```2025/09/16 03:56:37 ...xer/stats/indexer.go:87:populateRepoIndexer() [I] Done (re)populating the repo stats indexer with existing repositories2025/09/16 03:56:37 modules/ssh/ssh.go:387:Listen() [I] Adding SSH host key: /var/lib/gitea/data/ssh/gitea.rsa2025/09/16 03:56:37 modules/ssh/init.go:26:Init() [I] SSH server started on :1234. Cipher list ([chacha20-poly1305@openssh.com aes128-ctr aes192-ctr aes256-ctr aes128-gcm@openssh.com aes256-gcm@openssh.com]), key exchange algorithms ([curve25519-sha256 ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group14-sha256 diffie-hellman-group14-sha1]), MACs ([hmac-sha2-256-etm@openssh.com hmac-sha2-256 hmac-sha1])2025/09/16 03:56:37 ...s/graceful/server.go:50:NewServer() [I] Starting new SSH server: tcp::1234 on PID: 833372025/09/16 03:56:38 cmd/web.go:231:func1() [F] PANIC: dial tcp 127.0.0.1:6379: connect: connection refusedgitea.com/go-chi/session@v0.0.0-20240316035857-16768d98ec96/session.go:239 (0x1cdb908)code.gitea.io/gitea/routers/common/middleware.go:108 (0x2547f5a)code.gitea.io/gitea/routers/web/web.go:270 (0x278b8e9)code.gitea.io/gitea/routers/init.go:185 (0x2850d89)code.gitea.io/gitea/cmd/web.go:211 (0x295c5ad)code.gitea.io/gitea/cmd/web.go:262 (0x295cacb)code.gitea.io/gitea/cmd/main.go:111 (0x2953422)github.com/urfave/cli/v2@v2.27.2/command.go:276 (0x1cc3dfd)github.com/urfave/cli/v2@v2.27.2/command.go:269 (0x1cc4084)github.com/urfave/cli/v2@v2.27.2/app.go:333 (0x1cc086a)github.com/urfave/cli/v2@v2.27.2/app.go:307 (0x2953f18)code.gitea.io/gitea/cmd/main.go:172 (0x2953efc)code.gitea.io/gitea/main.go:46 (0x2998498)runtime/proc.go:283 (0x4471ca)runtime/asm_amd64.s:1700 (0x484a20)```## After```2025/09/22 22:52:35 .../templates/htmlrenderer.go:118:initHTMLRenderer() [D] Creating static HTML Renderer2025/09/22 22:52:35 routers/web/web.go:273:Routes() [F] common.Sessioner failed: failed to create session middleware: dial tcp 127.0.0.1:6379: connect: connection refused```---------Signed-off-by: 6543 <6543@obermui.de>
rossigee pushed a commit to rossigee/gitea that referenced this pull requestOct 4, 2025
…itea#35520)the middleware that creates the session provider just panics if oncreation the config is wrong.this is not catched and so you just get an cryptic stacktrace with nopoint where to look at (as user).## Before```2025/09/16 03:56:37 ...xer/stats/indexer.go:87:populateRepoIndexer() [I] Done (re)populating the repo stats indexer with existing repositories2025/09/16 03:56:37 modules/ssh/ssh.go:387:Listen() [I] Adding SSH host key: /var/lib/gitea/data/ssh/gitea.rsa2025/09/16 03:56:37 modules/ssh/init.go:26:Init() [I] SSH server started on :1234. Cipher list ([chacha20-poly1305@openssh.com aes128-ctr aes192-ctr aes256-ctr aes128-gcm@openssh.com aes256-gcm@openssh.com]), key exchange algorithms ([curve25519-sha256 ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group14-sha256 diffie-hellman-group14-sha1]), MACs ([hmac-sha2-256-etm@openssh.com hmac-sha2-256 hmac-sha1])2025/09/16 03:56:37 ...s/graceful/server.go:50:NewServer() [I] Starting new SSH server: tcp::1234 on PID: 833372025/09/16 03:56:38 cmd/web.go:231:func1() [F] PANIC: dial tcp 127.0.0.1:6379: connect: connection refusedgitea.com/go-chi/session@v0.0.0-20240316035857-16768d98ec96/session.go:239 (0x1cdb908)code.gitea.io/gitea/routers/common/middleware.go:108 (0x2547f5a)code.gitea.io/gitea/routers/web/web.go:270 (0x278b8e9)code.gitea.io/gitea/routers/init.go:185 (0x2850d89)code.gitea.io/gitea/cmd/web.go:211 (0x295c5ad)code.gitea.io/gitea/cmd/web.go:262 (0x295cacb)code.gitea.io/gitea/cmd/main.go:111 (0x2953422)github.com/urfave/cli/v2@v2.27.2/command.go:276 (0x1cc3dfd)github.com/urfave/cli/v2@v2.27.2/command.go:269 (0x1cc4084)github.com/urfave/cli/v2@v2.27.2/app.go:333 (0x1cc086a)github.com/urfave/cli/v2@v2.27.2/app.go:307 (0x2953f18)code.gitea.io/gitea/cmd/main.go:172 (0x2953efc)code.gitea.io/gitea/main.go:46 (0x2998498)runtime/proc.go:283 (0x4471ca)runtime/asm_amd64.s:1700 (0x484a20)```## After```2025/09/22 22:52:35 .../templates/htmlrenderer.go:118:initHTMLRenderer() [D] Creating static HTML Renderer2025/09/22 22:52:35 routers/web/web.go:273:Routes() [F] common.Sessioner failed: failed to create session middleware: dial tcp 127.0.0.1:6379: connect: connection refused```---------Signed-off-by: 6543 <6543@obermui.de>
zjjhot added a commit to zjjhot/gitea that referenced this pull requestOct 5, 2025
* giteaofficial/main:  fix: auto-expand and auto-scroll for actions logs (go-gitea#35570) (go-gitea#35583)  [skip ci] Updated translations via Crowdin  [skip ci] Updated translations via Crowdin  Fix creating pull request failure when the target branch name is the same as some tag (go-gitea#35552)  Use bundled version of spectral (go-gitea#35573)  Add rebase push display wrong comments bug (go-gitea#35560)  Address some CodeQL security concerns (go-gitea#35572)  fix(webhook): prevent tag events from bypassing branch filters targetsgo-gitea#35449 (go-gitea#35567)  Added button to copy file name in PR files (go-gitea#35509)  Update JS and PY deps (go-gitea#35565)  Enable a few more tsconfig options (go-gitea#35553)  Bump github.com/wneessen/go-mail from 0.6.2 to 0.7.1 (go-gitea#35557)  add more routes to the "expensive" list (go-gitea#35547)  Drop json-iterator dependency (go-gitea#35544)  Add proper error message if session provider can not be created (go-gitea#35520)  use experimental go json v2 library (go-gitea#35392)  Use global lock instead of status pool for cron lock (go-gitea#35507)  Move some functions to gitrepo package (go-gitea#35503)  Move GetDiverging functions to gitrepo (go-gitea#35524)  [skip ci] Updated translations via Crowdin
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@lunnylunnylunny approved these changes

@delvhdelvhdelvh approved these changes

Assignees

No one assigned

Labels

lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore.modifies/dependenciesmodifies/goPull requests that update Go codetype/enhancementAn improvement of existing functionality

Projects

None yet

Milestone

1.26.0

Development

Successfully merging this pull request may close these issues.

4 participants

@6543@lunny@delvh@GiteaBot

[8]ページ先頭

©2009-2025 Movatter.jp