I want to ask something about config.devServer.host


#1

in the webpack.config.js, i set config.devServer.host= ‘0.0.0.0’,but when i open the remote ip + port:8080,it occurs Invalid Host header; please tell me what happen? and what should i do?
and when i input curl 127.0.0.1:5000/login?next=http%3A%2F%2F127.0.0.1%3A5000%2F

it occurs error,i don’t know anyother about it

[2017-04-24 17:23:09,365] ERROR in app: Exception on /login [GET]
Traceback (most recent call last):
File “/usr/lib/python2.7/site-packages/flask/app.py”, line 1988, in wsgi_app
response = self.full_dispatch_request()
File “/usr/lib/python2.7/site-packages/flask/app.py”, line 1641, in full_dispatch_request
rv = self.handle_user_exception(e)
File “/usr/lib/python2.7/site-packages/flask_restful/init.py”, line 271, in error_router
return original_handler(e)
File “/usr/lib/python2.7/site-packages/flask/app.py”, line 1544, in handle_user_exception
reraise(exc_type, exc_value, tb)
File “/usr/lib/python2.7/site-packages/flask/app.py”, line 1639, in full_dispatch_request
rv = self.dispatch_request()
File “/usr/lib/python2.7/site-packages/flask/app.py”, line 1625, in dispatch_request
return self.view_functionsrule.endpoint
File “/usr/lib/python2.7/site-packages/flask_limiter/extension.py”, line 442, in __inner
return obj(*a, **k)
File “/root/redash/redash/handlers/authentication.py”, line 97, in login
if current_org == None and not settings.MULTI_ORG:
File “/usr/lib/python2.7/site-packages/werkzeug/local.py”, line 365, in
eq = lambda x, o: x._get_current_object() == o
File “/usr/lib/python2.7/site-packages/werkzeug/local.py”, line 302, in _get_current_object
return self.__local()
File “/root/redash/redash/authentication/org_resolving.py”, line 21, in _get_current_org
g.org = Organization.get_by_slug(slug)
File “/root/redash/redash/models.py”, line 249, in get_by_slug
return cls.query.filter(cls.slug == slug).first()
File “/usr/lib/python2.7/site-packages/sqlalchemy/orm/query.py”, line 2697, in first
ret = list(self[0:1])
File “/usr/lib/python2.7/site-packages/sqlalchemy/orm/query.py”, line 2489, in getitem
return list(res)
File “/usr/lib/python2.7/site-packages/sqlalchemy/orm/query.py”, line 2797, in iter
return self._execute_and_instances(context)
File “/usr/lib/python2.7/site-packages/sqlalchemy/orm/query.py”, line 2818, in _execute_and_instances
close_with_result=True)
File “/usr/lib/python2.7/site-packages/sqlalchemy/orm/query.py”, line 2827, in _get_bind_args
**kw
File “/usr/lib/python2.7/site-packages/sqlalchemy/orm/query.py”, line 2809, in _connection_from_session
conn = self.session.connection(**kw)
File “/usr/lib/python2.7/site-packages/sqlalchemy/orm/session.py”, line 966, in connection
execution_options=execution_options)
File “/usr/lib/python2.7/site-packages/sqlalchemy/orm/session.py”, line 971, in _connection_for_bind
engine, execution_options)
File “/usr/lib/python2.7/site-packages/sqlalchemy/orm/session.py”, line 403, in _connection_for_bind
conn = bind.contextual_connect()
File “/usr/lib/python2.7/site-packages/sqlalchemy/engine/base.py”, line 2103, in contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File “/usr/lib/python2.7/site-packages/sqlalchemy/engine/base.py”, line 2142, in _wrap_pool_connect
e, dialect, self)
File “/usr/lib/python2.7/site-packages/sqlalchemy/engine/base.py”, line 1456, in _handle_dbapi_exception_noconnection
exc_info
File “/usr/lib/python2.7/site-packages/sqlalchemy/util/compat.py”, line 202, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File “/usr/lib/python2.7/site-packages/sqlalchemy/engine/base.py”, line 2138, in _wrap_pool_connect
return fn()
File “/usr/lib/python2.7/site-packages/sqlalchemy/pool.py”, line 387, in connect
return _ConnectionFairy._checkout(self)
File “/usr/lib/python2.7/site-packages/sqlalchemy/pool.py”, line 766, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File “/usr/lib/python2.7/site-packages/sqlalchemy/pool.py”, line 516, in checkout
rec = pool._do_get()
File “/usr/lib/python2.7/site-packages/sqlalchemy/pool.py”, line 1138, in _do_get
self._dec_overflow()
File “/usr/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py”, line 60, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File “/usr/lib/python2.7/site-packages/sqlalchemy/pool.py”, line 1135, in _do_get
return self._create_connection()
File “/usr/lib/python2.7/site-packages/sqlalchemy/pool.py”, line 333, in _create_connection
return _ConnectionRecord(self)
File “/usr/lib/python2.7/site-packages/sqlalchemy/pool.py”, line 461, in init
self.__connect(first_connect_check=True)
File “/usr/lib/python2.7/site-packages/sqlalchemy/pool.py”, line 651, in __connect
connection = pool._invoke_creator(self)
File “/usr/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py”, line 105, in connect
return dialect.connect(*cargs, **cparams)
File “/usr/lib/python2.7/site-packages/sqlalchemy/engine/default.py”, line 392, in connect
return self.dbapi.connect(*cargs, **cparams)
File “/usr/lib64/python2.7/site-packages/psycopg2/init.py”, line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
OperationalError: (psycopg2.OperationalError) FATAL: no pg_hba.conf entry for host “[local]”, user “root”, database “postgres”, SSL off

