Skip to content

ACME User Addition Bug #876

@Alcorio

Description

@Alcorio

Describe the bug
A few days ago, I used the ACME feature of nginx-ui to issue a certificate (let’s call it Certificate 1) for one of my internal websites. Everything worked fine. However, today, when I attempted to register a new ACME account to issue Certificate 2 for another website, I encountered the error:

send on closed channel

Additionally, in another attempt, my ACME server StepCA reported the following error:

The server could not connect to validation target

Furthermore, when I tried to renew Certificate 1, I encountered this error:

renew cert error: error: one or more domains had a problem: [mail.tbird.com] [mail.tbird.com] acme: error presenting token: could not start HTTP server for challenge: listen tcp :9180: bind: address already in use

To Reproduce

  1. Add a new ACME user (I tested using both my own StepCA and https://acme-v02.api.letsencrypt.org/directory, and both resulted in the same issue).
  2. Open Certificate 1 (issued under the previous ACME account) and click Renew. The renewal works fine.
  3. Go back to ACME Users, try to modify or add a new user, and the error send on closed channel occurs.
  4. At this point, updating certificates via Certificates List still works fine.
  5. Navigate to Managed Sites → Sites List → Modify and toggle the Encrypt website with Let's Encrypt option (enable it if disabled, or disable it if enabled), then attempt to obtain a new certificate. nginx-ui keeps trying indefinitely, and StepCA logs the error:

The server could not connect to validation target

  1. Attempt to renew the certificate via Certificates List and encounter the error:

9180: bind: address already in use

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
nginx-ui

2月 19 17:41:30 p6 nginx-ui[2500254]: 2025-02-19 17:41:30 ERROR router/middleware.go:16 send on closed channel
2月 19 17:41:30 p6 nginx-ui[2500254]: goroutine 5599 [running]:
2月 19 17:41:30 p6 nginx-ui[2500254]: github.com/uozi-tech/cosy/router.Init.recovery.func2.1()
2月 19 17:41:30 p6 nginx-ui[2500254]: /home/runner/go/pkg/mod/github.com/uozi-tech/cosy@v1.14.4/router/middleware.go:15 +0x65
2月 19 17:41:30 p6 nginx-ui[2500254]: panic({0x39be620?, 0x4f5f930?})
2月 19 17:41:30 p6 nginx-ui[2500254]: /home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.6.linux-amd64/src/runtime/panic.go:785 +0x132
2月 19 17:41:30 p6 nginx-ui[2500254]: github.com/0xJacky/Nginx-UI/internal/cert.(*ChannelWriter).Write(0xc000f24c18, {0xc005e54b40?, 0x48, 0xc000086f08?})
2月 19 17:41:30 p6 nginx-ui[2500254]: /home/runner/work/nginx-ui/nginx-ui/internal/cert/channel_writer.go:17 +0x55
2月 19 17:41:30 p6 nginx-ui[2500254]: log.(*Logger).output(0xc0055eaf30, 0x0, 0x2, 0xc000087030)
2月 19 17:41:30 p6 nginx-ui[2500254]: /home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.6.linux-amd64/src/log/log.go:245 +0x45a
2月 19 17:41:30 p6 nginx-ui[2500254]: log.(*Logger).Printf(0xc0009c3bf0?, {0xc0068a1860?, 0x20?}, {0xc005e0f450?, 0x415fcb?, 0x72ddaf8cdd78?})
2月 19 17:41:30 p6 nginx-ui[2500254]: /home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.6.linux-amd64/src/log/log.go:268 +0x65
2月 19 17:41:30 p6 nginx-ui[2500254]: github.com/go-acme/lego/v4/log.Printf(...)
2月 19 17:41:30 p6 nginx-ui[2500254]: /home/runner/go/pkg/mod/github.com/go-acme/lego/v4@v4.21.0/log/logger.go:48
2月 19 17:41:30 p6 nginx-ui[2500254]: github.com/go-acme/lego/v4/log.Infof

Info (please complete the following information):

  • Server OS: Ubuntu 24.10
  • Server Arch: x86_64
  • Nginx UI Version: Version: 2.0.0-rc.2 (384)

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions