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.exe does not run on Windows Nano Server #2827

Closed
mikewalker125 opened this issue May 18, 2017 · 7 comments
Closed

Telegraf.exe does not run on Windows Nano Server #2827

mikewalker125 opened this issue May 18, 2017 · 7 comments

Comments

@mikewalker125
Copy link

Issue

When trying to run telegraf.exe on Windows Server Nano, it fails with the following error:

2017/05/18 11:23:18 E! The service process could not connect to the service controller.

Steps to reproduce

On nano server, run telegraf.exe:

.\telegraf.exe --config C:\Path\To\conf\settings.conf

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.

@danielnelson
Copy link
Contributor

PR #2754 should handle this.

@danielnelson danielnelson added this to the 1.4.0 milestone May 18, 2017
@danielnelson danielnelson modified the milestones: 1.5.0, 1.4.0 Aug 14, 2017
@danielnelson danielnelson modified the milestones: 1.5.0, 1.6.0 Nov 30, 2017
@psmolkin
Copy link

Please add this one-line change so we dont have to do a rebuild every time

@danielnelson
Copy link
Contributor

@psmolkin Can you update the pull request with the suggested changes?

@psmolkin
Copy link

psmolkin commented Dec 3, 2017

@danielnelson PR #2754 looks ready to merge

@danielnelson
Copy link
Contributor

We still need to do this #2754 (comment)

@russorat russorat modified the milestones: 1.6.0, 1.7.0 Feb 1, 2018
@jamesroyer
Copy link

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).

@danielnelson danielnelson modified the milestones: 1.7.0, 1.6.0 Mar 8, 2018
@danielnelson
Copy link
Contributor

Closing since fixed in the upcoming 1.6, workaround is to use the --console flag.

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

5 participants