I have installed redash using the script currently at redash/setup/ubuntu/bootstrap.sh (d22f0d4) on Debian Jessie 8.6

Passed thru various problems with postgresql… but now halted at nginx config.
I’m familiar with Apache, but nginx config is simply black magic for me… and it fails…

Current content of /etc/nginx/sites-available/redash is the standard found at redash/setup/ubuntu/files/nginx_redash_site (90128b9)

upstream rd_servers {

server {

  server_tokens off;

  listen 80 default;

  access_log /var/log/nginx/rd.access.log;

  gzip on;
  gzip_types *;
  gzip_proxied any;

  location / {
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_pass       http://rd_servers;

But when I point to http://myurl I simply get an error 502 “bad gateway”. When commenting out the line proxy_pass, my url displays the standard nginx welcome page.

Any hint at which errors I might have done or files that need to be changed for Debian?

Make sure Redash’s web server is running on port 5000. Seems like it isn’t.

Thx Arik for the fast answer!
Correct, Nothing was running on port 5000
The script uses ubuntuwise
add_service "redash_supervisord"
while debianwise it is
service redash_supervisord start

service redash_supervisord _re_start
might not work as expected, so prefer to use
service redash_supervisord stop
service redash_supervisord start

Mmhhh… seems I still have some trouble with Celery et al.

root@xxxx log/nginx# supervisorctl stop all
root@xxxx log/nginx# supervisorctl status all
redash_celery                    FATAL     Exited too quickly (process log may have details)
redash_celery_scheduled          FATAL     Exited too quickly (process log may have details)
redash_server                    FATAL     Exited too quickly (process log may have details)
root@xxxx log/nginx# supervisorctl start all
redash_celery: ERROR (abnormal termination)
redash_server: ERROR (abnormal termination)
redash_celery_scheduled: ERROR (abnormal termination)
root@xxxx log/nginx#

Check the logs (/opt/redash/logs/{api_error.log,celery_error.log,supervisord.log}).

B-) the logs are not that clear, see some details at the end.

I have however isolated my source of problem: I have tried to configure mail parameters in .env as defined in http://docs.redash.io/en/latest/setup.html#mail-configuration … but this nukes something, as supervisord then uses just port 9001, and no 5000.
Keeping the .env without these values allows things to run fine, except that redash seems then unable to send mails.

Will try to reintroduce one line after the other to detect the failure point… all suggestions welcome (I would appreciate a working example though)

Extract of api_error.log

Not Working
[2016-09-27 10:19:37 +0000] [30642] [INFO] Starting gunicorn 19.4.5
[2016-09-27 10:19:37 +0000] [30642] [INFO] Listening at: (30642)
[2016-09-27 10:19:37 +0000] [30642] [INFO] Using worker: sync
[2016-09-27 10:19:37 +0000] [30650] [INFO] Booting worker with pid: 30650
[2016-09-27 10:19:37 +0000] [30650] [ERROR] Exception in worker process:
Traceback (most recent call last):
File “/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py”, line 515, in spawn_worker

File “/opt/redash/redash.0.11.1.b2095/redash/settings.py”, line 133, in
MAIL_USE_TLS = parse_boolean(os.environ.get(‘REDASH_MAIL_USE_TLS’, ‘false’))
File “/opt/redash/redash.0.11.1.b2095/redash/settings.py”, line 41, in parse_boolean
return json.loads(str.lower())
File “/usr/lib/python2.7/json/init.py”, line 338, in loads
return _default_decoder.decode(s)
File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python2.7/json/decoder.py”, line 384, in raw_decode
raise ValueError(“No JSON object could be decoded”)
ValueError: No JSON object could be decoded
Traceback (most recent call last):
File “/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py”, line 515, in spawn_worker
File “/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py”, line 122, in init_process

[2016-09-27 10:19:37 +0000] [30653] [INFO] Worker exiting (pid: 30653)
Traceback (most recent call last):
File “/usr/local/bin/gunicorn”, line 11, in
File “/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py”, line 74, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File “/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py”, line 192, in run
super(Application, self).run()
File “/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py”, line 72, in run
File “/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py”, line 206, in run
self.halt(reason=inst.reason, exit_status=inst.exit_status)
File “/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py”, line 302, in halt
File “/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py”, line 347, in stop
File “/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py”, line 219, in handle_chld
File “/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py”, line 464, in reap_workers
raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer ‘Worker failed to boot.’ 3>

[2016-09-27 10:30:39 +0000] [31494] [INFO] Starting gunicorn 19.4.5
[2016-09-27 10:30:39 +0000] [31494] [INFO] Listening at: (31494)
[2016-09-27 10:30:39 +0000] [31494] [INFO] Using worker: sync
[2016-09-27 10:30:39 +0000] [31517] [INFO] Booting worker with pid: 31517
[2016-09-27 10:30:39 +0000] [31518] [INFO] Booting worker with pid: 31518
[2016-09-27 10:30:39 +0000] [31520] [INFO] Booting worker with pid: 31520
[2016-09-27 10:30:39 +0000] [31526] [INFO] Booting worker with pid: 31526
[2016-09-27 10:31:22,191][PID:31518][INFO][metrics] method=GET path=/favicon.ico endpoint=redash.send_static status=200 content_type=image/vnd.microsoft.icon content_length=1150 duration=3.14 query_count=0 query_duration=0.00
[2016-09-27 10:31:22,191][PID:31518][INFO][metrics] method=GET path=/favicon.ico endpoint=redash.send_static status=500 content_type=? content_length=-1 duration=3.45 query_count=0 query_duration=0.00

Updating .env
It seems that some values do create a malfunction, even if empty!!

export REDASH_MAIL_SERVER="" # default: localhost
#export REDASH_MAIL_PORT="" # default: 25
#export REDASH_MAIL_USE_TLS="" # default: false
#export REDASH_MAIL_USE_SSL="" # default: false
export REDASH_MAIL_USERNAME="" # default: None
export REDASH_MAIL_PASSWORD="" # default: None
export REDASH_MAIL_DEFAULT_SENDER="yyy@xxx.fr" # Email address to send from

export REDASH_HOST="http://yyy.xxx.fr" # base address of your Re:dash instance, for example: "https://demo.redash.io"

But REDASH_MAIL_DEFAULT_SENDER seems to have no real effect, eg

# /opt/redash/current/manage.py check_settings|grep -i mail MAIL_DEFAULT_SENDER = None MAIL_MAX_EMAILS = None COMMON_CLIENT_CONFIG = {'allowScriptsInUserInput': False, 'dateFormat': 'DD/MM/YY', 'mailSettingsMissing': True, 'allowAllToEditQueries': True, 'logoUrl': '/images/redash_icon_small.png', 'dateTimeFormat': 'DD/MM/YY HH:mm'} MAIL_USERNAME = None MAIL_USE_SSL = False default_destinations = ['redash.destinations.email', 'redash.destinations.slack', 'redash.destinations.webhook', 'redash.destinations.hipchat'] enabled_destinations = ['redash.destinations.email', 'redash.destinations.slack', 'redash.destinations.webhook', 'redash.destinations.hipchat'] MAIL_SERVER = localhost DESTINATIONS = ['redash.destinations.email', 'redash.destinations.slack', 'redash.destinations.webhook', 'redash.destinations.hipchat'] MAIL_USE_TLS = False MAIL_PASSWORD = None MAIL_ASCII_ATTACHMENTS = False MAIL_PORT = 25

If I had to guess the problem is with the boolean flags (USE_SSL, USE_TLS). If you don’t give it a valid value (true/false) it will crash .

:grimacing: will test that.
Seems that the “default” is not!