cube icon indicating copy to clipboard operation
cube copied to clipboard

Unable to use SQL API

Open 1043038630 opened this issue 1 year ago • 6 comments

Describe the bug

I deployed using Docker, and the content of my document set ports, accounts, and passwords in the environment variables. However, when I tried to access it, it was unsuccessful

To Reproduce Steps to reproduce the behavior: 1.Add the following configuration in Docker image 2.Starting Docker Service 3.Write the following code based on the reference document.Document address:https://cube.dev/docs/product/configuration/visualization-tools/jupyter image

4.Error message image

Version: image

1043038630 avatar Dec 27 '23 12:12 1043038630

I've run into a similar issue. I ended up running the process I needed to connect to the Cube SQL within Docker Compose, which, while it's a workaround, got me unblocked. Have you tried setting CUBEJS_PG_SQL_PORT to 15432 ? I think it's a good practice to leave 5432 for vanilla Postgres as I often forget I have it running locally for some other project. This can lead to un-obvious connection failures.

etburke avatar Dec 30 '23 14:12 etburke

Hey @1043038630, I believe this issue is related to Docker Compose networking or Docker Desktop networking rather than Cube itself.

For instance, when you run Cube like this, are you able to open the Playground at http://localhost:4000 in your web browser?

igorlukanin avatar Jan 02 '24 11:01 igorlukanin

I've run into a similar issue. I ended up running the process I needed to connect to the Cube SQL within Docker Compose, which, while it's a workaround, got me unblocked. Have you tried setting CUBEJS_PG_SQL_PORT to 15432 ? I think it's a good practice to leave 5432 for vanilla Postgres as I often forget I have it running locally for some other project. This can lead to un-obvious connection failures.

Thank you for replying to me. I've tried it before, but it still doesn't work. I later solved this problem because the version of my Docker deployment was incorrect. I deployed it completely according to the documentation, but it was incomplete. It seems that the API service was missing. Later, I found the latest stable version in the Docker hub and redeployed it, and it was fine

1043038630 avatar Jan 03 '24 10:01 1043038630

Hey @1043038630, I believe this issue is related to Docker Compose networking or Docker Desktop networking rather than Cube itself.

For instance, when you run Cube like this, are you able to open the Playground at http://localhost:4000 in your web browser?

Thank you for your reply. I have resolved the issue because my version is incorrect. The official documentation deployment method does not include API services

1043038630 avatar Jan 03 '24 10:01 1043038630

@1043038630 I'm glad to hear that you have resolved your issue!

The official documentation deployment method does not include API services

Could you please kindly provide a link to the docs page or its part where you think that is missing? That would help fix it. Thank you in advance!

igorlukanin avatar Jan 03 '24 10:01 igorlukanin

@1043038630 I'm glad to hear that you have resolved your issue!

The official documentation deployment method does not include API services

Could you please kindly provide a link to the docs page or its part where you think that is missing? That would help fix it. Thank you in advance!

https://cube.dev/docs/product/getting-started/core/create-a-project

image

The services in this version are not very complete, I think it should be clearly reminded

1043038630 avatar Feb 02 '24 07:02 1043038630