解决了

参数“eventsConfigFilePath”定义。使用配置文件。

  • 2023年7月20
  • 1回复
  • 3视图

Userlevel 5
徽章 + 2
  • 社区经理
  • 72回复

当我调用脚本:

powershell tosca_execution_client。ps1 -toscaServerUrl % [DEX_URL] projectname % [DEX_Project]事件[TestEvents] clientId % [DEX_Client_ID] clientSecret % (DEX_Client_Secret)

我得到错误消息:

2023-07-18 13:09:34 + 2[正]开始ToscaExecutionClient……

2023-07-18 13:09:34 + 2[正]参数“eventsConfigFilePath”定义。使用配置文件。

获取内容:Der Pfad“C: \…”萤石不gefunden了,da er不vorhanden。

在C: \…\ tosca_execution_client。ps1:581 Zeichen: 22

+ $脚本:事件=获取内容路径美元eventsConfigFilePath生

+ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

+ CategoryInfo: ObjectNotFound: (C: \…:字符串)获取内容,ItemNotFoundException

+ FullyQualifiedErrorId: PathNotFound Microsoft.PowerShell.Commands.GetContentCommand

2023-07-18 13:09:34 + 2[正]ClientId和clientSecret被提供。身份验证将启用。获取访问令牌与提供凭证…

2023-07-18 13:09:34 + 2[正]获取访问令牌与提供凭证…

2023-07-18 13:09:34 + 2 (ERR) ToscaExecutionClient未能获取访问令牌。

2023-07-18 13:09:34 + 2 (ERR){“错误”:“invalid_client”}

2023-07-18 13:09:34 + 2[正]排队执行提供参数…

2023-07-18 13:09:34 + 2[正]获取访问令牌与提供凭证…

2023-07-18 13:09:34 + 2 (ERR) ToscaExecutionClient未能获取访问令牌。

2023-07-18 13:09:34 + 2 (ERR){“错误”:“invalid_client”}

2023-07-18 13:09:34 + 2 (ERR) ToscaExecutionClient未能排队执行。

2023-07-18 13:09:34 + 2 (ERR) Der Remoteserver帽子杯Fehler zuruckgegeben:(401)不autorisiert。

但是我没有指定一个eventsConfigFilePath。什么是怎么回事?

(最初要求和解决支持中心)

图标

最佳答案凯特2023年7月20日16:24

Answering my own Question:<\/p>

The\u00a0-events<\/strong>\u00a0option doesn't work as documented. At least not in the version I was using. Use\u00a0-eventsConfigFilePath<\/strong>\u00a0and a JSON file instead. It's cleaner and scales better anyway.<\/p>

The correct syntax is using a single dash and space(es) between parameter name and parameter value.<\/p>

powershell ToscaExecutionClient\\tosca_execution_client.ps1\t^
-toscaServerUrl\t\t\t%DEX_URL%\t\t\t\t\t\t^
-projectName\t\t\t%DEX_Project%\t\t\t\t\t^
-eventsConfigFilePath\t%~dp0\\%DEX_Job%.json\t\t\t^
-clientId\t\t\t\t%DEX_Client_ID%\t\t\t\t\t^
-clientSecret\t\t\t%DEX_Client_Secret%\t\t\t\t^
-creator\t\t\t\t%USERNAME%:%DEX_Job%\t\t\t^
-importResults\t\t\ttrue
<\/code><\/pre>","className":"post__content__best_answer"}">
查看原始

1回复

Userlevel 5
徽章 + 2

回答我的问题:

事件选择不做记录。至少在我用的版本。使用-eventsConfigFilePath和一个JSON文件。最好的清洁和尺度。

正确的语法是使用一个破折号和空间(es)之间的参数名和参数值。

powershell ToscaExecutionClient \ tosca_execution_client。ps1 ^
-toscaServerUrl % DEX_URL % ^
projectname % DEX_Project % ^
-eventsConfigFilePath % ~ dp0 \ % DEX_Job %。json ^
-clientId % DEX_Client_ID % ^
-clientSecret % DEX_Client_Secret % ^
创造者%用户名%:% DEX_Job % ^
-importResults真实

回复


Learn more about our cookies.<\/a>","cookiepolicy.button":"Accept cookies","cookiepolicy.button.deny":"Deny all","cookiepolicy.link":"Cookie settings","cookiepolicy.modal.title":"Cookie settings","cookiepolicy.modal.content":"We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.<\/a>","cookiepolicy.modal.level1":"Basic
Functional","cookiepolicy.modal.level2":"Normal
Functional + analytics","cookiepolicy.modal.level3":"Complete
Functional + analytics + social media + embedded videos"}}}">
Baidu