Local Data Connector Service is not working
baa-ableton opened this issue · 5 comments
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:
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:
Here it looks like /api/get_connection endpoint exists but it does not in the master branch:
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!
@ObservedObserver just checking with you here, in case I am doing something wrong in my end. Can you please let me know?
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?
I will try deploying once again after the new merge and update this issue today
This is working now, thanks @nuclon !