Commit b9d24891 authored by Cody West's avatar Cody West

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.
parent b5ba6c38
......@@ -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).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment