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

scql 配置gflags.conf 报bug #361

Closed
friendsAI opened this issue Sep 19, 2024 · 12 comments
Closed

scql 配置gflags.conf 报bug #361

friendsAI opened this issue Sep 19, 2024 · 12 comments

Comments

@friendsAI
Copy link

Issue Type

Others

Have you searched for existing issues?

Yes

OS Platform and Distribution

linux v10

SCQL Version

0.8.1b

What happend and What you expected to happen.

在p2p模式下,希望 engine 之间的通信协议是http。根据官方资料,在gflag.conf 文件中增加 peer_engine_protocol 配置项,并设置值为 http 。重启docker后,再运行之前测试正常的查询语句,报错如下:
Error: run query: DoQuery response: {
  "status":  {
    "code":  320,
    "message":  "RunExecutionPlan create session(957ac98e-764c-11ef-a03b-0242ac1c0003) failed, catch std::exception=[engine/link/channel_manager.cc:57] BrpcChannel Init failed, ret=-1, remote_addr=192.168.90.168:8003, load_balancer=1, role=, protocol=http "
  }
}

Configuration used to run SCQL.

--peer_engine_protocol=http

SCQL log output.

engine 报错
@BrainWH
Copy link

BrainWH commented Sep 19, 2024

你好,可以贴下gflag.conf 的配置信息

@friendsAI
Copy link
Author

--listen_port=8003
--datasource_router=embed
--enable_driver_authorization=false
--server_enable_ssl=false
--driver_enable_ssl_as_client=false
--peer_engine_enable_ssl_as_client=false
--embed_router_conf={"datasources": [{"id": "ds001", "name": "mysql db", "kind": "MYSQL", "connection_str": "db=bob;user=root;password=*****;host=192.168.12.123;auto-reconnect=true"}], "rules": [{"db": "", "table": "", "datasource_id": "ds001"}]}
--enable_self_auth=false
--enable_peer_auth=false
--peer_engine_protocol=http

@jingshi-ant
Copy link
Contributor

试试http:proto?http的配置我没有验证过
--peer_engine_protocol=http:proto

@friendsAI
Copy link
Author

--peer_engine_protocol=http:proto,这个我也试过了,一样不行的。不过报错信息不一样:
Error: run query: DoQuery response: {
"status": {
"code": 300,
"message": "runQuery distribute: Post "http://192.168.12.123:5005/inter/query/distribute\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"
}
}

@jingshi-ant
Copy link
Contributor

check下engine报错日志

@friendsAI
Copy link
Author

请问,engine报错日志 在哪个文件呢?

@jingshi-ant
Copy link
Contributor

找到engine对应的container id: docker ps
查看日志: docker logs xxx

@friendsAI
Copy link
Author

friendsAI commented Sep 19, 2024

2024-09-19 08:37:48.504 [info] [main.cc:BuildRouter:108] [scqlengine] Building EmbedRouter from json conf
2024-09-19 08:37:48.505 [info] [thread_pool.cc:ThreadPool:30] [scqlengine] Create a fixed thread pool with size 32
2024-09-19 08:37:48.505 [info] [session_manager.cc:WatchSessionTimeoutThread:250] [scqlengine] WatchSessionTimeoutThread startup, session default timeout=1800s
2024-09-19 08:37:48.506 [info] [main.cc:main:330] [scqlengine] Adding EngineService into brpc server
2024-09-19 08:37:48.506 [info] [main.cc:main:339] [scqlengine] Adding ErrorCollectorService into brpc server
2024-09-19 08:37:48.506 [info] [main.cc:main:348] [scqlengine] Adding MetricsService into brpc server
2024-09-19 08:37:48.506 [info] [main.cc:main:358] [scqlengine] Adding MuxReceiverService into main server...
2024-09-19 08:37:48.509 [warning] [server.cpp:BRPC:1187] [scqlengine] Builtin services are disabled according to ServerOptions.has_builtin_services
2024-09-19 08:37:48.509 [info] [main.cc:main:378] [scqlengine] Started engine rpc server success, listen on: 0.0.0.0:8003
2024-09-19 08:38:31.795 [error] [channel.cpp:BRPC:210] [scqlengine] http does not support connection_type=single
2024-09-19 08:38:31.815 [error] [engine_service_impl.cc:RunExecutionPlan:301] [scqlengine] RunExecutionPlan create session(8b18efd9-7662-11ef-913e-0242ac1d0002) failed, catch std::exception=[engine/link/channel_manager.cc:57] BrpcChannel Init failed, ret=-1, remote_addr=192.168.12.123:8003, load_balancer=1, role=, protocol=http
2024-09-19 08:38:31.815 [warning] [session_manager.cc:GetSession:156] [scqlengine] session(8b18efd9-7662-11ef-913e-0242ac1d0002) not exists. default return nullptr.
2024-09-19 08:38:31.815 [warning] [session.cc:ActiveLogger:336] [scqlengine] can not get valid session
2024-09-19 08:38:31.815 [error] [channel.cpp:BRPC:210] [scqlengine] http does not support connection_type=single
2024-09-19 08:38:31.819 [warning] [engine_service_impl.cc:ReportErrorToPeers:668] [scqlengine] sync error to peers failed: throw: [engine/link/channel_manager.cc:57] BrpcChannel Init failed, ret=-1, remote_addr=192.168.12.123:8003, load_balancer=1, role=, protocol=http
2024-09-19 08:38:31.820 [warning] [session_manager.cc:GetSession:156] [scqlengine] session(8b18efd9-7662-11ef-913e-0242ac1d0002) not exists. default return nullptr.
2024-09-19 08:38:31.820 [warning] [session.cc:ActiveLogger:336] [scqlengine] can not get valid session
2024-09-19 08:38:31.820 [info] [engine_service_impl.cc:StopJob:173] [scqlengine] EngineServiceImpl::StopJob(8b18efd9-7662-11ef-913e-0242ac1d0002), reason()
2024-09-19 08:38:31.820 [warning] [session_manager.cc:StopSession:174] [scqlengine] session(8b18efd9-7662-11ef-913e-0242ac1d0002) not exists.

@jingshi-ant
Copy link
Contributor

[scqlengine] http does not support connection_type=single
需要改下配置--peer_engine_connection_type=pooled

@friendsAI
Copy link
Author

好的,多谢。我先试试能否正常跑起来。
另外,修改了这些配置,engine 之间的通信协议就是http了吧?

@jingshi-ant
Copy link
Contributor

建议验证试试看

@friendsAI
Copy link
Author

可以了。但是timeout 得设长一点

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

3 participants