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

Local Data Connector Service is not working #325

Closed
baa-ableton opened this issue Mar 16, 2023 · 5 comments
Closed

Local Data Connector Service is not working #325

baa-ableton opened this issue Mar 16, 2023 · 5 comments

Comments

@baa-ableton
Copy link

baa-ableton commented Mar 16, 2023

Hello team,

I am trying to use both RATH client and the data connector service locally.

The docker file I am using to start RATH client is as follows:

FROM alpine:latest

RUN apk --no-cache update &&\
    apk add --no-cache npm yarn git python3 py3-pip postgresql-dev gcc python3-dev musl-dev &&\
    git clone https://github.com/Kanaries/Rath.git &&\
    cd Rath &&\
    echo "" >> ./services/connector/requirements.txt &&\
    echo "psycopg2" >> ./services/connector/requirements.txt &&\
    pip install -r ./services/connector/requirements.txt &&\
    yarn install

EXPOSE 3000
EXPOSE 5001

WORKDIR /Rath
ENTRYPOINT ["yarn", "workspace", "rath-client", "start"]

When I can see the client frontend, I then start the data connector service with:

docker exec rath /usr/bin/python3 /Rath/services/connector/app.py

The client and data connector service start up fine. I can access the client UI and connector service api points seem to work fine:

/Rath # curl -XPOST localhost:5001/api/database_list
{"message":"JSONDecodeError('Expecting value: line 1 column 1 (char 0)')","success":false}

But I cannot set up the connector service on the client UI:
Screenshot 2023-03-16 at 12 04 31

It also looks like the connector service located at https://gateway.kanaries.net/connector/ uses different source code than what is located in services/connector in the master branch of the repository:
Screenshot 2023-03-16 at 12 07 04

Here it looks like /api/get_connection endpoint exists but it does not in the master branch:
Screenshot 2023-03-16 at 12 08 21

Also:

/Rath/services/connector # python3 app.py                                                                                                                           rsify/src/utils/exceptions.ts'
172.17.0.1 - - [2023-03-16 09:55:12] "OPTIONS /api/get_connection HTTP/1.1" 404 519 0.001166
172.17.0.1 - - [2023-03-16 10:00:40] "OPTIONS /api/get_connection HTTP/1.1" 404 519 0.000595
172.17.0.1 - - [2023-03-16 10:00:58] "GET /api/get_connection HTTP/1.1" 404 363 0.000552

And:

/Rath # grep 'get_connection' -r ./services/connector/
/Rath # 

Is the connector service source code in the repository outdated? How can I set up the data connector service in a way that the RATH client will successfully connect?

Thank you for your work!

@baa-ableton
Copy link
Author

@ObservedObserver just checking with you here, in case I am doing something wrong in my end. Can you please let me know?

@nuclon
Copy link

nuclon commented Jun 9, 2023

I have exactly the same behavior.
UI is trying to reach the path which is not served
172.31.129.167 - - [2023-06-09 09:09:29] "POST /api/get_connection HTTP/1.1" 404 402 0.000677

There is no "get_connection" path served in the blueprint.
The nearest is "get_connector".

It looks like, the function was renamed, but I do not see a commit for that. Is it somewhere in another branch?

@baa-ableton
Copy link
Author

@ObservedObserver @nuclon

I will try deploying once again after the new merge and update this issue today

@baa-ableton
Copy link
Author

This is working now, thanks @nuclon !

@baa-ableton
Copy link
Author

baa-ableton commented Jul 20, 2023

@nuclon have you tried to deploy locally, the causal service? I tried to do so but the service throws errors once the rath-client makes connections to it.

#382

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants