-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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.exe does not run on Windows Nano Server #2827
Comments
PR #2754 should handle this. |
Please add this one-line change so we dont have to do a rebuild every time |
@psmolkin Can you update the pull request with the suggested changes? |
@danielnelson PR #2754 looks ready to merge |
We still need to do this #2754 (comment) |
I'm getting that error running it from the command line on windowscoreserver. I downloaded v1.5.2 from InfluxData's website. That version doesn't support the "--no-service" flag. To debug the problem, I downloaded the code from github and I noticed that there is a flag "--console" which isn't recognized in the version downloaded from InfluxData's website. To debug the code, I recompiled it and added prefixes to the "E!" lines (e.g. log.Println("s.Run() E! " + ...)) - which happens to be the line that prints the error for me. Once I recompiled it, I'm able to use the "--console" line and voila it works. The new compiled version is v1.6.0~e4ce0578. (to be clear "telegraf --console --config telegraf.conf --test" is the command I ran to get it to work from the command line). |
Closing since fixed in the upcoming 1.6, workaround is to use the |
Issue
When trying to run telegraf.exe on Windows Server Nano, it fails with the following error:
Steps to reproduce
On nano server, run telegraf.exe:
Other Info
I've narrowed it down to this line of code that is causing the issue:
https://github.com/influxdata/telegraf/blob/master/cmd/telegraf/telegraf.go#L379
Proposed workaround
For running telegraf directly (without installing as a service) on Windows, it looks like it still goes through all the service-related code. Bypassing the block of code beginning here:
https://github.com/influxdata/telegraf/blob/master/cmd/telegraf/telegraf.go#L345
allows telegraf.exe to run on nano server.
Adding a --no-service flag might allow for cleaner execution when not running as a service. This doesn't solve the long term issue (nano server would not be able to run as a service), but does partially mitigate the issue.
I will submit a PR for the --no-service flag.
The text was updated successfully, but these errors were encountered: