# Chapter 12. Simulator not fetching data from localhost

**URL:** <https://forums.kodeco.com/t/chapter-12-simulator-not-fetching-data-from-localhost/132522>\
**Category:** Server Side Swift with Vapor\
**Created:** [February 11, 2021, 11:29pm UTC](https://forums.kodeco.com/t/chapter-12-simulator-not-fetching-data-from-localhost/132522 "2021-02-11T23:29:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![glepp](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/glepp/32/101506_2.png) [@glepp](https://forums.kodeco.com/u/glepp)\
**Post date:** [February 11, 2021, 11:29pm UTC](https://forums.kodeco.com/t/chapter-12-simulator-not-fetching-data-from-localhost/132522/1 "2021-02-11T23:29:30Z")

</div>

So I try to fetch acronyms from database and I keep getting an error. What I see in iOS app project terminal is this:

**2021-02-12 01:27:36.007178+0200 TILiOS[25607:2147533] [connection] nw\_socket\_handle\_socket\_event [C3.1:2] Socket SO\_ERROR [61: Connection refused]**

And Vapor terminal shows me this:

**[DEBUG] No available connections on this event loop, creating a new one [database-id: psql, request-id: CA403EF6-B422-4494-80B9-40EC620508F8] (AsyncKit/ConnectionPool/EventLoopConnectionPool.swift:202)**

**[DEBUG] SELECT “acronyms”.“id” AS “acronyms\_id”, “acronyms”.“short” AS “acronyms\_short”, “acronyms”.“long” AS “acronyms\_long”, “acronyms”.“userID” AS “acronyms\_userID” FROM “acronyms” [] [database-id: psql, request-id: CA403EF6-B422-4494-80B9-40EC620508F8] (PostgresNIO/PostgresDatabase+Query.swift:124)**

---

<div class="post-metadata">

**Author:** ![glepp](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/glepp/32/101506_2.png) [@glepp](https://forums.kodeco.com/u/glepp)\
**Post date:** [February 11, 2021, 11:41pm UTC](https://forums.kodeco.com/t/chapter-12-simulator-not-fetching-data-from-localhost/132522/2 "2021-02-11T23:41:42Z")

</div>

just to clarify, I have tested and am able to fetch data with both Rested and in browser, yet no luck with the app in simulator.

---

<div class="post-metadata">

**Author:** ![glepp](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/glepp/32/101506_2.png) [@glepp](https://forums.kodeco.com/u/glepp)\
**Post date:** [February 12, 2021, 1:24am UTC](https://forums.kodeco.com/t/chapter-12-simulator-not-fetching-data-from-localhost/132522/3 "2021-02-12T01:24:52Z")

</div>

Okay, my Acronym model was wrong, it seems. I guess I have solved this one.

---

<div class="post-metadata">

**Author:** ![gdelarosa](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/gdelarosa/32/109063_2.png) [@gdelarosa](https://forums.kodeco.com/u/gdelarosa)\
**Post date:** [February 25, 2021, 10:23pm UTC](https://forums.kodeco.com/t/chapter-12-simulator-not-fetching-data-from-localhost/132522/4 "2021-02-25T22:23:09Z")

</div>

Thank you for providing us with an update! Glad you were able to solve the problem.

Best,  
Gina

---

<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:** [January 2, 2025, 10:57am UTC](https://forums.kodeco.com/t/chapter-12-simulator-not-fetching-data-from-localhost/132522/6 "2025-01-02T10:57:18Z")

</div>

Are you getting the same connection refused error?
