Hi there.

Just upgraded from 3.0 to 4.0 beta.

Can’t connect: connection refused.

Looking at logs can only find errors on redash_celery-stderr—supervisor…log. Complains about missing columns queries.search_vector…

Any hints?

Thanks,
Duarte

So I can only connect to 127.0.0.1:5000 from the localhost.

I had configured v3 to allow connections from other machines by changing gunicorn -b 127.0.0.1:5000 to gunicorn -b 0.0.0.0:5000 in /etc/supervisor/conf.d/redash.conf.

This is not working anymore… any suggestions?

Thanks,
Duarte

Nevermind. I’ve rolled back to v3. Will look into it later on…

So I did a clean upgrade, and migrations ran fine.

I get an error 500 right at the start, with the following error:
ValueError: invalid literal for int() with base 10: ‘redash’

Does anyone have a clue to what’s going on?

Pasting the log below.

Thanks,
Duarte

api_error.log:
[2018-03-29 12:13:12,757][PID:17544][ERROR][redash] Exception on /favicon.ico [GET]
Traceback (most recent call last):
File “/usr/local/lib/python2.7/dist-packages/flask/app.py”, line 1988, in wsgi_app
response = self.full_dispatch_request()
File “/usr/local/lib/python2.7/dist-packages/flask/app.py”, line 1641, in full_dispatch_request
rv = self.handle_user_exception(e)
File “/usr/local/lib/python2.7/dist-packages/flask_restful/init.py”, line 271, in error_router
return original_handler(e)
File “/usr/local/lib/python2.7/dist-packages/flask/app.py”, line 1544, in handle_user_exception
reraise(exc_type, exc_value, tb)
File “/usr/local/lib/python2.7/dist-packages/flask/app.py”, line 1639, in full_dispatch_request
rv = self.dispatch_request()
File “/usr/local/lib/python2.7/dist-packages/flask/app.py”, line 1625, in dispatch_request
return self.view_functionsrule.endpoint
File “/usr/local/lib/python2.7/dist-packages/flask_login/utils.py”, line 226, in decorated_view
elif not current_user.is_authenticated:
File “/usr/local/lib/python2.7/dist-packages/werkzeug/local.py”, line 343, in getattr
return getattr(self._get_current_object(), name)
File “/usr/local/lib/python2.7/dist-packages/werkzeug/local.py”, line 302, in _get_current_object
return self.__local()
File “/usr/local/lib/python2.7/dist-packages/flask_login/utils.py”, line 26, in
current_user = LocalProxy(lambda: _get_user())
File “/usr/local/lib/python2.7/dist-packages/flask_login/utils.py”, line 302, in _get_user
current_app.login_manager._load_user()
File “/usr/local/lib/python2.7/dist-packages/flask_login/login_manager.py”, line 317, in _load_user
return self.reload_user()
File “/usr/local/lib/python2.7/dist-packages/flask_login/login_manager.py”, line 279, in reload_user
user = self.user_callback(user_id)
File “/opt/redash/redash.4.0.0-rc.1.b3791/redash/authentication/init.py”, line 40, in load_user
org = current_org._get_current_object()
File “/usr/local/lib/python2.7/dist-packages/werkzeug/local.py”, line 302, in _get_current_object
return self.__local()
File “/opt/redash/redash.4.0.0-rc.1.b3791/redash/authentication/org_resolving.py”, line 14, in _get_current_org
g.org = Organization.get_by_slug(slug)
File “/opt/redash/redash.4.0.0-rc.1.b3791/redash/models.py”, line 312, in get_by_slug
return cls.query.filter(cls.slug == slug).first()
File “/usr/local/lib/python2.7/dist-packages/flask_sqlalchemy/init.py”, line 500, in get
return type.query_class(mapper, session=self.sa.session())
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/scoping.py”, line 78, in call
return self.registry()
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/_collections.py”, line 990, in call
return self.registry.setdefault(key, self.createfunc())
File “/usr/local/lib/python2.7/dist-packages/flask_sqlalchemy/init.py”, line 771, in create_session
return SignallingSession(self, **options)
File “/usr/local/lib/python2.7/dist-packages/flask_sqlalchemy/init.py”, line 155, in init
bind = options.pop(‘bind’, None) or db.engine
File “/usr/local/lib/python2.7/dist-packages/flask_sqlalchemy/init.py”, line 893, in engine
return self.get_engine(self.get_app())
File “/usr/local/lib/python2.7/dist-packages/flask_sqlalchemy/init.py”, line 910, in get_engine
return connector.get_engine()
File “/usr/local/lib/python2.7/dist-packages/flask_sqlalchemy/init.py”, line 539, in get_engine
info = make_url(uri)
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/url.py”, line 194, in make_url
return _parse_rfc1738_args(name_or_url)
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/url.py”, line 240, in _parse_rfc1738_args
return URL(name, **components)
File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/url.py”, line 60, in init
self.port = int(port)
ValueError: invalid literal for int() with base 10: ‘redash’
[2018-03-29 12:13:12,758][PID:17544][INFO][metrics] method=GET path=/favicon.ico endpoint=redash_index status=500 content_type=? content_le
ngth=-1 duration=1.69 query_count=0 query_duration=0.00
[2018-03-29 12:13:43 +0000] [17524] [CRITICAL] WORKER TIMEOUT (pid:17548)
[2018-03-29 12:13:43 +0000] [17548] [INFO] Worker exiting (pid: 17548)
[2018-03-29 12:13:43 +0000] [17969] [INFO] Booting worker with pid: 17969
[2018-03-29 12:13:43,966][PID:17969][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
[2018-03-29 12:13:43,987][PID:17969][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt

So, this morning after reading the log with a fresh mind, I unsderstood what the error was about:

File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/url.py”, line 60, in init
self.port = int(port)
ValueError: invalid literal for int() with base 10: ‘redash’

So this means sqlalchemy is having trouble reading my database url, which worked fine before… it is mistaking port with user… so I edited .env and changed my url so it explicitly sets the port:

export REDASH_DATABASE_URL="postgresql://user:pwd@host_ip:5432/db_name

Restarted redash, and behold it works!

So it seems redash v4 is picky with the database url. Be ware.

Thanks.

1 Like

What was your connection string before?

Hi arik. It was the same just without the port. I just added “:5432”…