StarRocks / starrocks

StarRocks, a Linux Foundation project, is a next-generation sub-second MPP OLAP database for full analytics scenarios, including multi-dimensional analytics, real-time analytics, and ad-hoc queries.
https://starrocks.io
Apache License 2.0
8.57k stars 1.73k forks source link

[External Catalog] starrocks 3.2.1 jdbc mysql with jdbcurl.useSSL=false, can't do query with the external catalog #48367

Open lishidetainan opened 1 month ago

lishidetainan commented 1 month ago

CREATE EXTERNAL CATALOG jdbc0 PROPERTIES ( "type"="jdbc", "user"="test", "password"="test", "jdbc_uri"="jdbc:mysql://192.168.9.45:3306?useSSL=false", "driver_url"="file:///opt/apps/mysql-connector-java-8.0.28.jar", "driver_class"="com.mysql.cj.jdbc.Driver" );

创建数据源如上; SHOW DATABASES FROM jdbc0; 可以运行 USE jdbc0.wgc_test; 可以切换 select id from test; 查询表中的数据时候,Caused by: java.lang.IllegalArgumentException: No enum constant com.mysql.cj.conf.BooleanPropertyDefinition.AllowableValues.FALSE/WGC_TEST

starrocks 外部数据源是否支持参数设置,能否支持

ShaoxunLi commented 1 month ago

我创建外部数据源后,做查询能导致BE挂掉。。。。 CREATE EXTERNAL CATALOG jdbc_catalog_test PROPERTIES ( "type"="jdbc", "user"="root", "password"="xxxxxx", "jdbc_uri"="jdbc:mysql://127.0.0.1:3607", "driver_url"="file:///home/xxx/repository/com/mysql/mysql-connector-j/8.0.33/mysql-connector-j-8.0.33.jar", "driver_class"="com.mysql.cj.jdbc.Driver" );

starrocks> show tables from jdbc_catalog_test1.lsx; +---------------+ | Tables_in_lsx | +---------------+ | t | +---------------+ 1 row in set (0.03 sec)

starrocks> select * from jdbc_catalog_test1.lsx.t; ERROR 1064 (HY000): Backend node not found. Check if any backend node is down.backend: [26.84.214.19 alive: true inBlacklist: true]

kevincai commented 1 month ago

@ShaoxunLi please provide related information for the crash on be side, e.g. the be.out and be.INFO

ShaoxunLi commented 1 month ago

@kevincai

starrocks> select * from jdbc_catalog_test1.test.t; ERROR 1064 (HY000): Backend node not found. Check if any backend node is down.backend: [26.84.214.19 alive: true inBlacklist: true]

be.INFO.log be.out.log

Aborted at 1721091502 (unix time) try "date -d @1721091502" if you are using GNU date PC: @ 0x7f1c49534205 AccessInternal::PostRuntimeDispatch<>::oop_access_barrier() SIGSEGV (@0x0) received by PID 3234541 (TID 0x7f1b339f5700) from PID 0; stack trace: @ 0x62b81e2 google::(anonymous namespace)::FailureSignalHandler() @ 0x7f1c4a1d6711 PosixSignals::chained_handler() @ 0x7f1c4a1d72ce JVM_handle_linux_signal @ 0x7f1c4927e5a0 (unknown) @ 0x7f1c49534205 AccessInternal::PostRuntimeDispatch<>::oop_access_barrier() @ 0x7f1c49c9d041 jni_RegisterNatives @ 0x575c8fa starrocks::JVMFunctionHelper::_init() @ 0x575d727 starrocks::JVMFunctionHelper::getInstance() @ 0x59beedf starrocks::JDBCScanner::_init_jdbc_bridge() @ 0x59c0b48 starrocks::JDBCScanner::open() @ 0x594e4cd starrocks::connector::JDBCDataSource::_create_scanner() @ 0x594f07f starrocks::connector::JDBCDataSource::open() @ 0x34b66d1 starrocks::pipeline::ConnectorChunkSource::_open_data_source() @ 0x34b7748 starrocks::pipeline::ConnectorChunkSource::_read_chunk() @ 0x37e2627 starrocks::pipeline::ChunkSource::buffer_next_batch_chunks_blocking() @ 0x34a968d _ZZN9starrocks8pipeline12ScanOperator18_trigger_next_scanEPNS_12RuntimeStateEiENKUlvE_clEv @ 0x35b90f1 starrocks::workgroup::ScanExecutor::worker_thread() @ 0x2bb0b8c starrocks::ThreadPool::dispatch_thread() @ 0x2baa71a starrocks::Thread::supervise_thread() @ 0x7f1c49273f3b (unknown) @ 0x7f1c48ffd840 clone

kevincai commented 1 month ago

shall put jdbc driver url link to an external storage that is able to access from all FE and BE nodes, it is not enough to just to on FE nodes.