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

私钥路径无法读取 #49

Closed
etanwaontson opened this issue Jul 10, 2024 · 2 comments
Closed

私钥路径无法读取 #49

etanwaontson opened this issue Jul 10, 2024 · 2 comments

Comments

@etanwaontson
Copy link

报错:private key path and content are both empty, provide at least one
容器里面:/home/admin/configs/ed25519key.pem 文件是存在的,这种一般是什么导致的

@etanwaontson
Copy link
Author

etanwaontson commented Jul 11, 2024

/补充一下配置文件,以下文件路径都在统一的工作目录下
config.yml

intra_server:
  host: 0.0.0.0
  port: 50050
inter_server:
  port: 50051
log_level: debug
party_code: alice
session_expire_time: 24h
session_expire_check_time: 1m
party_info_file: "/home/admin/configs/party_info.json"
private_pem_path: "/home/admin/configs/ed25519key.pem"
intra_host: broker:50050
engine:
  timeout: 120s
  protocol: http
  content_type: application/json
  uris:
    - for_peer: http://xx.xxx.xxx.xxx
      for_self: engine:50052
storage:
  type: mysql
  conn_str: "root:xxxxx@tcp(xxx.xxx.xxx.xxx:xxxx)/scql_broker_alice?charset=utf8mb4&parseTime=True&loc=Local&interpolateParams=true"
  max_idle_conns: 10
  max_open_conns: 100
  conn_max_idle_time: 2m
  conn_max_lifetime: 5m

docker-compose.yaml

version: '3.8'
services:
  broker:
    image: secretflow/scql:stable
    command:
      - /home/admin/bin/broker
      - -config=/home/admin/configs/config.yml
    restart: always
    ports:
      - 50050
      - 50051
    volumes:
      - ./config.yml:/home/admin/configs/config.yml
      - ./party_info.json:/home/admin/configs/party_info.json
      - ./ed25519key.pem:/home/admin/configs/ed25519key.pem
  engine:
    cap_add:
      - NET_ADMIN
    command:
      - /home/admin/bin/scqlengine
      - --flagfile=/home/admin/engine/conf/gflags.conf
    image: secretflow/scql:stable
    ports:
      - 50053
    volumes:
      - ./gflags.conf:/home/admin/engine/conf/gflags.conf

gflags.conf:

--listen_port=50052
--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=scql_engine_alice;user=root;password=xxxxxxxx;host=xxx.xxx.xxx.xxx:xxxx;auto-reconnect=true"}],"rules":[{"db":"*","table":"*","datasource_id":"ds001"}]}
# party authentication flags
--enable_self_auth=false
--enable_peer_auth=false

party_info.json

{
  "participants": [
    {
      "party_code": "alice",
      "endpoint": "xxx.xxx.xxx.xxx:50051",
      "pubkey": "公钥"
    },
    {
      "party_code": "bob",
      "endpoint": "xxx.xxx.xxx.xxx.50051",
      "pubkey": "公钥"
    }
  ]
}

ed25519key.pem

-----BEGIN PRIVATE KEY-----
私钥
-----END PRIVATE KEY----

@tongke6
Copy link

tongke6 commented Jul 11, 2024

@etanwaontson 请参考 scql 的最新配置文档:https://www.secretflow.org.cn/zh-CN/docs/scql/0.8.0b2/reference/p2p-deploy-config

针对上面的问题,配置项 private_pem_path 要修改成 private_key_path

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