Telegraf: Can't start telegraf as Windows Service

Created on 11 Jan 2018  路  6Comments  路  Source: influxdata/telegraf

I downloaded this bit https://dl.influxdata.com/telegraf/releases/telegraf-1.5.1_windows_amd64.zip, installed telegraf as windows service by:
telegraf -service install -config telegraf.conf

However, it can't be started correctly, and this is what I get from Windows Event Log:


<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
        <Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
        <EventID Qualifiers="49152">7034</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8080000000000000</Keywords>
        <TimeCreated SystemTime="2018-01-12T00:09:21.610601900Z" />
        <EventRecordID>58712</EventRecordID>
        <Correlation />
        <Execution ProcessID="92" ThreadID="118916" />
        <Channel>System</Channel>
        <Computer>MININT-QIDB08G.redmond.corp.microsoft.com</Computer>
        <Security />
    </System>
    <EventData>
        <Data Name="param1">Telegraf Data Collector Service</Data>
        <Data Name="param2">1</Data>
        <Binary>740065006C00650067007200610066000000</Binary>
    </EventData>
</Event>
bug platforwindows

Most helpful comment

@kerams Specifying the absolute path solved this problem. An stdout message saying config file not found would be very helpful in thise case.

All 6 comments

I'm not sure at all what this event log message indicates, do you know what the fields represent?

This may be the same issue as https://github.com/influxdata/telegraf/issues/3601, it has been reported that the service failure is intermittent, can you try to restart it a couple times?

I restart it couple time, it doesn't even succeed once for me.

@yantang-msft I'd try specifying the absolute path of telegraf.conf when installing the service.

I use
telegraf.exe --config "C:\Program Files\Telegraftelegraf.conf" --service install
telegraf.exe --service start
but after a restart, the Windows Server service must be started manually.
In version 1.4, the service was restarted automatically after rebooting the windows.

@xAnder1402 Yes, that's #3601. Happens to me all the time.

@kerams Specifying the absolute path solved this problem. An stdout message saying config file not found would be very helpful in thise case.

Was this page helpful?
0 / 5 - 0 ratings