Hi,
We are self-hosting a Gitlab server for our computer sciences school and since some day; sometimes; when some users try to push their commits to the git server, they get a “Internal API error (500)” from the server. They also get the error message “pre-receive hook declined”. Sometimes, when they try again, everything push as it should, but other times, it does not.
By looking on logs on the server, I can see those JSON messages:
{
"correlation_id":"01H91AVN658W8H6WVNG40MPSA3",
"duration_ms":218,
"error":"Internal API error (500)",
"level":"error",
"method":"POST",
"msg":"Internal API error",
"status":500,
"time":"2023-08-29T19:03:23.851Z",
"url":"http://unix/tigit/api/v4/internal/post_receive"
}
and
{
"correlation_id":"01H91AVN658W8H6WVNG40MPSA3",
"error":"GitLab: http post to gitlab api /post_receive endpoint: Internal API error (500)",
"grpc.meta.client_name":"gitaly-hooks",
"grpc.meta.deadline_type":"none",
"grpc.meta.method_type":"bidi_stream",
"grpc.method":"PostReceiveHook",
"grpc.request.fullMethod":"/gitaly.HookService/PostReceiveHook",
"grpc.request.glProjectPath":"2249823/420-1n1-tp1-exercices",
"grpc.request.glRepository":"project-61",
"grpc.request.repoPath":"@hashed/d0/29/d029fa3a95e174a19934857f535eb9427d967218a36ea014b70ad704bc6c8d1c.git",
"grpc.request.repoStorage":"default",
"grpc.service":"gitaly.HookService",
"grpc.start_time":"2023-08-29T19:03:23.632",
"level":"warning",
"msg":"stopping transaction because post-receive hook failed",
"peer.address":"@",
"pid":299,
"span.kind":"server",
"system":"grpc",
"time":"2023-08-29T19:03:23.851Z",
"user_id":"user-78",
"username":"2249823"
}
The Gitlab version is the “gitlab-ee:16.0.2-ee.0” and here the configuration of the Gitlab docker:
gitlab:
image: 'gitlab/gitlab-ee:16.0.2-ee.0'
restart: always
hostname: 'info420.cegepdrummond.ca'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://info420.cegepdrummond.ca/tigit'
gitlab_rails['gitlab_shell_ssh_port'] = 7022
nginx['redirect_http_to_https'] = false
nginx['listen_port'] = 80
nginx['listen_https'] = false
letsencrypt['enable'] = false
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "courriel.libreti.net"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "****"
gitlab_rails['smtp_password'] = "****"
gitlab_rails['smtp_domain'] = "courriel.libreti.net"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_openssl_verify_mode'] = 'none'
gitlab_rails['gitlab_email_from'] = '****'
gitlab_rails['gitlab_email_reply_to'] = 'noreply@info420.cegepdrummond.ca'
# Add any other gitlab.rb configuration here, each on its own line
ports:
- '7080:80'
- '7022:22'
- '7443:443'
volumes:
- '/var/docker-files/tigit/config:/etc/gitlab'
- '/var/docker-files/tigit/logs:/var/log/gitlab'
- '/var/docker-files/tigit/data:/var/opt/gitlab'
There is also a simple Apache proxy on the server with this configuration:
ProxyPass /tigit/ http://127.0.0.1:7080/tigit/
ProxyPassReverse /tigit/ http://127.0.0.1:7080/tigit/
ProxyPass /tigit http://127.0.0.1:7080/tigit
ProxyPassReverse /tigit http://127.0.0.1:7080/tigit
If someone could give me some advice on what I can do to find out what does not work. It would be very appreciated.
Thanks,
Louis M