I'm trying to synchronize data to CrateDB using RisingWave with JDBC, but I'm encountering a strange error message that I can't decode to find a potential workaround. Here's the error I'm getting when I execute the CREATE SINK
command:
(psycopg2.errors.InternalError_) QueryError: internal error: Rpc error: gRPC error (Internal error): Actor 498 exit unexpectedly: Executor error: Sink error: Remote sink error: failed to start sink: Status { code: Internal, metadata: MetadataMap { headers: {"content-type": "application/grpc"} }, source: None }
backtrace of `StreamError`:
disabled backtrace
[SQL: CREATE SINK audience_sink_crate FROM segment_1
WITH
(
connector='jdbc',
jdbc.url='<crate://user:password@host:4200?ssl=True>',
table.name='audiences'
)]
(Background on this error at: <https://sqlalche.me/e/14/2j85>)
I've tried changing the port and the JDBC URL scheme as suggested, but now I'm getting a slightly different error with a different actor number. I'm not sure if the actor number is relevant or if it's just a coincidence. I've also considered whether the SSL mode is causing the error, but changing it didn't seem to help. Any insights on how to resolve this issue would be greatly appreciated.
Georg Boegerl
Asked on Mar 07, 2023
The error you're encountering seems to be related to the JDBC connection to CrateDB. Here are a few steps you can take to troubleshoot and potentially resolve the issue:
Check the Port: Ensure that you're using the correct port for JDBC connections. CrateDB typically uses port 5432
for JDBC, not the default 4200
which is for the HTTP Admin UI.
Correct JDBC URL: Use the correct JDBC URL scheme. For CrateDB, it should be jdbc:postgresql://
instead of crate://
. Also, make sure the rest of the URL is correct, including the host, port, and credentials.
Disable SSL: If you're not sure about the SSL configuration, try disabling it temporarily to see if that resolves the issue.
Check the Connector Logs: If you're running RisingWave with Docker, check the logs of the connector service to get more detailed error messages. Use the following commands:
# find the connector's id
docker ps | grep "connector"
docker logs <id>
Update Docker Compose: If you're using the playground version of RisingWave, it might not support JDBC sinks. You may need to refer to the RisingWave documentation for a Docker Compose file that includes a connector node.
Check CrateDB Table: Ensure that the table you're trying to sink to (audiences
) exists in CrateDB and has the correct schema that matches the data you're trying to insert.
Encode Password Correctly: If your password contains special characters, make sure it's URL-encoded in the JDBC URL.
Use RisingWave Demo Cluster: If you want to try out the JDBC sink and other features, consider using the RisingWave demo cluster Docker Compose file provided in their GitHub repository.
If you've tried all these steps and are still facing issues, it might be a bug or a limitation in the current version of RisingWave. In that case, reaching out to the RisingWave community or checking for updates might be helpful.