Skip to content

Commit

Permalink
remove extra pprof port
Browse files Browse the repository at this point in the history
  • Loading branch information
tedim52 committed Nov 10, 2024
1 parent a4445ab commit b3e60d4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const (
enclaveManagerUIPort = 9711
enclaveManagerAPIPort = 8081
engineDebugServerPort = 50102 // in ClI this is 50101 and 50103 for the APIC
pprofServerPort = 6060
maxWaitForEngineAvailabilityRetries = 40
timeBetweenWaitForEngineAvailabilityRetries = 2 * time.Second
logsStorageDirPath = "/var/log/kurtosis/"
Expand Down Expand Up @@ -170,16 +169,6 @@ func CreateEngine(
)
}

pprofPortSpec, err := port_spec.NewPortSpec(pprofServerPort, consts.EngineTransportProtocol, consts.HttpApplicationProtocol, defaultWait, consts.EmptyApplicationURL)
if err != nil {
return nil, stacktrace.Propagate(
err,
"An error occurred creating the pprof http port spec object using number '%v' and protocol '%v'",
pprofServerPort,
consts.EngineTransportProtocol.String(),
)
}

engineAttrs, err := objAttrsProvider.ForEngineServer(
engineGuid,
consts.KurtosisInternalContainerGrpcPortId,
Expand Down Expand Up @@ -216,17 +205,11 @@ func CreateEngine(
return nil, stacktrace.Propagate(err, "An error occurred transforming the Enclave Manager API port spec to a Docker port")
}

pprofDockerPort, err := shared_helpers.TransformPortSpecToDockerPort(pprofPortSpec)
if err != nil {
return nil, stacktrace.Propagate(err, "An error occurred transforming the pprof port spec to a Docker port")
}

usedPorts := map[nat.Port]docker_manager.PortPublishSpec{
privateGrpcDockerPort: docker_manager.NewManualPublishingSpec(grpcPortNum),
enclaveManagerUIDockerPort: docker_manager.NewManualPublishingSpec(uint16(enclaveManagerUIPort)),
enclaveManagerAPIDockerPort: docker_manager.NewManualPublishingSpec(uint16(enclaveManagerAPIPort)),
restAPIDockerPort: docker_manager.NewManualPublishingSpec(engine.RESTAPIPortAddr),
pprofDockerPort: docker_manager.NewManualPublishingSpec(pprofServerPort),
}

// Configure the debug port only if it's required
Expand Down
8 changes: 0 additions & 8 deletions engine/server/engine/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ const (
functionPathSeparator = "."
emptyFunctionName = ""
webappPortAddr = ":9711"
pprofPortAddr = ":6060"

remoteBackendConfigFilename = "remote_backend_config.json"
pathToStaticFolder = "/run/webapp"
Expand Down Expand Up @@ -201,13 +200,6 @@ func runMain() error {
return stacktrace.Propagate(err, "Failed to create an enclave manager for backend type '%v' and config '%+v'", serverArgs.KurtosisBackendType, backendConfig)
}

go func() {
logrus.Infof("Starting pprof server on: %s", pprofPortAddr)
if err := http.ListenAndServe(pprofPortAddr, nil); err != nil {
logrus.Fatalf("pprof server failed: %v", err)
}
}()

go func() {
envJsFilePath := filepath.Join(pathToStaticFolder, envJsFilename)
envJsFilePathPerm := envJsFilePerm
Expand Down

0 comments on commit b3e60d4

Please sign in to comment.