Skip to content

How to disable the second HTTP listener on legacy endpoint 0.0.0.0:55681? #1181

Answered by mapno
rgl asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! This is handled in the OTel receiver code. If the HTTP selected port is the default one (4318), it'll run with the legacy one (55681) as well. See code

		if r.cfg.HTTP.Endpoint == defaultHTTPEndpoint {
			r.settings.Logger.Info("Setting up a second HTTP listener on legacy endpoint " + legacyHTTPEndpoint)

			// Copy the config.
			cfgLegacyHTTP := r.cfg.HTTP
			// And use the legacy endpoint.
			cfgLegacyHTTP.Endpoint = legacyHTTPEndpoint
			err = r.startHTTPServer(cfgLegacyHTTP, host)
			if err != nil {
				return err
			}
		}

If you want not to listen on the legacy port, you will need to lister for HTTP in a different port (not 4318). Hope this helps!

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@rgl
Comment options

@rgl
Comment options

Answer selected by rgl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants