go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.2k stars 5.42k forks source link

Error 500 when creating pull request #22780

Closed ezplanet closed 1 year ago

ezplanet commented 1 year ago

Description

I saw that this was reported before and closed, but this is happening to me right now on gitea 1.18.3 deployed on a Ubuntu server 22.04.1 LTS. I set also git with
git config --system core.longpaths true

as suggested in the previous report, but it did not solve the problem. Whenever I try to create a pull request I get this error.

Gitea Version

1.18.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Ubuntu 22.04.1 LTS

How are you running Gitea?

running latest binary as downloaded

Database

MySQL

lunny commented 1 year ago

Could you post some logs?

ezplanet commented 1 year ago

Please see the logs from a session where I tried to create a pull request. The error log is empty.

gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:54:04 +0100] "GET /mauro/heatpump/compare/master...decoder-improvement HTTP/1.1" 404 13493 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:54:04 +0100] "GET /assets/css/theme-auto.css?v=1.18.3 HTTP/1.1" 304 3989 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:54:04 +0100] "GET /assets/css/index.css?v=1.18.3 HTTP/1.1" 200 134807 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:54:04 +0100] "GET /assets/img/logo.svg HTTP/1.1" 304 241 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:54:04 +0100] "GET /assets/js/index.js?v=1.18.3 HTTP/1.1" 200 318536 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:54:04 +0100] "GET /assets/img/404.png HTTP/1.1" 200 4611 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:54:04 +0100] "GET /assets/img/favicon.png HTTP/1.1" 304 245 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:56:50 +0100] "GET / HTTP/1.1" 200 6234 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:56:52 +0100] "GET /user/login?redirect_to=%2f HTTP/1.1" 200 4776 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:04 +0100] "POST /user/login HTTP/1.1" 303 1356 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:04 +0100] "GET / HTTP/1.1" 200 14162 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:04 +0100] "GET /avatars/f4f8bfa5d5eef478e23766246e364c2e?size=72 HTTP/1.1" 200 214970 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:04 +0100] "GET /avatars/f4f8bfa5d5eef478e23766246e364c2e?size=84 HTTP/1.1" 200 215518 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:04 +0100] "GET /avatars/d41d8cd98f00b204e9800998ecf8427e?size=84 HTTP/1.1" 304 214 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:04 +0100] "GET /assets/js/eventsource.sharedworker.js?v=1.18.3 HTTP/1.1" 304 265 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:04 +0100] "GET /repo/search?count_only=1&uid=13&team_id=0&q=&page=1&mode= HTTP/1.1" 200 317 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:04 +0100] "GET /repo/search?sort=updated&order=desc&uid=13&team_id=0&q=&page=1&limit=15&mode=&archived=false HTTP/1.1" 200 14491 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:11 +0100] "GET /EzPlanet/climatico/src/branch/feature/f35-vitocal-dashboard HTTP/1.1" 200 17230 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:11 +0100] "GET /assets/fonts/icons.9451d5fe.woff2 HTTP/1.1" 200 80480 "https://gitea.mydomain.local/assets/css/index.css?v=1.18.3" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:14 +0100] "GET /EzPlanet/climatico/pulls HTTP/1.1" 200 12766 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:27 +0100] "GET /EzPlanet/climatico/compare/master...master HTTP/1.1" 200 12042 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:32 +0100] "GET /EzPlanet/climatico/compare/master...feature/f35-vitocal-dashboard HTTP/1.1" 200 130148 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:35 +0100] "GET /assets/css/dropzone.0142b04d.css HTTP/1.1" 304 257 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:35 +0100] "GET /assets/js/dropzone.b77e7ea6.js HTTP/1.1" 304 805 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:35 +0100] "GET /assets/js/tribute.1ca3c8e4.js HTTP/1.1" 304 257 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:35 +0100] "GET /assets/js/easymde.e1bd16e9.js HTTP/1.1" 200 111378 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:55 +0100] "GET /assets/fonts/fontawesome-webfont.20fd1704.woff2 HTTP/1.1" 200 78439 "https://gitea.mydomain.local/assets/css/index.css?v=1.18.3" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:59 +0100] "POST /EzPlanet/climatico/compare/master...feature/f35-vitocal-dashboard HTTP/1.1" 500 23385 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:59 +0100] "GET /assets/img/500.png HTTP/1.1" 304 789 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:04 +0100] "GET /user/events HTTP/1.1" 200 415 "https://gitea.mydomain.local/assets/js/eventsource.sharedworker.js?v=1.18.3" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:11 +0100] "GET /user/events HTTP/1.1" 200 415 "https://gitea.mydomain.local/assets/js/eventsource.sharedworker.js?v=1.18.3" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:15 +0100] "GET /user/events HTTP/1.1" 200 415 "https://gitea.mydomain.local/assets/js/eventsource.sharedworker.js?v=1.18.3" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:28 +0100] "GET /user/events HTTP/1.1" 200 415 "https://gitea.mydomain.local/assets/js/eventsource.sharedworker.js?v=1.18.3" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:35 +0100] "GET /user/events HTTP/1.1" 200 415 "https://gitea.mydomain.local/assets/js/eventsource.sharedworker.js?v=1.18.3" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
ezplanet commented 1 year ago

Here is my apache2 configuration:

`

<VirtualHost *:80>
    ServerName gitea.mydomain.local
    CustomLog ${APACHE_LOG_DIR}/gitea.access.log vhost_combined
    ErrorLog  ${APACHE_LOG_DIR}/gitea.error.log
    ProxyPreserveHost On
    ProxyRequests off
    AllowEncodedSlashes NoDecode
    ProxyPass / http://localhost:3000/ nocanon
    ProxyPassReverse / http://localhost:3000/
</VirtualHost>
<VirtualHost *:443>
    ServerName gitea.mydomain.local
    SSLEngine On
    SSLProtocol all -SSLv2
    SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
    SSLCertificateFile      /etc/ssl/sites/mydomain.local-crt.pem
    SSLCertificateKeyFile   /etc/ssl/private/mydomain.local-key.pem
    SSLCACertificateFile    /etc/ssl/certs/MyCA-cacert.pem
    CustomLog ${APACHE_LOG_DIR}/gitea.access.log vhost_combined
    ErrorLog  ${APACHE_LOG_DIR}/gitea.error.log
    ProxyPreserveHost On
    ProxyRequests off
    AllowEncodedSlashes NoDecode
    ProxyPass / http://localhost:3000/ nocanon
    ProxyPassReverse / http://localhost:3000/
</VirtualHost>

`

lunny commented 1 year ago

Please see the logs from a session where I tried to create a pull request. The error log is empty.

gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:54:04 +0100] "GET /mauro/heatpump/compare/master...decoder-improvement HTTP/1.1" 404 13493 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:54:04 +0100] "GET /assets/css/theme-auto.css?v=1.18.3 HTTP/1.1" 304 3989 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:54:04 +0100] "GET /assets/css/index.css?v=1.18.3 HTTP/1.1" 200 134807 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:54:04 +0100] "GET /assets/img/logo.svg HTTP/1.1" 304 241 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:54:04 +0100] "GET /assets/js/index.js?v=1.18.3 HTTP/1.1" 200 318536 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:54:04 +0100] "GET /assets/img/404.png HTTP/1.1" 200 4611 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:54:04 +0100] "GET /assets/img/favicon.png HTTP/1.1" 304 245 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:56:50 +0100] "GET / HTTP/1.1" 200 6234 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:56:52 +0100] "GET /user/login?redirect_to=%2f HTTP/1.1" 200 4776 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:04 +0100] "POST /user/login HTTP/1.1" 303 1356 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:04 +0100] "GET / HTTP/1.1" 200 14162 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:04 +0100] "GET /avatars/f4f8bfa5d5eef478e23766246e364c2e?size=72 HTTP/1.1" 200 214970 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:04 +0100] "GET /avatars/f4f8bfa5d5eef478e23766246e364c2e?size=84 HTTP/1.1" 200 215518 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:04 +0100] "GET /avatars/d41d8cd98f00b204e9800998ecf8427e?size=84 HTTP/1.1" 304 214 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:04 +0100] "GET /assets/js/eventsource.sharedworker.js?v=1.18.3 HTTP/1.1" 304 265 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:04 +0100] "GET /repo/search?count_only=1&uid=13&team_id=0&q=&page=1&mode= HTTP/1.1" 200 317 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:04 +0100] "GET /repo/search?sort=updated&order=desc&uid=13&team_id=0&q=&page=1&limit=15&mode=&archived=false HTTP/1.1" 200 14491 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:11 +0100] "GET /EzPlanet/climatico/src/branch/feature/f35-vitocal-dashboard HTTP/1.1" 200 17230 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:11 +0100] "GET /assets/fonts/icons.9451d5fe.woff2 HTTP/1.1" 200 80480 "https://gitea.mydomain.local/assets/css/index.css?v=1.18.3" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:14 +0100] "GET /EzPlanet/climatico/pulls HTTP/1.1" 200 12766 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:27 +0100] "GET /EzPlanet/climatico/compare/master...master HTTP/1.1" 200 12042 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:32 +0100] "GET /EzPlanet/climatico/compare/master...feature/f35-vitocal-dashboard HTTP/1.1" 200 130148 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:35 +0100] "GET /assets/css/dropzone.0142b04d.css HTTP/1.1" 304 257 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:35 +0100] "GET /assets/js/dropzone.b77e7ea6.js HTTP/1.1" 304 805 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:35 +0100] "GET /assets/js/tribute.1ca3c8e4.js HTTP/1.1" 304 257 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:35 +0100] "GET /assets/js/easymde.e1bd16e9.js HTTP/1.1" 200 111378 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:55 +0100] "GET /assets/fonts/fontawesome-webfont.20fd1704.woff2 HTTP/1.1" 200 78439 "https://gitea.mydomain.local/assets/css/index.css?v=1.18.3" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:59 +0100] "POST /EzPlanet/climatico/compare/master...feature/f35-vitocal-dashboard HTTP/1.1" 500 23385 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:59 +0100] "GET /assets/img/500.png HTTP/1.1" 304 789 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:04 +0100] "GET /user/events HTTP/1.1" 200 415 "https://gitea.mydomain.local/assets/js/eventsource.sharedworker.js?v=1.18.3" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:11 +0100] "GET /user/events HTTP/1.1" 200 415 "https://gitea.mydomain.local/assets/js/eventsource.sharedworker.js?v=1.18.3" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:15 +0100] "GET /user/events HTTP/1.1" 200 415 "https://gitea.mydomain.local/assets/js/eventsource.sharedworker.js?v=1.18.3" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:28 +0100] "GET /user/events HTTP/1.1" 200 415 "https://gitea.mydomain.local/assets/js/eventsource.sharedworker.js?v=1.18.3" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:35 +0100] "GET /user/events HTTP/1.1" 200 415 "https://gitea.mydomain.local/assets/js/eventsource.sharedworker.js?v=1.18.3" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"

There is no 500 error request in your logs

ezplanet commented 1 year ago

I have just update to Gitea Version: 1.19.0+rc1-13-g6be6c19da but the issue persists. Is there any chance this will be looked at any time soon? I can no longer use Gitea since version 1.17

ezplanet commented 1 year ago
Screenshot 2023-03-07 at 12 00 14

This is what I get. My apache logs don't show the error.

delvh commented 1 year ago

Please see the logs from a session where I tried to create a pull request. The error log is empty: gitea.mydomain.local:443 192.168.90.23 - - [13/Feb/2023:18:57:59 +0100] "POST /EzPlanet/climatico/compare/master...feature/f35-vitocal-dashboard HTTP/1.1" 500 23385 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"

Those logs don't look like logs produced by Gitea to me. Gitea logs should look something like

2023/03/06 17:48:30 [6406195e] router: completed GET /repo/search?count_only=1&uid=1&team_id=0&q=&page=1&mode= for 127.0.0.1:41648, 0 in 21.3ms @ repo/repo.go:472(repo.SearchRepo)

It appears to me as if you gave rather the nginx or similar logs, which are not helping at all to troubleshoot the underlying Gitea problem.

EDIT:

This is what I get. My apache logs don't show the error.

Yes, we need the Gitea logs, not the apache logs. The apache logs can only log that it happened, not why it happened.

ezplanet commented 1 year ago
root@grecale:/var/lib/gitea# pwd
/var/lib/gitea
root@grecale:/var/lib/gitea# l *
custom:
total 0

