> For the complete documentation index, see [llms.txt](https://abangser.gitbook.io/kubecon2022/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://abangser.gitbook.io/kubecon2022/errors/make-run-fails-with-port-8080-already-in-in-use.md).

# \`make run\` fails with port 8080 already in in use

### An example error

You will see this issue when trying to run the controller with `make run` in a `Shell` tab.

```bash
root@kubernetes-vm:~/demo# make run
test -s /root/demo/bin/controller-gen || GOBIN=/root/demo/bin go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.2
/root/demo/bin/controller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
/root/demo/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
go fmt ./...
go vet ./...
go run ./main.go
1.6655869312425723e+09  INFO    controller-runtime.metrics      Metrics server is starting to listen    {"addr": ":8080"}
1.6655869312429175e+09  ERROR   controller-runtime.metrics      metrics server failed to listen. You may want to disable the metrics server or use another port if it is due to conflicts       {"error": "error listening on :8080: listen tcp :8080: bind: address already in use"}
sigs.k8s.io/controller-runtime/pkg/metrics.NewListener
        /root/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.12.2/pkg/metrics/listener.go:48
sigs.k8s.io/controller-runtime/pkg/manager.New
        /root/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.12.2/pkg/manager/manager.go:373
main.main
        /root/demo/main.go:68
runtime.main
        /usr/local/go/src/runtime/proc.go:250
1.6655869312430358e+09  ERROR   setup   unable to start manager {"error": "error listening on :8080: listen tcp :8080: bind: address already in use"}
main.main
        /root/demo/main.go:88
runtime.main
        /usr/local/go/src/runtime/proc.go:250
exit status 1
make: *** [Makefile:69: run] Error 1
```

### Fixing the issue

This is likely caused by running `make run` in both `Shell` tabs. You can check the other tab and `ctrl+c` the running controller.

If this either does not work, or you just want a faster fix, you can kill the use of port 8080 with `fuser -k 8080/tcp` in your affected `Shell` tab.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://abangser.gitbook.io/kubecon2022/errors/make-run-fails-with-port-8080-already-in-in-use.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
