Yet another upgrade thread - I apologize…
Trying to upgrade my 0.12 instance on ubuntu. I wouldn’t mind going to 1.0.x first but couldn’t figure out a way to.
Anyway, I’m getting a connection to pgsql error running migrations.
My .env has this config:
REDASH_DATABASE_URL=“postgresql:///redash:pwd@192.168.8.10/redash012rc”
I have a named database (redash012rc), and user:pwd.
I can connect to the database from a remote client so I’m guessing db connectivity is ok.
Any clues? Putting the error bellow.
Thanks,
Duarte
Error:
arcims@vboxredash:~$ sudo ./redash_upgrade_10.py
Starting Redash upgrade:
Found version: 2.0.0
Current version: 0.12.0+b2093
- Before doing an upgrade, please make sure you have a backup.
- If you have any issues, please refer to the troubleshooting section in the upgrade guide:
https://redash.io/help-onpremise/maintenance/how-to-upgrade-redash.html - If the upgrade guide doesn’t help, you can ask for help on the forum (http://discuss.redash.io).
Full CHANGELOG for this release: https://github.com/getredash/redash/blob/master/CHANGELOG.md#v200---2017-08-08
Continue with upgrade? (y/n): y
Downloading release tarball…
Unpacking to: redash.2.0.0.b2990…
Changing ownership to redash…
Linking .env file…
Installing new Python packages (if needed)…
Running migrations (if needed)…
Failed running: sudo -u redash bin/run ./manage.py db upgrade
Exit status: 1
Output:
Traceback (most recent call last):
File “/opt/redash/redash.2.0.0.b2990/manage.py”, line 9, in
manager()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/flask/cli.py”, line 345, in main
return AppGroup.main(self, *args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/flask/cli.py”, line 229, in decorator
return __ctx.invoke(f, *args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/flask_migrate/cli.py”, line 132, in upgrade
_upgrade(directory, revision, sql, tag, x_arg)
File “/usr/local/lib/python2.7/dist-packages/flask_migrate/init.py”, line 239, in upgrade
command.upgrade(config, revision, sql=sql, tag=tag)
File “/usr/local/lib/python2.7/dist-packages/alembic/command.py”, line 254, in upgrade
script.run_env()
File “/usr/local/lib/python2.7/dist-packages/alembic/script/base.py”, line 425, in run_env
util.load_python_file(self.dir, ‘env.py’)
File “/usr/local/lib/python2.7/dist-packages/alembic/util/pyfiles.py”, line 81, in load_python_file
module = load_module_py(module_id, path)
File “/usr/local/lib/python2.7/dist-packages/alembic/util/compat.py”, line 141, in load_module_py
mod = imp.load_source(module_id, path, fp)
File “migrations/env.py”, line 87, in
run_migrations_online()
File “migrations/env.py”, line 72, in run_migrations_online
connection = engine.connect()
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py”, line 2082, in connect
return self._connection_cls(self, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py”, line 90, in init
if connection is not None else engine.raw_connection()
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py”, line 2168, in raw_connection
self.pool.unique_connection, _connection)
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py”, line 2142, in _wrap_pool_connect
e, dialect, self)
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py”, line 1456, in _handle_dbapi_exception_noconnection
exc_info
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py”, line 202, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py”, line 2138, in _wrap_pool_connect
return fn()
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py”, line 328, in unique_connection
return _ConnectionFairy._checkout(self)
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py”, line 766, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py”, line 516, in checkout
rec = pool._do_get()
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py”, line 1229, in _do_get
return self._create_connection()
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py”, line 333, in _create_connection
return _ConnectionRecord(self)
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py”, line 461, in init
self.__connect(first_connect_check=True)
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py”, line 651, in __connect
connection = pool._invoke_creator(self)
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py”, line 105, in connect
return dialect.connect(*cargs, **cparams)
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py”, line 392, in connect
return self.dbapi.connect(*cargs, **cparams)
File “/usr/local/lib/python2.7/dist-packages/psycopg2/init.py”, line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432”?