data:
total 52
drwxr-xr-x  2 gitea git 4096 Dec 21  2020 attachments
drwxr-xr-x  2 gitea git 4096 Jan 30  2021 avatars
drwxr-xr-x  2 gitea git 4096 Jan 27 16:20 home
drwxr-xr-x  4 gitea git 4096 Mar  7 11:53 indexers
drwxr-xr-x  2 gitea git 4096 Nov 22 04:28 jwt
drwxr-xr-x  2 gitea git 4096 Dec 21  2020 lfs
drwxr-xr-x  2 gitea git 4096 Nov 22 04:28 packages
drwxr-xr-x  9 gitea git 4096 Nov 22 04:28 queues
drwxr-xr-x  2 gitea git 4096 Nov 22 04:28 repo-archive
drwxr-xr-x  2 gitea git 4096 Dec 21  2020 repo-avatars
drwx------ 12 gitea git 4096 Feb  3 18:57 sessions
drwxr-xr-x  2 gitea git 4096 Jun 13  2021 ssh
drwxr-xr-x  4 gitea git 4096 Mar  7 11:54 tmp

log:
total 0
ezplanet commented 1 year ago

I have a plain vanilla installation as downloaded from gitea site. How do I get gitea to produce any log?

delvh commented 1 year ago

What's the value of [log].ROOT_PATH in your app.ini? That's where the logs will be stored.

delvh commented 1 year ago

Do you use systemd? If yes, logs can be found by executing journalctl --unit gitea

ezplanet commented 1 year ago
[log]
MODE                 = console
LEVEL                = info
ROOT_PATH            = /var/lib/gitea/log
REDIRECT_MACARON_LOG = true
MACARON              = console
ROUTER               = console
delvh commented 1 year ago

So, your logs are at /var/lib/gitea/log. EDIT: Or not, apparently they are missing? Ah, you instructed Gitea not to collect file logs, that's why. Please switch MODE to MODE = console, file and try to open the PRs that throw a 500 again.

ezplanet commented 1 year ago

~So, your logs are at /var/lib/gitea/log.~ ~EDIT: Or not, apparently they are missing?~ Ah, you instructed Gitea not to collect file logs, that's why. Please switch MODE to MODE = console, file and try to open the PRs that throw a 500 again.

I haven't instructed anything. That is the default. I have changed very little of the default configuration. I am doing it now.

delvh commented 1 year ago

Okay, I rephrase that to You allowed Gitea to instruct itself not to produce any logs. :smiley: Still, it's in your own interest to change it now so we can actually see what went wrong.

ezplanet commented 1 year ago

Thank you for your help, it looks like we have an error logged now:

