Gitea 1.23.5 does not start as a Windows service with ACME enabled (works in 1.23.4) #14222

Closed
opened 2025-11-02 11:06:51 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @Jang-Haemin on GitHub (Mar 5, 2025).

Description

Note

Please understand that the content may be awkward as it was translated using a translator.

Hello,

I am using gitea-version-gogit-windows-4.0-amd64.exe and running Gitea as a Windows service.

To enable HTTPS, I am using Let's Encrypt and have applied the following ACME-related settings in my app.ini file:

[app.ini]

PROTOCOL = https
DOMAIN = r**.e**.co.kr
ENABLE_ACME = true
SSH_DOMAIN = r**.e**.co.kr
ACME_ACCEPTTOS = true
ACME_DIRECTORY = https
ACME_EMAIL = g**@e**.co.kr
HTTP_PORT = 443
ROOT_URL = https://r**.e**.co.kr
APP_DATA_PATH = F:\gitea/data
DISABLE_SSH = false
SSH_PORT = 22
OFFLINE_MODE = false
REDIRECT_OTHER_PORT = true
PORT_TO_REDIRECT = 80

With this configuration, Gitea worked fine up to version 1.23.4.
However, after updating to 1.23.5, the service fails to start.
When running the executable manually, I see the following error messages:

2025/03/05 23:16:39 cmd/web.go:364:listen() [E] Failed to start server: r**.e**.co.kr: obtaining certificate: [r**.e**.co.kr] Obtain: registering account [mailto:g**@e**.co.kr] with server: provisioning client: performing request: Get "https:": http: no Host in request URL
2025/03/05 23:16:39 cmd/web.go:366:listen() [I] HTTP Listener: 0.0.0.0:443 Closed

To provide more details, I have attached logs from both 1.23.4 (working version) and 1.23.5 (failing version) for comparison.

[logs]

Could this issue be related to recent ACME updates?
If I revert to 1.23.4 without changing the ACME configuration, Gitea runs without any issues.

Please investigate this issue.
Thank you!

Gitea Version

1.23.5

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.48.1

Operating System

Windows Server 2019 (1809)

How are you running Gitea?

I am using gitea-version-gogit-windows-4.0-amd64.exe and running Gitea as a Windows service.

Database

SQLite

Originally created by @Jang-Haemin on GitHub (Mar 5, 2025). ### Description > [!NOTE] > Please understand that the content may be awkward as it was translated using a translator. Hello, I am using `gitea-version-gogit-windows-4.0-amd64.exe` and running Gitea as a Windows service. To enable HTTPS, I am using Let's Encrypt and have applied the following ACME-related settings in my `app.ini` file: **[app.ini]** ``` PROTOCOL = https DOMAIN = r**.e**.co.kr ENABLE_ACME = true SSH_DOMAIN = r**.e**.co.kr ACME_ACCEPTTOS = true ACME_DIRECTORY = https ACME_EMAIL = g**@e**.co.kr HTTP_PORT = 443 ROOT_URL = https://r**.e**.co.kr APP_DATA_PATH = F:\gitea/data DISABLE_SSH = false SSH_PORT = 22 OFFLINE_MODE = false REDIRECT_OTHER_PORT = true PORT_TO_REDIRECT = 80 ``` With this configuration, Gitea worked fine up to **version 1.23.4**. However, after updating to **1.23.5**, the service fails to start. When running the executable manually, I see the following error messages: ``` 2025/03/05 23:16:39 cmd/web.go:364:listen() [E] Failed to start server: r**.e**.co.kr: obtaining certificate: [r**.e**.co.kr] Obtain: registering account [mailto:g**@e**.co.kr] with server: provisioning client: performing request: Get "https:": http: no Host in request URL 2025/03/05 23:16:39 cmd/web.go:366:listen() [I] HTTP Listener: 0.0.0.0:443 Closed ``` To provide more details, I have attached logs from both **1.23.4 (working version)** and **1.23.5 (failing version)** for comparison. **[logs]** - [gitea_log_1.23.4_success.txt](https://github.com/user-attachments/files/19092566/gitea_log_1.23.4_success.txt) - [gitea_log_1.23.5_failed.txt](https://github.com/user-attachments/files/19092567/gitea_log_1.23.5_failed.txt) Could this issue be related to recent ACME updates? If I revert to **1.23.4** without changing the ACME configuration, Gitea runs without any issues. Please investigate this issue. Thank you! ### Gitea Version 1.23.5 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version 2.48.1 ### Operating System Windows Server 2019 (1809) ### How are you running Gitea? I am using `gitea-version-gogit-windows-4.0-amd64.exe` and running Gitea as a Windows service. ### Database SQLite
GiteaMirror added the type/bugissue/workaround labels 2025-11-02 11:06:51 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Mar 5, 2025):

