Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use SQL API #7582

Closed
1043038630 opened this issue Dec 27, 2023 · 6 comments
Closed

Unable to use SQL API #7582

1043038630 opened this issue Dec 27, 2023 · 6 comments
Labels
question The issue is a question. Please use Stack Overflow for questions.

Comments

@1043038630
Copy link

1043038630 commented Dec 27, 2023

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

@etburke
Copy link

etburke commented Dec 30, 2023

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.

@igorlukanin igorlukanin added the question The issue is a question. Please use Stack Overflow for questions. label Jan 2, 2024
@igorlukanin
Copy link
Member

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?

@1043038630
Copy link
Author

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
Copy link
Author

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

@igorlukanin
Copy link
Member

@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!

@1043038630
Copy link
Author

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question The issue is a question. Please use Stack Overflow for questions.
Projects
None yet
Development

No branches or pull requests

3 participants