summaryrefslogtreecommitdiff
path: root/doc/administration/troubleshooting/debug.md
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-20 09:09:22 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-20 09:09:22 +0000
commit196ada0844fff7642463fbd08a44609a1e1fa713 (patch)
tree7160cacde0b36d73a35e84d685824dd8633dfc0a /doc/administration/troubleshooting/debug.md
parente380e59ef5d1aa03922df49626c302da5eb30699 (diff)
downloadgitlab-ce-196ada0844fff7642463fbd08a44609a1e1fa713.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/administration/troubleshooting/debug.md')
-rw-r--r--doc/administration/troubleshooting/debug.md43
1 files changed, 24 insertions, 19 deletions
diff --git a/doc/administration/troubleshooting/debug.md b/doc/administration/troubleshooting/debug.md
index c1f2a5c92a3..34d42b8b5b8 100644
--- a/doc/administration/troubleshooting/debug.md
+++ b/doc/administration/troubleshooting/debug.md
@@ -3,22 +3,32 @@
Sometimes things don't work the way they should. Here are some tips on debugging issues out
in production.
-## Mail not working
+## Starting a Rails console
-A common problem is that mails are not being sent for some reason. Suppose you configured
-an SMTP server, but you're not seeing mail delivered. Here's how to check the settings:
+Troubleshooting and debugging often requires a rails console.
-1. Run a Rails console:
+**For Omnibus installations**
- ```shell
- sudo gitlab-rails console -e production
- ```
+```shell
+sudo gitlab-rails console
+```
- or for source installs:
+---
- ```shell
- bundle exec rails console -e production
- ```
+**For installations from source**
+
+```shell
+bundle exec rails console production
+```
+
+Kubernetes: the console is in the task-runner pod, refer to our [Kubernetes cheat sheet](kubernetes_cheat_sheet.md#gitlab-specific-kubernetes-information) for details.
+
+## Mail not working
+
+A common problem is that mails are not being sent for some reason. Suppose you configured
+an SMTP server, but you're not seeing mail delivered. Here's how to check the settings:
+
+1. Run a [Rails console.](#starting-a-rails-console)
1. Look at the ActionMailer `delivery_method` to make sure it matches what you
intended. If you configured SMTP, it should say `:smtp`. If you're using
@@ -160,22 +170,17 @@ separate Rails process to debug the issue:
1. Log in to your GitLab account.
1. Copy the URL that is causing problems (e.g. `https://gitlab.com/ABC`).
1. Create a Personal Access Token for your user (Profile Settings -> Access Tokens).
-1. Bring up the GitLab Rails console. For omnibus users, run:
-
- ```shell
- sudo gitlab-rails console
- ```
-
+1. Bring up the [GitLab Rails console.](#starting-a-rails-console)
1. At the Rails console, run:
```ruby
- [1] pry(main)> app.get '<URL FROM STEP 2>/?private_token=<TOKEN FROM STEP 3>'
+ app.get '<URL FROM STEP 2>/?private_token=<TOKEN FROM STEP 3>'
```
For example:
```ruby
- [1] pry(main)> app.get 'https://gitlab.com/gitlab-org/gitlab-foss/issues/1?private_token=123456'
+ app.get 'https://gitlab.com/gitlab-org/gitlab-foss/issues/1?private_token=123456'
```
1. In a new window, run `top`. It should show this ruby process using 100% CPU. Write down the PID.