These are chat archives for getredash/redash

26th
Oct 2015
anthony
@Sigma-anthony
Oct 26 2015 13:13
This message was deleted
@arikfr hi, so I finally have redash on docker connecting to postgres and redis
setup nginx to find redash upstream using the mesos dns
name
which might be where the problem is
so I can reach the supervisord page
on port 9001
where is the default port for the redash server?
and how can I set it?
also how could I narrow down whether the issue is in the nginx or the redash confs?
anthony
@Sigma-anthony
Oct 26 2015 14:01
so its a 500 error when I try to hit port 5001, but port 9001 show supervisor status
and port 80 show the nginx start up page
Josh Fyne
@jfyne
Oct 26 2015 14:02
when I was trying to get it up and running, I was getting 500s because my database was not initialised correctly. Could this be the case for you?
anthony
@Sigma-anthony
Oct 26 2015 14:44
yeap found that my redash tables are being created in the postgres database and not the redash database so I am loocking at the docker init
Josh Fyne
@jfyne
Oct 26 2015 14:46
whats in you .env file?
anthony
@Sigma-anthony
Oct 26 2015 14:48
export REDASH_CONNECTION_ADAPTER=pg
export REDASH_CONNECTION_STRING="dbname=redash"
export REDASH_STATIC_ASSETS_PATH="../rd_ui/app/"
export REDASH_LOG_LEVEL="INFO"
export REDASH_WORKERS_COUNT=6
export REDASH_REDIS_URL=redis://node-3345.provider.io:6379/1
export REDASH_DATABASE_URL="node-3346.provider.io://redash"
export REDASH_COOKIE_SECRET=veryverysecret
export REDASH_GOOGLE_APPS_DOMAIN=
tested postgres via psql and it seems my redash db is empty and all the tables docker init creates are in the postgres db. so I am checking my postgres dockerfiles to see what I did wrong @jfyne
anthony
@Sigma-anthony
Oct 26 2015 15:44
I am a little confused as to why docker init is creating the redash db in the postgres db and not the redash db
any idea what I am doing wrong?
anthony
@Sigma-anthony
Oct 26 2015 16:11
so I tried a fresh postgres image, added the docker init script and again I find the redash tables created in postgres and not redash. Any ideas what I need to do to fix that?
anthony
@Sigma-anthony
Oct 26 2015 16:25
are my tables supposed to be in the redash db or the postgres db?
Josh Fyne
@jfyne
Oct 26 2015 16:34
where is the docker image coming from?
Josh Fyne
@jfyne
Oct 26 2015 16:36
the redash image?
anthony
@Sigma-anthony
Oct 26 2015 16:36
I can connect to the postgres instance using pgadmin
but all the redash tables are created in the postgres db.
Josh Fyne
@jfyne
Oct 26 2015 16:37
ok, are you running redash in a docker container as well?
anthony
@Sigma-anthony
Oct 26 2015 16:37
yes, I am running on mesos and marathon
so I cant use compose
I have redash on one container, postgres in another and redis in another
Josh Fyne
@jfyne
Oct 26 2015 16:38
so, where did you get the redash image from? did you build it yourself?
anthony
@Sigma-anthony
Oct 26 2015 16:38
from everythingme on github
Josh Fyne
@jfyne
Oct 26 2015 16:39
can you try this
docker exec -i -t {id of the running container} bash
anthony
@Sigma-anthony
Oct 26 2015 16:40
i can exec into the container
Josh Fyne
@jfyne
Oct 26 2015 16:40
run env
and then see what REDASH_DATABASE_URL is
anthony
@Sigma-anthony
Oct 26 2015 16:41
REDASH_DATABASE_URL is actually not in the output
Josh Fyne
@jfyne
Oct 26 2015 16:42
also in /opt/redash/current you can run ./manage.py check_settings
to see what redash thinks it should be doing
so my DATABASE_CONFIG is
DATABASE_CONFIG = {'name': 'redash', 'host': 'postgres', 'threadlocals': True, 'user': 'postgres', 'password': None, 'port': None}
anthony
@Sigma-anthony
Oct 26 2015 16:43
hmm, I only have DATABASE_CONFIG = {'threadlocals': True, 'name': 'postgres'}
Josh Fyne
@jfyne
Oct 26 2015 16:44
hmm
so in /opt/redash/current do cat .env
see what is in there, its probably the default
anthony
@Sigma-anthony
Oct 26 2015 16:45
nope has the connection strings that I use in pgadmin and the redis client
Josh Fyne
@jfyne
Oct 26 2015 16:45
hmmm
anthony
@Sigma-anthony
Oct 26 2015 16:45
which work fine in the gui for pgadmin and the redis client and psql
Josh Fyne
@jfyne
Oct 26 2015 16:45
what database connection string do you have
anthony
@Sigma-anthony
Oct 26 2015 16:46
export REDASH_DATABASE_URL="node-33595.provider.io://redash"
I can test it with psql -U postgres -h node-33595.provider.io redash
Josh Fyne
@jfyne
Oct 26 2015 16:46
REDASH_DATABASE_URL=postgres://postgres@postgres/redash
try prefixing it with postgres://
redash might be parsing it incorrectly
anthony
@Sigma-anthony
Oct 26 2015 16:47
ok, I have to rebuild the image to add the change give me a few moments
Josh Fyne
@jfyne
Oct 26 2015 16:47
aye
anthony
@Sigma-anthony
Oct 26 2015 16:47
aye?
Josh Fyne
@jfyne
Oct 26 2015 16:47
haha sorry means yes in british
anthony
@Sigma-anthony
Oct 26 2015 16:47
ok :-)
regarding postgres though, should the redash tables be in the postgres database?
Josh Fyne
@jfyne
Oct 26 2015 16:51
i think mine are in redash
let me check
yeah so mine are in the redash database and public schema
anthony
@Sigma-anthony
Oct 26 2015 16:52
ok, for some reason mine are ending up in postgres database
Josh Fyne
@jfyne
Oct 26 2015 16:53
it has to be a configuration issue somewhere
or environment
anthony
@Sigma-anthony
Oct 26 2015 16:53
yea
anthony
@Sigma-anthony
Oct 26 2015 16:58
so it appears my changes not only did my changes not take, but the switched to something else entirely. Occurs to me I never actually checked where I am supposed to set the env
I am supposed to have it in my redash folder
redash/.env
Josh Fyne
@jfyne
Oct 26 2015 16:59
i believe so, thats where mine are
anthony
@Sigma-anthony
Oct 26 2015 16:59
will double check and rebuild
and for REDASH_DATABASE_URL=postgres://postgres@postgres/redash
no qoutes? REDASH_DATABASE_URL=postgres://postgres@node-33595.provider.io/redash
Josh Fyne
@jfyne
Oct 26 2015 17:00
so because my postgres container is linked to my redash container it sets /etc/hosts to point to the right place
yeah i didnt quote
anthony
@Sigma-anthony
Oct 26 2015 17:01
right, I am using mesos dns, so it should find ti
anthony
@Sigma-anthony
Oct 26 2015 17:19
so i still get DATABASE_CONFIG ={'threadlocals': True, 'name': 'postgres'}
but no psql errors in celery_error log
cat .env has my changes
and nginx is now a 502 bad gateway error
martin sarsale
@runa
Oct 26 2015 18:04
heyas @arikfr, long time no see :)
what would you say it's the best way to plot a weekly barchart? if I set X to the date of the first day in the week, I end up with a bar-gap-bar chart
anthony
@Sigma-anthony
Oct 26 2015 18:20
hi, so rebuilt the image, no connection errors in celery error log, but check_settings still shows DATABASE_CONFIG ={'threadlocals': True, 'name': 'postgres'}
where do i set user name passwords btw?
martin sarsale
@runa
Oct 26 2015 18:23
@Sigma-anthony I think credentials are per datasource
anthony
@Sigma-anthony
Oct 26 2015 18:28
I see, seems my issue is the docker init script for postgres creating the tables in postgres database and not redash database
Arik Fraimovich
@arikfr
Oct 26 2015 19:19
@runa have you set X axis to be "datetime" ? HighCharts is usually very intelligent about this. Can you send a screenshot of your x column data & how the chart looks like?
@eschultze I'm using CloudFlare too for demo.redash.io, but I think I used the most basic setup. Did you figure why rocket loader messed things up for you?
@Sigma-anthony I think it will be easier for you to stop using the .env file and use environment variables (assuming mesos support passing env variables to the service). Which image are you using? Did you build your own from master or the one in docker hub?
@Sigma-anthony if you used the one from docker hub, it doesn't even read the .env file. if you built your own, you will need to edit the supervisord config not to use bin/run so it won't read the .env file (as it will override the env variables).
well, clipular seems to be broken
martin sarsale
@runa
Oct 26 2015 19:59
redash_charts_2015-10-26T19_59_09.773.png
that's how it looks like. data is 5/3/2015, 5/10/2015, 5/17/2015, etc
Arik Fraimovich
@arikfr
Oct 26 2015 20:05
I see two bars adjacent at the beginning - what dates are they?
martin sarsale
@runa
Oct 26 2015 20:06
@arikfr ah. it's an outlier. I removed it and looks good now. this HC is pretty smart!
thanks
Arik Fraimovich
@arikfr
Oct 26 2015 20:06
:)
too bad I'm going to remove it at some point (it's not open source...)
martin sarsale
@runa
Oct 26 2015 20:07
@arikfr I know :)
Arik Fraimovich
@arikfr
Oct 26 2015 20:07
maybe I'll keep it as an option, for those who buy a license
(or don't care)
martin sarsale
@runa
Oct 26 2015 20:12
@arikfr tnx