Skip to content

Commit

Permalink
Comments/docs for NO_WINDOWS_SERVICE env var
Browse files Browse the repository at this point in the history
  • Loading branch information
agoallikmaa committed Dec 15, 2020
1 parent 94a146a commit ac53341
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/otelcol/main_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ func run(params service.Parameters) error {
}

func checkUseInteractiveMode() (bool, error) {
// If environment variable NO_WINDOWS_SERVICE is set with any value other
// than 0, use interactive mode instead of running as a service. This should
// be set in case running as a service is not possible or desired even
// though the current session is not detected to be interactive
if value, present := os.LookupEnv("NO_WINDOWS_SERVICE"); present && value != "0" {
return true, nil
}
Expand Down
8 changes: 8 additions & 0 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,11 @@ More often than not, exporting data does not work because of a network
configuration issue. This could be due to a firewall, DNS, or proxy
issue. Note that the Collector does have
[proxy support](https://github.com/open-telemetry/opentelemetry-collector/tree/master/exporter#proxy-support).

### Startup failing in Windows Docker containers

The process may fail to start in a Windows Docker container with the following
error: `The service process could not connect to the service controller`. In
this case the `NO_WINDOWS_SERVICE=1` environment variable should be set to force
the collector to be started as if it were running in an interactive terminal,
without attempting to run as a Windows service.

0 comments on commit ac53341

Please sign in to comment.