diff options
author | Cody West <cwest@gitlab.com> | 2019-01-22 13:39:51 -0600 |
---|---|---|
committer | Cody West <cwest@gitlab.com> | 2019-01-22 13:39:51 -0600 |
commit | b9d248911e6ff7207c9bc8f33a28232896bd71d0 (patch) | |
tree | 6aa63319a07122d10dbb03d992d3d97f1b84dbf4 /doc | |
parent | b5ba6c38a66355321e76b1e48f750b1c81b8d484 (diff) | |
download | gitlab-ce-b9d248911e6ff7207c9bc8f33a28232896bd71d0.tar.gz |
Switch to Rails console script
For the stake of standardizing, I've switched the ssl debugging to use
the Rails console rather than a Ruby script file.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/user/project/integrations/slack.md | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/doc/user/project/integrations/slack.md b/doc/user/project/integrations/slack.md index c23d008c1bf..f0f5bcfa633 100644 --- a/doc/user/project/integrations/slack.md +++ b/doc/user/project/integrations/slack.md @@ -48,30 +48,25 @@ You may see an entry similar to the following in your Sidekiq log: This is probably a problem either with GitLab communicating with Slack, or GitLab communicating with itself. The former is less likely since Slack's security certificates should _hopefully_ always be trusted. We can establish which we're dealing with by using -the below test script. +the below rails console script. -```ruby -#!/opt/gitlab/embedded/bin/ruby -# the shebang should be changed if you're not using Omnibus GitLab -require 'openssl' -require 'net/http' +```sh +# start a rails console: +sudo gitlab-rails console production + +# or for source installs: +bundle exec rails console production +``` -puts "testing Slack" +```ruby +# run this in the Rails console # replace <SLACK URL> with your actual Slack URL -Net::HTTP.get(URI('https://<SLACK URL>')) +result = Net::HTTP.get(URI('https://<SLACK URL>'));0 -puts "testing GitLab" # replace <GITLAB URL> with your actual GitLab URL -Net::HTTP.get(URI('https://<GITLAB URL>')) +result = Net::HTTP.get(URI('https://<GITLAB URL>'));0 ``` -The important thing with this script is that it should use the same Ruby as GitLab. -There are many ways to run this script, and it will change depending on your install type. -On Omnibus GitLab installs, you can run save this script to `/root/ssl-test.rb`, -make the file exectuable with `chmod u+x /root/ssl-test.rb`, then run `/root/ssl-test.rb` -to execute the script. It should return only the "testing X" lines if it succeeds. -In the event of a failure, the exception should be displayed as well. - If it's an issue with GitLab not trusting HTTPS connections to itself, then you may simply need to [add your certificate to GitLab's trusted certificates](https://docs.gitlab.com/omnibus/settings/ssl.html#install-custom-public-certificates). |