Skip to content

Commit da251c6

Browse files
committed
Merge branch 'docs-slack-troubleshooting' into 'master'
Add troubleshooting section to Slack Notification Service See merge request gitlab-org/gitlab-ce!24339
2 parents 52ceda4 + b9d2489 commit da251c6

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

doc/user/project/integrations/slack.md

+51-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,54 @@ The Slack Notifications Service allows your GitLab project to send events (e.g.
2323

2424
Your Slack team will now start receiving GitLab event notifications as configured.
2525

26-
![Slack configuration](img/slack_configuration.png)
26+
![Slack configuration](img/slack_configuration.png)
27+
28+
## Troubleshooting
29+
30+
If you're having trouble with the Slack integration not working, then start by
31+
searching through the [Sidekiq logs](/doc/administration/logs.md#sidekiqlog)
32+
for errors relating to your Slack service.
33+
34+
### Something went wrong on our end
35+
36+
This is a generic error shown in the GitLab UI and doesn't mean much by itself.
37+
You'll need to look in [the logs](/doc/administration/logs.md#productionlog) to find
38+
an error message and keep troubleshooting from there.
39+
40+
### `certificate verify failed`
41+
42+
You may see an entry similar to the following in your Sidekiq log:
43+
44+
```text
45+
2019-01-10_13:22:08.42572 2019-01-10T13:22:08.425Z 6877 TID-abcdefg ProjectServiceWorker JID-3bade5fb3dd47a85db6d78c5 ERROR: {:class=>"ProjectServiceWorker", :service_class=>"SlackService", :message=>"SSL_connect returned=1 errno=0 state=error: certificate verify failed"}
46+
```
47+
48+
This is probably a problem either with GitLab communicating with Slack, or GitLab
49+
communicating with itself. The former is less likely since Slack's security certificates
50+
should _hopefully_ always be trusted. We can establish which we're dealing with by using
51+
the below rails console script.
52+
53+
```sh
54+
# start a rails console:
55+
sudo gitlab-rails console production
56+
57+
# or for source installs:
58+
bundle exec rails console production
59+
```
60+
61+
```ruby
62+
# run this in the Rails console
63+
# replace <SLACK URL> with your actual Slack URL
64+
result = Net::HTTP.get(URI('https://<SLACK URL>'));0
65+
66+
# replace <GITLAB URL> with your actual GitLab URL
67+
result = Net::HTTP.get(URI('https://<GITLAB URL>'));0
68+
```
69+
70+
If it's an issue with GitLab not trusting HTTPS connections to itself, then you may simply
71+
need to [add your certificate to GitLab's trusted certificates](https://docs.gitlab.com/omnibus/settings/ssl.html#install-custom-public-certificates).
72+
73+
If it's an issue with GitLab not trusting connections to Slack, then the GitLab
74+
OpenSSL trust store probably got messed up somehow. Typically this is from overriding
75+
the trust store with `gitlab_rails['env'] = {"SSL_CERT_FILE" => "/path/to/file.pem"}`
76+
or by accidentally modifying the default CA bundle `/opt/gitlab/embedded/ssl/certs/cacert.pem`.

0 commit comments

Comments
 (0)