Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

telegraf not running on windows #6987

Closed
rguptarg opened this issue Feb 6, 2020 · 11 comments
Closed

telegraf not running on windows #6987

rguptarg opened this issue Feb 6, 2020 · 11 comments

Comments

@rguptarg
Copy link

rguptarg commented Feb 6, 2020

hi team, I am getting error in windows server during telegraf service start.

WIN version and error snap are attached
WIN1

WIN

@M0rdecay
Copy link
Contributor

M0rdecay commented Feb 6, 2020

Please, try configure agent section:

[agent]
quiet = false
debug = true

then, start telegraf from command line:
telegraf.exe --config telegraf.conf
and show output. This will help to understand the cause of the error.

@danielnelson
Copy link
Contributor

I believe this may be the same issue as #6954, is this occurring after you updated Telegraf or are you just getting started?

@bdogan
Copy link

bdogan commented Feb 10, 2020

Same here at os "Windows 2012 R2 64 bit". It is core version. Manage from remote power shell. When i restart service this problem occurred. It works only after os restart.

Ekran Resmi 2020-02-10 12 01 36

Ekran Resmi 2020-02-10 12 00 51

Ekran Resmi 2020-02-10 12 00 26

@M0rdecay
Copy link
Contributor

@bdogan, did you use agent version below 1.13? I just checked Telegraf 1.13.1 on Server 2016 and did not receive any problems with the service.

Please, show all tabs in service properties, especially "Path to executable" parameter.

@bdogan
Copy link

bdogan commented Feb 10, 2020

@M0rdecay, i have tried the following versions;

Ekran Resmi 2020-02-10 13 06 23

All tabs;

Ekran Resmi 2020-02-10 13 06 43

Ekran Resmi 2020-02-10 13 06 51

Ekran Resmi 2020-02-10 13 06 55

Ekran Resmi 2020-02-10 13 06 59

Path to Executable;
"C:\Program Files\Telegraf\telegraf.exe" --config "C:\Program Files\Telegraf\telegraf.conf" --service-name telegraf

@M0rdecay
Copy link
Contributor

@bdogan, thanks for the info, everything seems to be fine. If you are not tired, let's try another option. Record the full trace with procmon during service start.

@bdogan
Copy link

bdogan commented Feb 10, 2020

@M0rdecay Here is the trace file telegraf_trace.zip (PML format).

Note: I have filtered only process name is not "w3wp.exe"

@M0rdecay
Copy link
Contributor

Thanks for the trace. This is strange, but no errors in the operation of telegraf or services.exe were noticed in it. It can be seen that the agent is launched on the initiative services.exe and works for a minute.
And, since you encounter this error when using any version and architecture of the agent, I will assume that the service cannot be authorized under the local system account.

Perhaps this is still connected with the resource \NAS1\IPC$, since an attempt to access it is the last meaningful recorded action of the agent.
The penultimate such action is an attempt to find the chronyc executable, but only Telegraf developers know what role it plays. Telegraf cannot find the file.

If you can deal with your problem, please describe the solution.

@danielnelson
Copy link
Contributor

The penultimate such action is an attempt to find the chronyc executable, but only Telegraf developers know what role it plays. Telegraf cannot find the file.

Looks like we search for chronyc when registering the chrony plugin at startup, I suspect it is unrelated to this problem but I'll move it so that we only do this if the plugin is enabled.

@AlexHeylin
Copy link
Contributor

I've found a similar issue has occurred on one of my servers (Win 2012 R2), where the service failed to respond / start following each of several OS reboots (leading to no metrics for 36 hours). However once OS has been up a while, service starts without issue. The server should not be heavily loaded during / after boot, and telegraf is light so there should be no reason for it to be unresponsive.

Unfortunately in trying to debug this it seems the log handling on Windows is probably not as intended and you can't run debug to Eventlog (in addition to stderr always reporting eventlog is not valid option, due to missing case in switch at logger.go line 106). Also it seems to only output debug for the output, not the inputs or main code - so it's really not very helpful for diags.

I'm happy to do some digging on my server if it helps?

@ssoroka ssoroka changed the title telegraf now running on windows telegraf not running on windows Nov 16, 2020
@powersj
Copy link
Contributor

powersj commented Jan 18, 2022

Hi,

This is an older bug and we have not had any additional reports, plus we have made some more enhancements to how the service runs on Windows. I am going to go ahead and close this issue.

If you are still running into issues please feel free to file a new ticket with logs and configs!

Thanks!

@powersj powersj closed this as completed Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants