These are chat archives for getredash/redash

2nd
Oct 2017
Ahmed Ablak
@ablak
Oct 02 2017 05:01
Hello,
I used this command to run redash docker-compose up -d however, I received 504 Gateway Time-out. Would you please help me to fix this error.
Arik Fraimovich
@arikfr
Oct 02 2017 05:36
@galgoogle if you used a recent image (the one with the setup wizard), then you won't have the metadata data source. thanks for pointing this out.
@debraaaj LDAP will be part of the v3 release.
@ablak which compose file did you use?
Ahmed Ablak
@ablak
Oct 02 2017 06:16
@arikfr Thank you for your answer I am using the old version and this is the logs

`worker: Warm shutdown (MainProcess)
redash_1 | [2017-10-02 06:00:04,466: WARNING/MainProcess] consumer: Connection to broker lost. Trying to re-establish the connection...
redash_1 | Traceback (most recent call last):
redash_1 | File "/usr/local/lib/python2.7/dist-packages/celery/worker/consumer.py", line 279, in start
redash_1 | blueprint.start(self)
redash_1 | File "/usr/local/lib/python2.7/dist-packages/celery/bootsteps.py", line 123, in start
redash_1 | step.start(parent)
redash_1 | File "/usr/local/lib/python2.7/dist-packages/celery/worker/consumer.py", line 838, in start
redash_1 | c.loop(*c.loop_args())
redash_1 | File "/usr/local/lib/python2.7/dist-packages/celery/worker/loops.py", line 76, in asynloop
redash_1 | next(loop)
redash_1 | File "/usr/local/lib/python2.7/dist-packages/kombu/async/hub.py", line 274, in create_loop
redash_1 | tick_callback()
redash_1 | File "/usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py", line 1005, in on_poll_start
redash_1 | cycle_poll_start()
redash_1 | File "/usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py", line 308, in on_poll_start
redash_1 | self._register_LISTEN(channel)
redash_1 | File "/usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py", line 298, in _register_LISTEN
redash_1 | self._register(channel, channel.subclient, 'LISTEN')
redash_1 | File "/usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py", line 274, in _register
redash_1 | client.connection.connect()
redash_1 | File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 442, in connect
redash_1 | raise ConnectionError(self._error_message(e))
redash_1 | ConnectionError: Error 111 connecting to redis:6379. Connection refused.

File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1168, in exec_
redash_1 | self._do_exec()
redash_1 | File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1352, in _do_exec
redash_1 | mapper=self.mapper)
redash_1 | File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1107, in execute
redash_1 | bind, close_with_result=True).execute(clause, params or {})
redash_1 | File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 945, in execute
redash_1 | return meth(self, multiparams, params)
redash_1 | File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 263, in _execute_on_connection
redash_1 | return connection._execute_clauseelement(self, multiparams, params)
redash_1 | File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1053, in _execute_clauseelement
redash_1 | compiled_sql, distilled_params
redash_1 | File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context
redash_1 | context)
redash_1 | File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1393, in _handle_dbapi_exception
redash_1 | exc_info
redash_1 | File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
redash_1 | reraise(type(exception), exception, tb=exc_tb, cause=cause)
redash_1 | File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
redash_1 | context)
redash_1 | File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 469, in do_execute
redash_1 | cursor.execute(statement, parameters)
redash_1 | IntegrityError: (psycopg2.IntegrityError) update or delete on table "queries" violates foreign key constraint "visualizations_query_id_fkey" on table "visualizations"
redash_1 | DETAIL: `

@arikfr This is the compose file I am using:
Ahmed Ablak
@ablak
Oct 02 2017 06:21

`redash:
image: redash-oracle
ports:

- "XXX.XX.XXX.XX:5000:5000"

links:

- redis
- postgres

environment:
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://XXX@XXXXX/XXXX"
REDASH_COOKIE_SECRET: "XXXXXXXX"
REDASH_ADDITIONAL_QUERY_RUNNERS: 'redash.query_runner.oracle'
LD_LIBRARY_PATH: '/opt/oracle'
ORACLE_HOME: '/opt/oracle'
redis:
image: redis:2.8
postgres:
image: postgres:9.3
volumes:

- /opt/postgres-data:/var/lib/postgresql/data

redash-nginx:
image: redash/nginx:latest
ports:

- "XXX.XX.XXX.XX:80:80"

links:

- redash`
galgoogle
@galgoogle
Oct 02 2017 07:06
@arikfr we use SSL on Redshift, and the connection will stop working on October 23rd, unless we update the certificates. How can we do it on the Redash server?
image.png
Arik Fraimovich
@arikfr
Oct 02 2017 07:08
@ablak I think your problem is that you bind redash to port 5000 on the public IP (I assume that's the XXX.XX... part is). Do a regular port mapping.
@galgoogle I'm not 100% sure yet. What they describe at the bottom of the help page re. libpq should work, but I still need to make sure.
Ahmed Ablak
@ablak
Oct 02 2017 07:09
Sorry for my question, but how a regular port mapping can be done :D
@arikfr Sorry for my question, but how a regular port mapping can be done :D
Arik Fraimovich
@arikfr
Oct 02 2017 07:30
    ports:
      - "5000:5000"
Ahmed Ablak
@ablak
Oct 02 2017 09:48
@arikfr Thank you for your answer.
Ahmed Ablak
@ablak
Oct 02 2017 11:44
@arikfr hi, how are you?
@arikfr Could you please tell me how to get all data in queries table? I am trying to write this command but it is not working properly
docker-compose exec postgres psql -U postgres -c "Select * from queries" > backup.json
galgoogle
@galgoogle
Oct 02 2017 12:50
Thanks @arikfr, will wait for an update.
Arik Fraimovich
@arikfr
Oct 02 2017 13:07
@ablak what are you getting?
@galgoogle I opened an issue for this a few days ago. you can subscribe for its notifications
Ahmed Ablak
@ablak
Oct 02 2017 13:21
@arikfr I am getting only the first 20 to 25 lines of unorganized data and I need to press enter dozen of times because it shows only 20 to 25 lines per enter
Arik Fraimovich
@arikfr
Oct 02 2017 13:22
psql has the option to output data to a file, maybe use those
Ahmed Ablak
@ablak
Oct 02 2017 13:22
@arikfr I tried it dozen of times did not work for me as following
docker-compose exec postgres psql -U postgres
Then it opens

postgres

psql output data on the same container not to my local machine
Could you please provide me with a command to copy to output file
some thing like ::: docker-compose exec postgres psql ..........
Ahmed Ablak
@ablak
Oct 02 2017 13:56
@arikfr
Arik Fraimovich
@arikfr
Oct 02 2017 14:05
You can either connect from a local psql (by sharing the postgres port) or mount a volume to save the results to.
Ahmed Ablak
@ablak
Oct 02 2017 14:11
@arikfr Would you please guide to the step to connect from a local psql. What commands shall I write ?