You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

OpenTelemetry Collector Agent作为Windows服务部署失败的问题咨询及验证

OpenTelemetry Collector Agent作为Windows服务部署失败的问题咨询及验证

大家好,我最近在尝试把OpenTelemetry Collector Agent部署成Windows服务,遇到了启动失败的问题,想跟大家请教正确的部署方向,同时也分享下我后来解决问题的过程。

我下载了对应版本的Windows安装包(Otel Collector Agent版本:0.94.0,运行环境:Windows服务器),一开始执行了以下命令来创建并启动服务:

sc.exe create otelcol displayname= otelcol start= delayed-auto
binPath=
"C:\Users\admin\otelcol-contrib_0.94.0_windows_386\otelcol-contrib.exe
--config C:\Users\admin\Core-Otel.yaml"
sc.exe start otelcol

结果服务无法正常启动,在事件查看器里看到的错误信息为:

The otelcol service terminated with the following error: An exception occurred in the service when handling the control request.

之后我调整了命令里的路径引号处理方式,给需要转义的路径加上了正确的转义引号,更新后的命令如下:

sc.exe create otelcol displayname= otelcol start= delayed-auto
binPath=
\""C:\Users\admin\otelcol-contrib_0.94.0_windows_386\otelcol-contrib.exe\"
--config \"C:\Users\admin\Core-Otel.yaml\""
sc.exe description "Otelcol"
sc.exe start otelcol

现在服务已经可以正常启动并运行了。

备注:内容来源于stack exchange,提问作者saravana

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.20 07:44:31