有人Fabric-CA (1.2.0-stable)
用服务器成功配置openldap
服务器吗?
我在日志中看到此错误:
2018/09/03 01:34:01 [DEBUG] Creating new LDAP client for { Enabled:true URL:ldap://****:****@openldap/dc=example,dc=com UserFilter:(uid=%s) GroupFilter:(memberUid=%s) Attribute:{[uid member][{ }] map[groups:[{ }]]} TLS:{false [] { }} }
2018/09/03 01:34:01 [DEBUG] Initialized LDAP identity registry; err=Invalid expression for attribute '': Unexpected end of expression
2018/09/03 01:34:01 [WARNING] Failed to initialize LDAP client; err=Invalid expression for attribute '': Unexpected end of expression
2018/09/03 01:34:01 [ERROR] Error occurred initializing database: Invalid expression for attribute '': Unexpected end of expression
这是我用来启动的命令openldap
:
docker run -h openldap -p 389:389 --name openldap --network=fabric-n --volume /home/xxxx/fabric-ca/data:/etc/hyperledger --env LDAP_ORGANISATION="Hyperledger" --env LDAP_DOMAIN="example.com" --env LDAP_ADMIN_PASSWORD="adminpw" --detach osixia/openldap:1.2.1
这是运行的命令fabricca
:
docker run -h fabric-ca -p 7054:7054 --name fabric-ca --network=fabric-n --volume /home/xxxx/fabric-ca/data:/etc/hyperledger --env FABRIC_CA_SERVER_HOME="/etc/hyperledger/fabric-ca-server" --env FABRIC_CA_CLIENT_HOME="/etc/hyperledger/fabric-ca-client" --env FABRIC_CA_SERVER_CA_NAME="hfca" --detach hyperledger/fabric-ca:amd64-1.2.0
我创建了一个可以连接到 openldap 容器的 docker 覆盖网络
fabric-ca-server-config.yaml
ldap:
# Enables or disables the LDAP client (default: false)
# If this is set to true, the "registry" section is ignored.
enabled: true
# The URL of the LDAP server
url: ldap://cn=admin,dc=example,dc=com:adminpw@openldap/dc=example,dc=com