[2017-04-24 17:23:09,365][PID:5011][ERROR][redash] Exception on /login [GET]
Traceback (most recent call last):
File “/usr/lib/python2.7/site-packages/flask/app.py”, line 1988, in wsgi_app
response = self.full_dispatch_request()
File “/usr/lib/python2.7/site-packages/flask/app.py”, line 1641, in full_dispatch_request
rv = self.handle_user_exception(e)
File “/usr/lib/python2.7/site-packages/flask_restful/init.py”, line 271, in error_router
return original_handler(e)
File “/usr/lib/python2.7/site-packages/flask/app.py”, line 1544, in handle_user_exception
reraise(exc_type, exc_value, tb)
File “/usr/lib/python2.7/site-packages/flask/app.py”, line 1639, in full_dispatch_request
rv = self.dispatch_request()
File “/usr/lib/python2.7/site-packages/flask/app.py”, line 1625, in dispatch_request
return self.view_functionsrule.endpoint
File “/usr/lib/python2.7/site-packages/flask_limiter/extension.py”, line 442, in __inner
return obj(*a, **k)
File “/root/redash/redash/handlers/authentication.py”, line 97, in login
if current_org == None and not settings.MULTI_ORG:
File “/usr/lib/python2.7/site-packages/werkzeug/local.py”, line 365, in
eq = lambda x, o: x._get_current_object() == o
File “/usr/lib/python2.7/site-packages/werkzeug/local.py”, line 302, in _get_current_object
return self.__local()
File “/root/redash/redash/authentication/org_resolving.py”, line 21, in _get_current_org
g.org = Organization.get_by_slug(slug)
File “/root/redash/redash/models.py”, line 249, in get_by_slug
return cls.query.filter(cls.slug == slug).first()
File “/usr/lib/python2.7/site-packages/sqlalchemy/orm/query.py”, line 2697, in first
ret = list(self[0:1])
File “/usr/lib/python2.7/site-packages/sqlalchemy/orm/query.py”, line 2489, in getitem
return list(res)
File “/usr/lib/python2.7/site-packages/sqlalchemy/orm/query.py”, line 2797, in iter
return self._execute_and_instances(context)
File “/usr/lib/python2.7/site-packages/sqlalchemy/orm/query.py”, line 2818, in _execute_and_instances
close_with_result=True)
File “/usr/lib/python2.7/site-packages/sqlalchemy/orm/query.py”, line 2827, in _get_bind_args
**kw
File “/usr/lib/python2.7/site-packages/sqlalchemy/orm/query.py”, line 2809, in _connection_from_session
conn = self.session.connection(**kw)
File “/usr/lib/python2.7/site-packages/sqlalchemy/orm/session.py”, line 966, in connection
execution_options=execution_options)
File “/usr/lib/python2.7/site-packages/sqlalchemy/orm/session.py”, line 971, in _connection_for_bind
engine, execution_options)
File “/usr/lib/python2.7/site-packages/sqlalchemy/orm/session.py”, line 403, in _connection_for_bind
conn = bind.contextual_connect()
File “/usr/lib/python2.7/site-packages/sqlalchemy/engine/base.py”, line 2103, in contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File “/usr/lib/python2.7/site-packages/sqlalchemy/engine/base.py”, line 2142, in _wrap_pool_connect
e, dialect, self)
File “/usr/lib/python2.7/site-packages/sqlalchemy/engine/base.py”, line 1456, in _handle_dbapi_exception_noconnection
exc_info
File “/usr/lib/python2.7/site-packages/sqlalchemy/util/compat.py”, line 202, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File “/usr/lib/python2.7/site-packages/sqlalchemy/engine/base.py”, line 2138, in _wrap_pool_connect
return fn()
File “/usr/lib/python2.7/site-packages/sqlalchemy/pool.py”, line 387, in connect
return _ConnectionFairy._checkout(self)
File “/usr/lib/python2.7/site-packages/sqlalchemy/pool.py”, line 766, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File “/usr/lib/python2.7/site-packages/sqlalchemy/pool.py”, line 516, in checkout
rec = pool._do_get()
File “/usr/lib/python2.7/site-packages/sqlalchemy/pool.py”, line 1138, in _do_get
self._dec_overflow()
File “/usr/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py”, line 60, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File “/usr/lib/python2.7/site-packages/sqlalchemy/pool.py”, line 1135, in _do_get
return self._create_connection()
File “/usr/lib/python2.7/site-packages/sqlalchemy/pool.py”, line 333, in _create_connection
return _ConnectionRecord(self)
File “/usr/lib/python2.7/site-packages/sqlalchemy/pool.py”, line 461, in init
self.__connect(first_connect_check=True)
File “/usr/lib/python2.7/site-packages/sqlalchemy/pool.py”, line 651, in __connect
connection = pool._invoke_creator(self)
File “/usr/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py”, line 105, in connect
return dialect.connect(*cargs, **cparams)
File “/usr/lib/python2.7/site-packages/sqlalchemy/engine/default.py”, line 392, in connect
return self.dbapi.connect(*cargs, **cparams)
File “/usr/lib64/python2.7/site-packages/psycopg2/init.py”, line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
OperationalError: (psycopg2.OperationalError) FATAL: no pg_hba.conf entry for host “[local]”, user “root”, database “postgres”, SSL off

[2017-04-24 17:23:09,371][PID:5011][INFO][metrics] method=GET path=/login endpoint=redash.login status=500 content_type=? content_length=-1 duration=15.99 query_count=0 query_duration=0.00
[2017-04-24 17:23:09,371][PID:5011][INFO][werkzeug] 127.0.0.1 - - [24/Apr/2017 17:23:09] “GET /login?next=http%3A%2F%2F127.0.0.1%3A5000%2F HTTP/1.1” 500 -


#2

i find the http%3A%2F%2F127.0.0.1%3A5000%2F is localhost:5000,so when i visit the backend,it is wrong