# Xcode HelloVapor run error

**URL:** <https://forums.kodeco.com/t/xcode-hellovapor-run-error/43791>\
**Category:** Server Side Swift with Vapor\
**Created:** [June 20, 2018, 4:25pm UTC](https://forums.kodeco.com/t/xcode-hellovapor-run-error/43791 "2018-06-20T16:25:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rcutshaw](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rcutshaw/32/106617_2.png) [@rcutshaw](https://forums.kodeco.com/u/rcutshaw)\
**Post date:** [June 20, 2018, 4:25pm UTC](https://forums.kodeco.com/t/xcode-hellovapor-run-error/43791/1 "2018-06-20T16:25:50Z")

</div>

When building/running the HelloVapor project, I get this error:

Thread 1: Fatal error: Error raised at top level: bind(descriptor:ptr:bytes:) failed: Address already in use (errno: 48)

at line 3: in main.swift

I’m running on MacOS High Sierra 10.13.5 using Xcode 9.4.1 and Swift 4.1

This was in the console:

[INFO] Migrating ‘sqlite’ database (MigrateCommand.swift:20)  
[INFO] Preparing migration ‘Todo’ (Migrations.swift:109)  
[INFO] Migrations complete (MigrateCommand.swift:24)  
Running default command: /Users/davidcutshaw/Library/Developer/Xcode/DerivedData/HelloVapor-akdxlbttcclituewsccprqbdlhdh/Build/Products/Debug/Run serve  
Server starting on [http://localhost:8080](http://localhost:8080)

---

<div class="post-metadata">

**Author:** ![0xtim](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/0xtim/32/111111_2.png) [@0xtim](https://forums.kodeco.com/u/0xtim)\
**Post date:** [June 21, 2018, 11:10am UTC](https://forums.kodeco.com/t/xcode-hellovapor-run-error/43791/2 "2018-06-21T11:10:34Z")

</div>

@rcutshaw this means that you have another program connected to port 8080. In Terminal run `lsof -i :8080` to see what is connected and you can kill the process

---

<div class="post-metadata">

**Author:** ![gjzwart](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/gjzwart/32/110937_2.png) [@gjzwart](https://forums.kodeco.com/u/gjzwart)\
**Post date:** [November 29, 2018, 10:41am UTC](https://forums.kodeco.com/t/xcode-hellovapor-run-error/43791/3 "2018-11-29T10:41:52Z")

</div>

Apples HomeKit Home app runs there. So maybe one should choose a port that does not interfere with system software?

```
MacBook-Pro:TILApp xxx$ lsof -i :8080
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
homed 468 xxx 15u IPv6 0xfae3ab8627d53107 0t0 TCP macbook-pro.local:49242->[fe80:d::217:88ff:fe25:813c]:http-alt (ESTABLISHED)

```

You could change the port to something different, like 9090. In your configure.swift, put the following code:

```
let serverConfigure = NIOServerConfig.default(hostname: "0.0.0.0", port: 9090)
services.register(serverConfigure)

```

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [November 29, 2018, 12:23pm UTC](https://forums.kodeco.com/t/xcode-hellovapor-run-error/43791/4 "2018-11-29T12:23:22Z")

</div>

@gjzwart Thank you for sharing the solution - much appreciated! :]

---

<div class="post-metadata">

**Author:** ![mentalex](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/mentalex/32/101661_2.png) [@mentalex](https://forums.kodeco.com/u/mentalex)\
**Post date:** [October 5, 2020, 1:17am UTC](https://forums.kodeco.com/t/xcode-hellovapor-run-error/43791/5 "2020-10-05T01:17:57Z")

</div>

Running `lsof -i :8080` and killing the process with `kill {PID of the porcess}` just like @0xtim sed works for me.

---

<div class="post-metadata">

**Author:** ![ivanlares](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/ivanlares/32/105896_2.png) [@ivanlares](https://forums.kodeco.com/u/ivanlares)\
**Post date:** [February 25, 2022, 11:25pm UTC](https://forums.kodeco.com/t/xcode-hellovapor-run-error/43791/6 "2022-02-25T23:25:55Z")

</div>

> [@mentalex](#):
>
> kill {PID of the porcess}

Dont make the same mistake I did and include the brackets 😃

---

<div class="post-metadata">

**Author:** ![nitink](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/nitink/32/102075_2.png) [@nitink](https://forums.kodeco.com/u/nitink)\
**Post date:** [January 30, 2024, 8:57am UTC](https://forums.kodeco.com/t/xcode-hellovapor-run-error/43791/7 "2024-01-30T08:57:58Z")

</div>

Run the below command on the terminal:

sudo lsof -i :8080

kill -9 {PID}
