安全网关客户端无法在 docker 运行时识别网关 ID 或 sectoken,错误 401



尝试使用gatewayid和sectoken执行docker容器时,失败并显示错误"安全网关网关ID无法识别或需要安全令牌才能连接,错误为:401"。 然而,当我通过 CLI 手动添加时,它是成功的。

我怀疑这是因为我的安全令牌中有"--"。 我在命令行上尝试了","和转义字符。但没有任何效果。 在 Win10 和 RHEL7 中均失败。

这是控制台:

C:UsersDebraJohnson>docker run -p 9023:9003 -it ibmcom/secure-gateway-client <gateway_id>  --t <sectoken> 
IBM Bluemix Secure Gateway Client Version 1.8.0fp4
....
<press enter for the command line>
[2018-04-16 09:12:17.993] [INFO] (Client ID 1) No password provided. The UI will not require a password for access
[2018-04-16 09:12:18.008] [WARN] (Client ID 1) UI Server started. The UI is not currently password protected
[2018-04-16 09:12:18.009] [INFO] (Client ID 1) Visit localhost:9003/dashboard to view the UI.
cli> [2018-04-16 09:12:18.327] [INFO] (Client ID 13) Setting log level to INFO
[2018-04-16 09:12:18.665] [ERROR] (Client ID 13) The Secure Gateway gateway ID was either not recognized or requires a security token to connect, error was: 401
cli> [2018-04-16 09:12:18.671] [INFO] (Client ID 13) Process exiting without errors due to user or server request
cli> sectoken <sectoken>
cli> connect <gateway_id>
cli> [2018-04-16 09:12:43.095] [INFO] (Client ID 27) Setting log level to INFO
[2018-04-16 09:12:43.774] [INFO] (Client ID 27) The Secure Gateway tunnel is connected
[2018-04-16 09:12:43.868] [INFO] (Client ID xxxxxxxxxxx_Hsu) Your Client ID is xxxxxxxxxxx_Hsu 
xxxxxxxxxxx_Hsu>

谢谢

--作为安全令牌的一部分可能是您收到 403 错误的原因。您能否尝试重新生成安全令牌并再次连接网关。

如果仍有问题,请打开支持票证 (https://console.bluemix.net/docs/get-support/howtogetsupport.html#getting-customer-support),您可以在其中提供网关 ID,以便我们进一步调查。

最新更新