A regression, the change will be reverted.

@wxiaoguang commented on GitHub (Mar 5, 2025): A regression, the change will be reverted.
Author
Owner

@wxiaoguang commented on GitHub (Mar 5, 2025):

Hmm, another try Try to fix ACME (3rd) (#33807) #33808

@wxiaoguang commented on GitHub (Mar 5, 2025): Hmm, another try Try to fix ACME (3rd) (#33807) #33808
Author
Owner

@jimafisk commented on GitHub (Mar 6, 2025):

I'm also experiencing this issue on Ubuntu after upgrading from 1.23.3 to 1.23.5. Even after trying to downgrade back to 1.23.3 I'm still experiencing the same issue.

My custom/conf/app.in is:

[server]
LOCAL_ROOT_URL = https://mysite.com/
SSH_DOMAIN = mysite.com
DOMAIN = mysite.com
HTTP_PORT = 443
ROOT_URL = https://mysite.com/
PROTOCOL = https
ENABLE_ACME = true
ACME_ACCEPTTOS = true
ACME_DIRECTORY = https
ACME_EMAIL = servers@mysite.com

Doing tail -100 log/gitea.log shows:

Failed to start server: mysite.com: obtaining certificate: [mysite.com] Obtain: registering account [mailto:servers@mysite.com] with server: provisioning client: performing request: Get "https:": http: no Host in request URL
[I] HTTP Listener: 0.0.0.0:443 Closed

Sometimes running setcap CAP_NET_BIND_SERVICE=+eip /var/lib/gitea/gitea fixes network issues for me after upgrading and restarting the server, but not in this case. Thank you!

Edit: Downgrading back to 1.23.3 does seem to work, not sure what I was doing wrong before. I'm also using Sqlite in case that's helpful for debugging. Thanks!

@jimafisk commented on GitHub (Mar 6, 2025): I'm also experiencing this issue on Ubuntu after upgrading from `1.23.3` to `1.23.5`. Even after trying to downgrade back to `1.23.3` I'm still experiencing the same issue. My `custom/conf/app.in` is: ``` [server] LOCAL_ROOT_URL = https://mysite.com/ SSH_DOMAIN = mysite.com DOMAIN = mysite.com HTTP_PORT = 443 ROOT_URL = https://mysite.com/ PROTOCOL = https ENABLE_ACME = true ACME_ACCEPTTOS = true ACME_DIRECTORY = https ACME_EMAIL = servers@mysite.com ``` Doing `tail -100 log/gitea.log` shows: ``` Failed to start server: mysite.com: obtaining certificate: [mysite.com] Obtain: registering account [mailto:servers@mysite.com] with server: provisioning client: performing request: Get "https:": http: no Host in request URL [I] HTTP Listener: 0.0.0.0:443 Closed ``` Sometimes running `setcap CAP_NET_BIND_SERVICE=+eip /var/lib/gitea/gitea` fixes network issues for me after upgrading and restarting the server, but not in this case. Thank you! **Edit:** Downgrading back to `1.23.3` does seem to work, not sure what I was doing wrong before. I'm also using Sqlite in case that's helpful for debugging. Thanks!
Author
Owner

@wxiaoguang commented on GitHub (Mar 6, 2025):

As a workaround, you could manually set ACME_URL = https://acme-v02.api.letsencrypt.org/directory in your app.ini, it explicitly tell the ACME package to use the default issuer.

@wxiaoguang commented on GitHub (Mar 6, 2025): As a workaround, you could manually set `ACME_URL = https://acme-v02.api.letsencrypt.org/directory` in your app.ini, it explicitly tell the ACME package to use the default issuer.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14222