I’m having problems running the docker-compose self-hosted solution. The worker component seems not be able to access the Postgres database. However, running docker-compose -f docker-compose.yml run server create_db seems to work without error.

I get this error: worker_1 | [2017-02-08 05:53:49,111: ERROR/Beat] Removing corrupted schedule file 'celerybeat-schedule': DBAccessError(13, 'Permission denied')

This appears in the docker-compose output for the command docker-compose -f docker-compose.yml up:

redash_redis_1 is up-to-date
redash_postgres_1 is up-to-date
Creating redash_server_1
Creating redash_worker_1
Attaching to redash_redis_1, redash_postgres_1, redash_server_1, redash_worker_1
redis_1     | [1] 08 Feb 05:53:34.536 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1     |                 _._                                                  
redis_1     |            _.-``__ ''-._                                             
redis_1     |       _.-``    `.  `_.  ''-._           Redis 2.8.23 (00000000/0) 64 bit
redis_1     |   .-`` .-```.  ```\/    _.,_ ''-._                                   
redis_1     |  (    '      ,       .-`  | `,    )     Running in stand alone mode
redis_1     |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
redis_1     |  |    `-._   `._    /     _.-'    |     PID: 1
redis_1     |   `-._    `-._  `-./  _.-'    _.-'                                   
redis_1     |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
redis_1     |  |    `-._`-._        _.-'_.-'    |           http://redis.io        
redis_1     |   `-._    `-._`-.__.-'_.-'    _.-'                                   
redis_1     |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
redis_1     |  |    `-._`-._        _.-'_.-'    |                                  
redis_1     |   `-._    `-._`-.__.-'_.-'    _.-'                                   
redis_1     |       `-._    `-.__.-'    _.-'                                       
redis_1     |           `-._        _.-'                                           
redis_1     |               `-.__.-'                                               
redis_1     | 
redis_1     | [1] 08 Feb 05:53:34.549 # Server started, Redis version 2.8.23
redis_1     | [1] 08 Feb 05:53:34.549 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1     | [1] 08 Feb 05:53:34.549 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis_1     | [1] 08 Feb 05:53:34.549 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1     | [1] 08 Feb 05:53:34.549 * The server is now ready to accept connections on port 6379
postgres_1  | The files belonging to this database system will be owned by user "postgres".
postgres_1  | This user must also own the server process.
postgres_1  | 
postgres_1  | The database cluster will be initialized with locale "en_US.utf8".
postgres_1  | The default database encoding has accordingly been set to "UTF8".
postgres_1  | The default text search configuration will be set to "english".
postgres_1  | 
postgres_1  | Data page checksums are disabled.
postgres_1  | 
postgres_1  | fixing permissions on existing directory /var/lib/postgresql/data ... ok
postgres_1  | creating subdirectories ... ok
postgres_1  | selecting default max_connections ... 100
postgres_1  | selecting default shared_buffers ... 128MB
postgres_1  | creating configuration files ... ok
postgres_1  | creating template1 database in /var/lib/postgresql/data/base/1 ... ok
postgres_1  | initializing pg_authid ... ok
postgres_1  | initializing dependencies ... ok
postgres_1  | creating system views ... ok
postgres_1  | loading system objects' descriptions ... ok
postgres_1  | creating collations ... ok
postgres_1  | creating conversions ... ok
postgres_1  | creating dictionaries ... ok
postgres_1  | setting privileges on built-in objects ... ok
postgres_1  | creating information schema ... ok
postgres_1  | loading PL/pgSQL server-side language ... ok
postgres_1  | vacuuming database template1 ... ok
postgres_1  | copying template1 to template0 ... ok
postgres_1  | copying template1 to postgres ... ok
postgres_1  | 
postgres_1  | WARNING: enabling "trust" authentication for local connections
postgres_1  | You can change this by editing pg_hba.conf or using the option -A, or
postgres_1  | --auth-local and --auth-host, the next time you run initdb.
postgres_1  | ****************************************************
postgres_1  | WARNING: No password has been set for the database.
postgres_1  |          This will allow anyone with access to the
postgres_1  |          Postgres port to access your database. In
postgres_1  |          Docker's default configuration, this is
postgres_1  |          effectively any other container on the same
postgres_1  |          system.
postgres_1  | 
postgres_1  |          Use "-e POSTGRES_PASSWORD=password" to set
postgres_1  |          it in "docker run".
postgres_1  | ****************************************************
postgres_1  | syncing data to disk ... ok
postgres_1  | 
postgres_1  | Success. You can now start the database server using:
postgres_1  | 
postgres_1  |     postgres -D /var/lib/postgresql/data
postgres_1  | or
postgres_1  |     pg_ctl -D /var/lib/postgresql/data -l logfile start
postgres_1  | 
postgres_1  | waiting for server to start....LOG:  database system was shut down at 2017-02-08 05:53:36 UTC
postgres_1  | LOG:  MultiXact member wraparound protections are now enabled
postgres_1  | LOG:  database system is ready to accept connections
postgres_1  | LOG:  autovacuum launcher started
postgres_1  |  done
postgres_1  | server started
postgres_1  | ALTER ROLE
postgres_1  | 
postgres_1  | 
postgres_1  | /docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
postgres_1  | 
postgres_1  | LOG:  received fast shutdown request
postgres_1  | LOG:  aborting any active transactions
postgres_1  | LOG:  autovacuum launcher shutting down
postgres_1  | LOG:  shutting down
postgres_1  | waiting for server to shut down....LOG:  database system is shut down
postgres_1  |  done
postgres_1  | server stopped
postgres_1  | 
postgres_1  | PostgreSQL init process complete; ready for start up.
postgres_1  | 
postgres_1  | LOG:  database system was shut down at 2017-02-08 05:53:37 UTC
postgres_1  | LOG:  MultiXact member wraparound protections are now enabled
postgres_1  | LOG:  database system is ready to accept connections
postgres_1  | LOG:  autovacuum launcher started
worker_1    | Starting scheduler and 2 workers for queues: queries,scheduled_queries,celery...
worker_1    | [2017-02-08 05:53:46,515][PID:5][WARNING][redash.query_runner] BigQueryGCE query runner enabled but not supported, not registering. Either disable or install missing dependencies.
worker_1    | [2017-02-08 05:53:48,684: WARNING/MainProcess] /usr/local/lib/python2.7/dist-packages/celery/apps/worker.py:161: CDeprecationWarning: 
worker_1    | Starting from version 3.2 Celery will refuse to accept pickle by default.
worker_1    | 
worker_1    | The pickle serializer is a security concern as it may give attackers
worker_1    | the ability to execute any command.  It's important to secure
worker_1    | your broker from unauthorized access when using pickle, so we think
worker_1    | that enabling pickle should require a deliberate action and not be
worker_1    | the default choice.
worker_1    | 
worker_1    | If you depend on pickle then you should set a setting to disable this
worker_1    | warning and to be sure that everything will continue working
worker_1    | when you upgrade to Celery 3.2::
worker_1    | 
worker_1    |     CELERY_ACCEPT_CONTENT = ['pickle', 'json', 'msgpack', 'yaml']
worker_1    | 
worker_1    | You must only enable the serializers that you will actually use.
worker_1    | 
worker_1    | 
worker_1    |   warnings.warn(CDeprecationWarning(W_PICKLE_DEPRECATED))
worker_1    |  
worker_1    |  -------------- celery@f7158f86b438 v3.1.23 (Cipater)
worker_1    | ---- **** ----- 
worker_1    | --- * ***  * -- Linux-4.4.43-boot2docker-x86_64-with-Ubuntu-16.04-xenial
worker_1    | -- * - **** --- 
worker_1    | - ** ---------- [config]
worker_1    | - ** ---------- .> app:         redash:0x7f466e41f850
worker_1    | - ** ---------- .> transport:   redis://redis:6379/0
worker_1    | - ** ---------- .> results:     redis://redis:6379/0
worker_1    | - *** --- * --- .> concurrency: 2 (prefork)
worker_1    | -- ******* ---- 
worker_1    | --- ***** ----- [queues]
worker_1    |  -------------- .> celery           exchange=celery(direct) key=celery
worker_1    |                 .> queries          exchange=queries(direct) key=queries
worker_1    |                 .> scheduled_queries exchange=scheduled_queries(direct) key=scheduled_queries
worker_1    | 
worker_1    | [tasks]
worker_1    |   . redash.tasks.check_alerts_for_query
worker_1    |   . redash.tasks.cleanup_query_results
worker_1    |   . redash.tasks.cleanup_tasks
worker_1    |   . redash.tasks.execute_query
worker_1    |   . redash.tasks.record_event
worker_1    |   . redash.tasks.refresh_queries
worker_1    |   . redash.tasks.refresh_schemas
worker_1    |   . redash.tasks.send_mail
worker_1    |   . redash.tasks.subscribe
worker_1    |   . redash.tasks.version_check
worker_1    | 
worker_1    | [2017-02-08 05:53:49,047: INFO/Beat] beat: Starting...
worker_1    | [2017-02-08 05:53:49,111: ERROR/Beat] Removing corrupted schedule file 'celerybeat-schedule': DBAccessError(13, 'Permission denied')
worker_1    | Traceback (most recent call last):
worker_1    |   File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 376, in setup_schedule
worker_1    |     self._store = self._open_schedule()
worker_1    |   File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 366, in _open_schedule
worker_1    |     return self.persistence.open(self.schedule_filename, writeback=True)
worker_1    |   File "/usr/lib/python2.7/shelve.py", line 243, in open
worker_1    |     return DbfilenameShelf(filename, flag, protocol, writeback)
worker_1    |   File "/usr/lib/python2.7/shelve.py", line 227, in __init__
worker_1    |     Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
worker_1    |   File "/usr/lib/python2.7/anydbm.py", line 85, in open
worker_1    |     return mod.open(file, flag, mode)
worker_1    |   File "/usr/lib/python2.7/dbhash.py", line 18, in open
worker_1    |     return bsddb.hashopen(file, flag, mode)
worker_1    |   File "/usr/lib/python2.7/bsddb/__init__.py", line 364, in hashopen
worker_1    |     d.open(file, db.DB_HASH, flags, mode)
worker_1    | DBAccessError: (13, 'Permission denied')
worker_1    | [2017-02-08 05:53:49,127: INFO/MainProcess] Connected to redis://redis:6379/0
worker_1    | [2017-02-08 05:53:49,152: INFO/MainProcess] mingle: searching for neighbors
server_1    | [2017-02-08 05:53:46,291][PID:5][WARNING][redash.query_runner] BigQueryGCE query runner enabled but not supported, not registering. Either disable or install missing dependencies.
server_1    | [2017-02-08 05:53:49,638][PID:5][INFO][werkzeug]  * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
worker_1    | [2017-02-08 05:53:49,188: ERROR/Beat] Process Beat
worker_1    | Traceback (most recent call last):
worker_1    |   File "/usr/local/lib/python2.7/dist-packages/billiard/process.py", line 292, in _bootstrap
worker_1    |     self.run()
worker_1    |   File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 553, in run
worker_1    |     self.service.start(embedded_process=True)
worker_1    |   File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 470, in start
worker_1    |     humanize_seconds(self.scheduler.max_interval))
worker_1    |   File "/usr/local/lib/python2.7/dist-packages/kombu/utils/__init__.py", line 325, in __get__
worker_1    |     value = obj.__dict__[self.__name__] = self.__get(obj)
worker_1    |   File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 512, in scheduler
worker_1    |     return self.get_scheduler()
worker_1    |   File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 507, in get_scheduler
worker_1    |     lazy=lazy)
worker_1    |   File "/usr/local/lib/python2.7/dist-packages/celery/utils/imports.py", line 53, in instantiate
worker_1    |     return symbol_by_name(name)(*args, **kwargs)
worker_1    |   File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 358, in __init__
worker_1    |     Scheduler.__init__(self, *args, **kwargs)
worker_1    |   File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 185, in __init__
worker_1    |     self.setup_schedule()
worker_1    |   File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 384, in setup_schedule
worker_1    |     self._store = self._destroy_open_corrupted_schedule(exc)
worker_1    |   File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 372, in _destroy_open_corrupted_schedule
worker_1    |     return self._open_schedule()
worker_1    |   File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 366, in _open_schedule
worker_1    |     return self.persistence.open(self.schedule_filename, writeback=True)
worker_1    |   File "/usr/lib/python2.7/shelve.py", line 243, in open
worker_1    |     return DbfilenameShelf(filename, flag, protocol, writeback)
worker_1    |   File "/usr/lib/python2.7/shelve.py", line 227, in __init__
worker_1    |     Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
worker_1    |   File "/usr/lib/python2.7/anydbm.py", line 85, in open
worker_1    |     return mod.open(file, flag, mode)
worker_1    |   File "/usr/lib/python2.7/dbhash.py", line 18, in open
worker_1    |     return bsddb.hashopen(file, flag, mode)
worker_1    |   File "/usr/lib/python2.7/bsddb/__init__.py", line 364, in hashopen
worker_1    |     d.open(file, db.DB_HASH, flags, mode)
worker_1    | DBAccessError: (13, 'Permission denied')
worker_1    | [2017-02-08 05:53:50,179: INFO/MainProcess] mingle: all alone
server_1    | [2017-02-08 05:53:49,703][PID:5][INFO][werkzeug]  * Restarting with stat
server_1    | [2017-02-08 05:53:51,470][PID:133][WARNING][redash.query_runner] BigQueryGCE query runner enabled but not supported, not registering. Either disable or install missing dependencies.
server_1    | [2017-02-08 05:53:52,806][PID:133][WARNING][werkzeug]  * Debugger is active!

Has anyone experienced something similar or have suggestions for further diagnosis?

It’s not an issue with the Postgres DB, but with a file Celery uses to manage scheduled tasks.

Did you run Redash in some otherway from this folder before?

Same problem here. Also using docker-compose, this is a clean clone from github. Only commands run are:
docker-compose -f docker-compose.yml run server create_db
docker-compose -f docker-compose.yml up

I will try a clean clone too and see if I can reproduce this.

Thanks for taking a look.
I’m still poking around with this (I’m new to docker too). I can get a redash entry page, however the username / password admin:admin don’t seem to work. I have been trying to find the /opt/redash/.env file. I see 4 docker containers running but /opt/redash doesn’t exist in any of them. Am I looking at the wrong install instructions?

$ docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
288b734e86f2        redash_server       "/app/bin/docker-e..."   48 minutes ago      Up 7 minutes        0.0.0.0:5000->5000/tcp   redash_server_1
2a6eece07973        postgres:9.3        "/docker-entrypoin..."   48 minutes ago      Up 7 minutes        5432/tcp                 redash_postgres_1
f4858c7c86db        redash_worker       "/app/bin/docker-e..."   48 minutes ago      Up 7 minutes        5000/tcp                 redash_worker_1
fdc25c577c24        redis:2.8           "docker-entrypoint..."   2 hours ago         Up 7 minutes        6379/tcp                 redash_redis_1

With the new v1.0.0 version and Docker setup you create the user when you first launch Redash, therefore admin/admin doesn’t work as it doesn’t exist yet. Didn’t it ask for you the username?

Also /opt/redash/.env doesn’t exist, as it’s not necessary. You pass configuration via the environment configuration in the Docker Compose file.

I’m also experiencing the same issue above. I would add that nginx also fails to start for me:

redash deployer$ docker ps -a
CONTAINER ID        IMAGE               COMMAND                       CREATED               STATUS                   PORTS                  NAMES
fa6e1385f01d        redash/nginx:latest "nginx -g 'daemon ..."        16 minutes ago        Exited (1) 5 seconds ago                        redash_nginx_1
d710f35cb674        redash_server       "/app/bin/docker-e..."        16 minutes ago        Up 6 seconds             0.0.0.0:5000->5000/tcp redash_server_1
edf5a95b36fb        redash_worker       "/app/bin/docker-e..."        16 minutes ago        Up 6 seconds             5000/tcp               redash_worker_1
048421ec6279        postgres:9.3        "/docker-entrypoin..."        16 minutes ago        Up 6 seconds             5432/tcp               redash_postgres_1
e42f94e213af        redis:2.8           "docker-entrypoint..."        16 minutes ago        Up 7 seconds             6379/tcp               redash_redis_1

When trying to sign up via port 5000 to create an admin account, I get the following error on submission:

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Here’s the log when I run docker-compose -f docker-compose.production.yml up: https://gist.github.com/stevanl/d003866be086be4780d7f88e1597fffc

It seems that nginx fails to start because Redash isn’t ready yet.

“Internal Server Error” - I don’t see anything in the log about this. Were there more output afterwards? Did you create the database tables?

Yes, followed the steps outlined here: https://redash.io/help-onpremise/setup/setting-up-redash-instance.html

Result when running step 4:

redash deployer$ docker-compose -f docker-compose.production.yml run --rm server create_db
Creating redash_postgres_1
Creating redash_redis_1
[2017-02-08 18:13:52,081][PID:5][WARNING][redash.query_runner] BigQueryGCE query runner enabled but not supported, not registering. Either disable or install missing dependencies.
[2017-02-08 18:13:53,482][PID:5][INFO][alembic.runtime.migration] Context impl PostgresqlImpl.
[2017-02-08 18:13:53,483][PID:5][INFO][alembic.runtime.migration] Will assume transactional DDL.
[2017-02-08 18:13:53,492][PID:5][INFO][alembic.runtime.migration] Running stamp_revision  -> 65fc9ede4746

Result from step 5 is pretty much the same as in the previous reply (I’ve deleted the containers and retried a few times).

Here’s the log when creating an admin and the successive “Internal Server Error”:

Log from the create admin account page load (on port 5000):

server_1    | [2017-02-08 18:20:13,076][PID:11][INFO][metrics] method=GET path=/ endpoint=redash.index status=302 content_type=text/html; charset=utf-8 content_length=305 duration=58.49 query_count=2 query_duration=8.06
server_1    | [2017-02-08 18:20:13,127][PID:17][INFO][metrics] method=GET path=/login endpoint=redash.login status=302 content_type=text/html; charset=utf-8 content_length=219 duration=30.00 query_count=1 query_duration=3.05
server_1    | [2017-02-08 18:20:13,216][PID:20][INFO][metrics] method=GET path=/setup endpoint=redash.setup status=200 content_type=text/html; charset=utf-8 content_length=3197 duration=67.24 query_count=2 query_duration=6.57
server_1    | [2017-02-08 18:20:13,453][PID:14][INFO][metrics] method=GET path=/fonts/roboto/Roboto-Medium-webfont.woff endpoint=redash.send_static status=404 content_type=text/html content_length=233 duration=2.50 query_count=0 query_duration=0.00
server_1    | [2017-02-08 18:20:13,457][PID:11][INFO][metrics] method=GET path=/fonts/roboto/Roboto-Regular-webfont.woff endpoint=redash.send_static status=404 content_type=text/html content_length=233 duration=4.01 query_count=0 query_duration=0.00
server_1    | [2017-02-08 18:20:13,640][PID:17][INFO][metrics] method=GET path=/fonts/roboto/Roboto-Medium-webfont.ttf endpoint=redash.send_static status=404 content_type=text/html content_length=233 duration=2.41 query_count=0 query_duration=0.00
server_1    | [2017-02-08 18:20:13,641][PID:20][INFO][metrics] method=GET path=/fonts/roboto/Roboto-Regular-webfont.ttf endpoint=redash.send_static status=404 content_type=text/html content_length=233 duration=1.66 query_count=0 query_duration=0.00

Log of the error returned when attempting to post on above form:

worker_1    | [2017-02-08 18:20:46,941: INFO/MainProcess] Received task: redash.tasks.record_event[2403dabe-4952-438f-b0bb-427cc89782e1]
server_1    | [2017-02-08 18:20:46,943][PID:20][INFO][metrics] method=POST path=/setup endpoint=redash.setup status=302 content_type=text/html; charset=utf-8 content_length=209 duration=124.86 query_count=10 query_duration=12.92
worker_1    | [2017-02-08 18:20:46,944: INFO/MainProcess] Received task: redash.tasks.subscribe[7f69aaed-e2ac-424e-b4ba-248dc18966ea]
worker_1    | [2017-02-08 18:20:46,948: INFO/Worker-3] redash.tasks.subscribe[7f69aaed-e2ac-424e-b4ba-248dc18966ea]: Subscribing to: [security notifications=True], [newsletter=True]
server_1    | [2017-02-08 18:20:47,002] ERROR in app: Exception on / [GET]
server_1    | Traceback (most recent call last):
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app
server_1    |     response = self.full_dispatch_request()
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1641, in full_dispatch_request
server_1    |     rv = self.handle_user_exception(e)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask_restful/__init__.py", line 271, in error_router
server_1    |     return original_handler(e)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1544, in handle_user_exception
server_1    |     reraise(exc_type, exc_value, tb)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in full_dispatch_request
server_1    |     rv = self.dispatch_request()
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in dispatch_request
server_1    |     return self.view_functions[rule.endpoint](**req.view_args)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask_login/utils.py", line 228, in decorated_view
server_1    |     return func(*args, **kwargs)
server_1    |   File "/app/redash/handlers/static.py", line 30, in index
server_1    |     return send_file(full_path, **dict(cache_timeout=0, conditional=True))
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask/helpers.py", line 536, in send_file
server_1    |     file = open(filename, 'rb')
server_1    | IOError: [Errno 2] No such file or directory: '/app/redash/../client/dist/index.html'
server_1    | [2017-02-08 18:20:47,002][PID:14][ERROR][redash] Exception on / [GET]
server_1    | Traceback (most recent call last):
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app
server_1    |     response = self.full_dispatch_request()
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1641, in full_dispatch_request
server_1    |     rv = self.handle_user_exception(e)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask_restful/__init__.py", line 271, in error_router
server_1    |     return original_handler(e)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1544, in handle_user_exception
server_1    |     reraise(exc_type, exc_value, tb)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in full_dispatch_request
server_1    |     rv = self.dispatch_request()
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in dispatch_request
server_1    |     return self.view_functions[rule.endpoint](**req.view_args)
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask_login/utils.py", line 228, in decorated_view
server_1    |     return func(*args, **kwargs)
server_1    |   File "/app/redash/handlers/static.py", line 30, in index
server_1    |     return send_file(full_path, **dict(cache_timeout=0, conditional=True))
server_1    |   File "/usr/local/lib/python2.7/dist-packages/flask/helpers.py", line 536, in send_file
server_1    |     file = open(filename, 'rb')
server_1    | IOError: [Errno 2] No such file or directory: '/app/redash/../client/dist/index.html'
server_1    | [2017-02-08 18:20:47,006][PID:14][INFO][metrics] method=GET path=/ endpoint=redash.index status=500 content_type=? content_length=-1 duration=35.36 query_count=2 query_duration=4.61
worker_1    | [2017-02-08 18:20:47,446: INFO/MainProcess] Task redash.tasks.record_event[2403dabe-4952-438f-b0bb-427cc89782e1] succeeded in 0.500917271001s: None
worker_1    | [2017-02-08 18:20:47,988: INFO/MainProcess] Task redash.tasks.subscribe[7f69aaed-e2ac-424e-b4ba-248dc18966ea] succeeded in 1.039947474s: None

Thank you for your continued help on this Arik.

nginx is also failing for me.
After logging in at port:5000 I’m also getting the 500 error. In the logs I see:

IOError: [Errno 2] No such file or directory: ‘/app/redash/…/client/dist/index.html’

I think this path should be

/app/redash/…client/app/index.html

No, it has the correct path. While I added Docker Compose config for production, the image is the same. And the dev image assumes you have the client built locally.

I will post a new Dockerfile for production usage that builds the frontend assets.

I will post here once I’m done.

OK, if you pull latest master it should all be good now. The fixes are in #1582 (permissions issue) and #1570 (nginx issue).

You probably will need to recreate your containers (docker-compose rm and then create or up), as network settings seem to persist between restarts.

Please update here if you still having any issues after pulling latest master.

Sorry for all the issues and thank you for your patience :slight_smile:

I’ve made a clean installation but still get the following error after login:

IOError: [Errno 2] No such file or directory: ‘/app/redash/…/client/dist/index.html’

client/dist really does’nt exist. Think it should be client/app

Please make sure that:

  • You pulled master again and have a recent Dockerfile.
  • That you rebuilt your Docker image after pulling updated version (you can verify by checking the timestamp when running docker images).

Hi @arikfr,

Thanks for the update, adding ‘redash’ to the compose file does allow nginx to launch! But I still got this issue:
server_1 | IOError: [Errno 2] No such file or directory: '/app/redash/../client/dist/index.html'

Background: I wiped the repo locally, cloned it, clobbered all the docker images and containers except the postgres and redis containers, ran the
docker-compose -f docker-compose.production.yml run --rm server create_db
and
docker-compose -f docker-compose.production.yml up
commands

I did the following to get me into the webapp, sorry that this is not the same as figuring out why…

Entered the running container
sudo docker exec -i -t redash_server_1 /bin/bash

There is no client/dist in the /app directory!

Not sure why not, I did see npm activity in the compose output. But I could do the following:

$ npm install $ npm build <-- died sliently $ NODE_ENV=production node node_modules/.bin/webpack

Then I gained the client/dist folder and the webserver allowed me past the initial admin sign-up screen.

Cheers and thanks,
Mike

It should be npm run build and not npm build… The strange thing is that it worked for me on a clean machine :open_mouth: Anyway fixed the Dockerfile.

I’m now testing this again on another machine, but should be good.

Ah yes… ‘run build’ I looked right past that.

Cheers!

Hi,
I just pulled the last image and still have a similar error message
like
index.html not found
but also another one
DBAccessError

thank you for your support

worker_1 | File “/usr/lib/python2.7/shelve.py”, line 227, in init
server_1 | File “/app/redash/handlers/static.py”, line 30, in index
worker_1 | Shelf.init(self, anydbm.open(filename, flag), protocol, writeback)
server_1 | return send_file(full_path, **dict(cache_timeout=0, conditional=True))
worker_1 | File “/usr/lib/python2.7/anydbm.py”, line 85, in open
server_1 | File “/usr/local/lib/python2.7/dist-packages/flask/helpers.py”, line 536, in send_file
worker_1 | return mod.open(file, flag, mode)
server_1 | file = open(filename, ‘rb’)
worker_1 | File “/usr/lib/python2.7/dbhash.py”, line 18, in open
server_1 | IOError: [Errno 2] No such file or directory: ‘/app/redash/…/client/dist/index.html’
worker_1 | return bsddb.hashopen(file, flag, mode)
server_1 | [2017-02-09 21:30:58,391][PID:20][INFO][metrics] method=GET path=/ endpoint=redash.index status=500 content_type=? content_length=-1 duration=26.83 query_count=2 query_duration=3.30
worker_1 | File “/usr/lib/python2.7/bsddb/init.py”, line 364, in hashopen
worker_1 | d.open(file, db.DB_HASH, flags, mode)
worker_1 | DBAccessError: (13, ‘Permission denied’)
worker_1 | [2017-02-09 21:30:03,103: ERROR/Beat] Process Beat

When did you pull? I pushed another fix for the missing client files 2 hours ago.

Also for users with Ubuntu as the host OS, I pushed another fix for the “permission denied” issue 15 minutes ago.

It now works!

Thanks!