Hi Team,

I try to save the details of the DB connection properties and click on Test Connection, then I get error: Unknown error occurred while performing connection test. Please try again later"
I can ping to Mysql DB from my terminal and the DB connection properties are correct.

Could somebody please help me what is causing the problem?

Thanks & Regards,
Adam

That error message isn’t very helpful :confused:

Can you ping it from within the Redash container though?

Yes, i can ping to DB from the Redash container.

What can you tell us about your DB Configuration? Did you explicitly set the host, port, user, pass, and db name? Are you using SSL? Is this a stock MySQL Database? Is it housed on-premise or through a cloud?

I set the mentioned properties and I’m not using SSL. The MySQL Database is in the AWS cloud.

Which data source type did you use?

I tried to use the below 2 data sources:
image

Do you see anything in your docker logs when you attempt the connection test?

Also, despite the connection test: what happens if you try to run a query?

connection test (docker_log):
[2021-11-08 09:37:24,046][PID:15][INFO][werkzeug] 10.2.2.140 - - [08/Nov/2021 09:37:24] “POST /api/data_sources/3/test HTTP/1.1” 500 -

When i run a query then the scheme is loading but then nothing happens.
i get some errors in docker logs:

[2021-11-08 09:31:56,819][PID:15][INFO][werkzeug] 10.2.2.140 - - [08/Nov/2021 09:31:56] “GET /api/jobs/d9bcc939-faba-495b-a7ef-de16ba1aa54e HTTP/1.1” 500 -
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 2463, in call
return self.wsgi_app(environ, start_response)
File “/usr/local/lib/python3.7/site-packages/werkzeug/middleware/proxy_fix.py”, line 232, in call
return self.app(environ, start_response)
File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 2449, in wsgi_app
response = self.handle_exception(e)
File “/usr/local/lib/python3.7/site-packages/flask_restful/init.py”, line 269, in error_router
return original_handler(e)
File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 1866, in handle_exception
reraise(exc_type, exc_value, tb)
File “/usr/local/lib/python3.7/site-packages/flask/_compat.py”, line 38, in reraise
raise value.with_traceback(tb)
File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 2446, in wsgi_app
response = self.full_dispatch_request()
File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File “/usr/local/lib/python3.7/site-packages/flask_restful/init.py”, line 269, in error_router
return original_handler(e)
File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File “/usr/local/lib/python3.7/site-packages/flask/_compat.py”, line 38, in reraise
raise value.with_traceback(tb)
File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 1949, in full_dispatch_request
rv = self.dispatch_request()
File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 1935, in dispatch_request
return self.view_functionsrule.endpoint
File “/usr/local/lib/python3.7/site-packages/flask_restful/init.py”, line 458, in wrapper
resp = resource(*args, **kwargs)
File “/usr/local/lib/python3.7/site-packages/flask_login/utils.py”, line 261, in decorated_view
return func(*args, **kwargs)
File “/usr/local/lib/python3.7/site-packages/flask/views.py”, line 89, in view
return self.dispatch_request(*args, **kwargs)
File “/app/redash/handlers/base.py”, line 33, in dispatch_request
return super(BaseResource, self).dispatch_request(*args, **kwargs)
File “/usr/local/lib/python3.7/site-packages/flask_restful/init.py”, line 573, in dispatch_request
resp = meth(*args, **kwargs)
File “/app/redash/handlers/query_results.py”, line 462, in get
job = Job.fetch(job_id)
File “/usr/local/lib/python3.7/site-packages/rq/job.py”, line 299, in fetch
job.refresh()
File “/usr/local/lib/python3.7/site-packages/rq/job.py”, line 518, in refresh
raise NoSuchJobError(‘No such job: {0}’.format(self.key))
rq.exceptions.NoSuchJobError: No such job: b’rq:job:d9bcc939-faba-495b-a7ef-de16ba1aa54e’

How did you set up Redash? Are you using kubernetes?

I followed the below instruction step by step:

I am not using the kubernetes.

Is your Redis running?

Yes it is running.

Peculiar.

Are you comfortable using your browser’s network inspector? If so, what happens in the Network tab when you click the connection test button?

I’ll ask this question again:

Also, despite the connection test: what happens if you try to run a query?

1 Like

I did the testing for the first time and if I did everything correctly, then I received the same errors

Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 2463, in call
return self.wsgi_app(environ, start_response)
File “/usr/local/lib/python3.7/site-packages/werkzeug/middleware/proxy_fix.py”, line 232, in call
return self.app(environ, start_response)
File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 2449, in wsgi_app
response = self.handle_exception(e)
File “/usr/local/lib/python3.7/site-packages/flask_restful/init.py”, line 269, in error_router
return original_handler(e)
File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 1866, in handle_exception
reraise(exc_type, exc_value, tb)
File “/usr/local/lib/python3.7/site-packages/flask/_compat.py”, line 38, in reraise
raise value.with_traceback(tb)
File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 2446, in wsgi_app
response = self.full_dispatch_request()
File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File “/usr/local/lib/python3.7/site-packages/flask_restful/init.py”, line 269, in error_router
return original_handler(e)
File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File “/usr/local/lib/python3.7/site-packages/flask/_compat.py”, line 38, in reraise
raise value.with_traceback(tb)
File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 1949, in full_dispatch_request
rv = self.dispatch_request()
File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 1935, in dispatch_request
return self.view_functionsrule.endpoint
File “/usr/local/lib/python3.7/site-packages/flask_restful/init.py”, line 458, in wrapper
resp = resource(*args, **kwargs)
File “/usr/local/lib/python3.7/site-packages/flask_login/utils.py”, line 261, in decorated_view
return func(*args, **kwargs)
File “/usr/local/lib/python3.7/site-packages/flask/views.py”, line 89, in view
return self.dispatch_request(*args, **kwargs)
File “/app/redash/handlers/base.py”, line 33, in dispatch_request
return super(BaseResource, self).dispatch_request(*args, **kwargs)
File “/usr/local/lib/python3.7/site-packages/flask_restful/init.py”, line 573, in dispatch_request
resp = meth(*args, **kwargs)
File “/app/redash/permissions.py”, line 71, in decorated
return fn(*args, **kwargs)
File “/app/redash/handlers/data_sources.py”, line 263, in post
job.refresh()
File “/usr/local/lib/python3.7/site-packages/rq/job.py”, line 518, in refresh
raise NoSuchJobError(‘No such job: {0}’.format(self.key))
rq.exceptions.NoSuchJobError: No such job: b’rq:job:99ec58fe-97ff-4f47-a2b0-5f7c09205a6a’

Finally it’s working. I tried to install the Redash from the beginning.

I used the docker-compose down command, after that I followed the step by step instruction and it is working. I don’t know how because I did not changed anything.

Sorry for wasting your time and thank you for your help anyway.

1 Like

I am not familiar with Docker and Docker-compose yet. :slight_smile: I would like to use Mysql and Oracle data sources in Redash. For Oracle settings, I set the following settings:

After that, the Oracle is shown in the data sources, but the Mysql and Oracle throw the above error messages. If I ran this command ( docker-compose build server ), then the Mysql data source is working but the Oracle has disappeared. Could you please help me what is the mistake?

Hi @adam09066 - did you solve this issue? I see you deleted a post before I could respond to you. If you found a solution on your own, please share it rather than deleting your question.

1 Like

Yes i did found the solution. The first image overwrote the second image and the second image did not contained the requirements. Therefore the Redash did not work correctly.

Sorry, next time I will keep the post.

1 Like

There was a little knowledge gap in Docker containers.

1 Like