title: PostgreSQL OSError: Multiple exceptions: [Errno 111] Connect call failed ('127.0.0.1', 5432), [Errno 99] Cannot assign requested address
body: <p>So I'm new to PostgreSQL and I made my server and database and the table and stuff then I do back to repl.it discord.py and I tried running this:</p>
  <pre><code>async def create_db_pool():
    client.pg_con = await asyncpg.create_pool(database= &quot;mainbank&quot;, user = &quot;postgres&quot;, password = password)
  
  client.loop.run_until_complete(create_db_pool())
  </code></pre>
  <p>Error:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;main.py&quot;, line 204, in &lt;module&gt;
      client.loop.run_until_complete(create_db_pool())
    File &quot;/usr/lib/python3.8/asyncio/base_events.py&quot;, line 616, in run_until_complete
      return future.result()
    File &quot;main.py&quot;, line 39, in create_db_pool
      client.pg_con = await asyncpg.create_pool(database= &quot;mainbank&quot;, user = &quot;postgres&quot;, password = password)
    File &quot;/opt/virtualenvs/python3/lib/python3.8/site-packages/asyncpg/pool.py&quot;, line 407, in _async__init__
      await self._initialize()
    File &quot;/opt/virtualenvs/python3/lib/python3.8/site-packages/asyncpg/pool.py&quot;, line 435, in _initialize
      await first_ch.connect()
    File &quot;/opt/virtualenvs/python3/lib/python3.8/site-packages/asyncpg/pool.py&quot;, line 127, in connect
      self._con = await self._pool._get_new_connection()
    File &quot;/opt/virtualenvs/python3/lib/python3.8/site-packages/asyncpg/pool.py&quot;, line 477, in _get_new_connection
      con = await connection.connect(
    File &quot;/opt/virtualenvs/python3/lib/python3.8/site-packages/asyncpg/connection.py&quot;, line 1980, in connect
      return await connect_utils._connect(
    File &quot;/opt/virtualenvs/python3/lib/python3.8/site-packages/asyncpg/connect_utils.py&quot;, line 677, in _connect
      raise last_error
    File &quot;/opt/virtualenvs/python3/lib/python3.8/site-packages/asyncpg/connect_utils.py&quot;, line 661, in _connect
      con = await _connect_addr(
    File &quot;/opt/virtualenvs/python3/lib/python3.8/site-packages/asyncpg/connect_utils.py&quot;, line 634, in _connect_addr
      tr, pr = await compat.wait_for(connector, timeout=timeout)
    File &quot;/opt/virtualenvs/python3/lib/python3.8/site-packages/asyncpg/compat.py&quot;, line 103, in wait_for
      return await asyncio.wait_for(fut, timeout)
    File &quot;/usr/lib/python3.8/asyncio/tasks.py&quot;, line 494, in wait_for
      return fut.result()
    File &quot;/opt/virtualenvs/python3/lib/python3.8/site-packages/asyncpg/connect_utils.py&quot;, line 544, in _create_ssl_connection
      tr, pr = await loop.create_connection(
    File &quot;/usr/lib/python3.8/asyncio/base_events.py&quot;, line 1033, in create_connection
      raise OSError('Multiple exceptions: {}'.format(
  OSError: Multiple exceptions: [Errno 111] Connect call failed ('127.0.0.1', 5432), [Errno 99] Cannot assign requested address
  </code></pre>
  <p>What is wrong? It is my side or is it PostgreSQL? I have the Host as localhost and the port as 5432 (all default)</p>