type is LONGTEXT
2023/03/08 11:17:19 routers/init.go:149:GlobalInitInstalled() [I] ORM engine initialization successful!
2023/03/08 11:17:19 ...er/issues/indexer.go:173:func2() [I] [640860af-3] PID 1093653: Initializing Issue Indexer: bleve
2023/03/08 11:17:19 ...xer/stats/indexer.go:38:populateRepoIndexer() [I] Populating the repo stats indexer with existing repositories
2023/03/08 11:17:19 ...er/issues/indexer.go:269:func3() [I] [640860af-3] Issue Indexer Initialization took 3.058527ms
2023/03/08 11:17:19 ...xer/stats/indexer.go:84:populateRepoIndexer() [I] Done (re)populating the repo stats indexer with existing repositories
2023/03/08 11:17:19 modules/ssh/ssh.go:331:Listen() [I] Adding SSH host key: /var/lib/gitea/data/ssh/gitea.rsa
2023/03/08 11:17:19 modules/ssh/init.go:26:Init() [I] SSH server started on :3022. 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])
2023/03/08 11:17:19 ...s/graceful/server.go:62:NewServer() [I] [640860af-19] Starting new SSH server: tcp::3022 on PID: 1093653
2023/03/08 11:17:19 cmd/web.go:220:listen() [I] [640860af-27] Listen: http://0.0.0.0:3000
2023/03/08 11:17:19 cmd/web.go:224:listen() [I] [640860af-27] AppURL(ROOT_URL): https://gitea.ezplanet.org/
2023/03/08 11:17:19 cmd/web.go:227:listen() [I] [640860af-27] LFS server enabled
2023/03/08 11:17:19 ...s/graceful/server.go:62:NewServer() [I] [640860af-27] Starting new Web server: tcp:0.0.0.0:3000 on PID: 1093653
root@grecale:/var/lib/gitea/log# cat gitea.log
2023/03/08 11:17:18 ...dules/setting/log.go:331:initLogFrom() [I] Gitea Log Mode: File(File:info)
2023/03/08 11:17:18 ...dules/setting/log.go:286:generateNamedLogger() [I] Router Log: Console(console:info)
2023/03/08 11:17:18 ...les/setting/cache.go:75:loadCacheFrom() [I] Cache Service Enabled
2023/03/08 11:17:18 ...les/setting/cache.go:90:loadCacheFrom() [I] Last Commit Cache Service Enabled
2023/03/08 11:17:18 ...s/setting/session.go:74:loadSessionFrom() [I] Session Service Enabled
2023/03/08 11:17:18 ...g/config_provider.go:30:deprecatedSetting() [E] Deprecated fallback `[mailer]` `HOST` present. Use `[mailer]` `SMTP_ADDR` instead. This fallback will be/has been removed in v1.19.0
2023/03/08 11:17:18 ...g/config_provider.go:30:deprecatedSetting() [E] Deprecated fallback `[mailer]` `SKIP_VERIFY` present. Use `[mailer]` `FORCE_TRUST_SERVER_CERT` instead. This fallback will be/has been removed in v1.19.0
2023/03/08 11:17:18 ...es/setting/mailer.go:202:loadMailerFrom() [W] connecting over insecure SMTP protocol to non-local address is not recommended
2023/03/08 11:17:18 ...es/setting/mailer.go:236:loadMailerFrom() [I] Mail Service Enabled
2023/03/08 11:17:18 ...es/setting/mailer.go:247:loadRegisterMailFrom() [I] Register Mail Service Enabled
2023/03/08 11:17:18 ...es/setting/mailer.go:258:loadNotifyMailFrom() [I] Notify Mail Service Enabled
2023/03/08 11:17:18 ...s/storage/storage.go:175:initAttachments() [I] Initialising Attachment storage with type:
2023/03/08 11:17:18 ...les/storage/local.go:45:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/attachments
2023/03/08 11:17:18 ...s/storage/storage.go:165:initAvatars() [I] Initialising Avatar storage with type:
2023/03/08 11:17:18 ...les/storage/local.go:45:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/avatars
2023/03/08 11:17:18 ...s/storage/storage.go:191:initRepoAvatars() [I] Initialising Repository Avatar storage with type:
2023/03/08 11:17:18 ...les/storage/local.go:45:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/repo-avatars
2023/03/08 11:17:18 ...s/storage/storage.go:185:initLFS() [I] Initialising LFS storage with type:
2023/03/08 11:17:18 ...les/storage/local.go:45:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/lfs
2023/03/08 11:17:18 ...s/storage/storage.go:197:initRepoArchives() [I] Initialising Repository Archive storage with type:
2023/03/08 11:17:18 ...les/storage/local.go:45:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/repo-archive
2023/03/08 11:17:18 ...s/storage/storage.go:207:initPackages() [I] Initialising Packages storage with type:
2023/03/08 11:17:18 ...les/storage/local.go:45:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/packages
2023/03/08 11:17:18 routers/init.go:143:GlobalInitInstalled() [I] SQLite3 support is enabled
2023/03/08 11:17:18 routers/common/db.go:21:InitDBEngine() [I] Beginning ORM engine initialization.
2023/03/08 11:17:18 routers/common/db.go:28:InitDBEngine() [I] ORM engine initialization attempt #1/10...
2023/03/08 11:17:18 cmd/web.go:163:runWeb() [I] PING DATABASE mysql
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table system_setting Column version db default is , struct default is 1
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table login_source has column is_actived but struct has not related field
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table gpg_key column content db type is TEXT(65535), struct type is MEDIUMTEXT
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table gpg_key_import column content db type is TEXT(65535), struct type is MEDIUMTEXT
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table public_key column content db type is TEXT(65535), struct type is MEDIUMTEXT
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table project column board_type db type is INT(11), struct type is INT UNSIGNED
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table project column card_type db type is INT(10) UNSIGNED, struct type is INT UNSIGNED
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table project column type db type is INT(11), struct type is INT UNSIGNED
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table comment column content db type is TEXT(65535), struct type is LONGTEXT
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table comment column patch db type is TEXT(65535), struct type is LONGTEXT
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table issue column content db type is TEXT(65535), struct type is LONGTEXT
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table hook_task column payload_content db type is TEXT(65535), struct type is LONGTEXT
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table hook_task column request_content db type is TEXT(65535), struct type is LONGTEXT
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table hook_task column response_content db type is TEXT(65535), struct type is LONGTEXT
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table hook_task has column repo_id but struct has not related field
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table hook_task has column type but struct has not related field
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table hook_task has column url but struct has not related field
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table hook_task has column signature but struct has not related field
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table hook_task has column http_method but struct has not related field
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table hook_task has column content_type but struct has not related field
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table hook_task has column is_ssl but struct has not related field
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table hook_task has column typ but struct has not related field
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table webhook has column signature but struct has not related field
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table webhook has column is_ssl but struct has not related field
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table webhook has column hook_task_type but struct has not related field
2023/03/08 11:17:18 routers/init.go:148:GlobalInitInstalled() [W] Table task has column errors but struct has not related field
2023/03/08 11:17:19 routers/init.go:148:GlobalInitInstalled() [W] Table package_version column metadata_json db type is TEXT(65535), struct type is LONGTEXT
2023/03/08 11:17:19 routers/init.go:149:GlobalInitInstalled() [I] ORM engine initialization successful!
2023/03/08 11:17:19 ...er/issues/indexer.go:173:func2() [I] [640860af-3] PID 1093653: Initializing Issue Indexer: bleve
2023/03/08 11:17:19 ...xer/stats/indexer.go:38:populateRepoIndexer() [I] Populating the repo stats indexer with existing repositories
2023/03/08 11:17:19 ...er/issues/indexer.go:269:func3() [I] [640860af-3] Issue Indexer Initialization took 3.058527ms
2023/03/08 11:17:19 ...xer/stats/indexer.go:84:populateRepoIndexer() [I] Done (re)populating the repo stats indexer with existing repositories
2023/03/08 11:17:19 modules/ssh/ssh.go:331:Listen() [I] Adding SSH host key: /var/lib/gitea/data/ssh/gitea.rsa
2023/03/08 11:17:19 modules/ssh/init.go:26:Init() [I] SSH server started on :3022. 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])
2023/03/08 11:17:19 ...s/graceful/server.go:62:NewServer() [I] [640860af-19] Starting new SSH server: tcp::3022 on PID: 1093653
2023/03/08 11:17:19 cmd/web.go:220:listen() [I] [640860af-27] Listen: http://0.0.0.0:3000
2023/03/08 11:17:19 cmd/web.go:224:listen() [I] [640860af-27] AppURL(ROOT_URL): https://gitea.ezplanet.org/
2023/03/08 11:17:19 cmd/web.go:227:listen() [I] [640860af-27] LFS server enabled
2023/03/08 11:17:19 ...s/graceful/server.go:62:NewServer() [I] [640860af-27] Starting new Web server: tcp:0.0.0.0:3000 on PID: 1093653
2023/03/08 11:18:26 ...ers/web/repo/pull.go:1282:CompareAndPullRequestPost() [E] [640860f2] NewPullRequest: newIssue: Error 1062 (23000): Duplicate entry '73-1' for key 'UQE_issue_repo_index'

It looks like there is a DB problem, perhaps something happened after a gitea upgrade?

delvh commented 1 year ago

So, I've just had a look into the source code. The problem seems to be that issue 1 exists already in the repo with ID 73 (if I understand the error message correctly). For some reason, Gitea doesn't know about that. And since other users haven't complained about this problem, it seems to me as if your database somehow got slightly corrupted. Somehow, an issue got inserted without increasing the corresponding counter in the table issue_index. I can see two fixes:

  1. Increase the entry for repo 73 in issue_index to the currently highest index you can find there (the maximum of issues and pull requests) (probably 1)
  2. Delete all issues and PRs in that repo.

You can decide yourself which fix is better.

ezplanet commented 1 year ago

Since I am not familiar with the software (I am an end user regarding gitea), 1 is not an option for me. I deleted all previously closed PRs (there were 4) and I no longer get the error. Thank you for your help! :-)

delvh commented 1 year ago

So, this issue can now be closed?