I'm pretty new to PostgreSQL so the question may be simple. So.
I have installed PostgreSQL 11 and pgAdmin 4 on Fedora 29. I can connect to the database via terminal or AzureDataStudio, but when I try to connect with pgAdmin, I get this error:

> 
> Unable to connect to server:
> 
> 
> could not connect to server: Permission denied Is the server running
>  on host "127.0.0.1" and accepting TCP/IP connections on port 5432?
> 
> 
> 

I'm trying anything that can be found for 3 last days, but nothing helped me. Here are my configurations:

```
# I set listen_address in postgresql.conf:
listen_addresses = '*'

# and these are my pg_hba.conf hosts:
local   all             all                     md5

host    all             all     127.0.0.1/32    md5
host    all             all     0.0.0.0/0       md5

host    all             all     ::1/128         md5
host    all             all     ::/0            md5

local   replication     all                     peer
host    replication     all     127.0.0.1/32    ident
host    replication     all     ::1/128         ident

```

Is there any problem with these configurations? Or is there any tip should I know to connect through pgAdmin? Thanks in advance. 

**UPDATE:**

I should mention that I can connect to the database through the terminal:

```
psql -h 127.0.0.1 -U postgres

```

Connecting through AzureDataStudio doesn't need any specified data. There is a form just like this:

[![enter image description here](https://i.stack.imgur.com/i63Sz.png)](https://i.stack.imgur.com/i63Sz.png)

And filling the form and submitting the Connect button will connect to the database. Also, I can connect to the database via JetBrains' DataGrip with same form and data.

**UPDATE 2:**

I'm running both PostgreSQL and pgAdmin on my local machine which is running Fedora 30. 

**UPDATE 3:**

Here are my full software's info:

```
// OS
Fedora 30 64-bit

// PostgreSQL
PostgreSQL 11.3 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 9.0.1 20190312 (Red Hat 9.0.1-0.10), 64-bit

// pgAdmin
Version    4.8
Copyright    Copyright (C) 2013 - 2019, The pgAdmin Development Team
Python Version    3.7.3 (default, May 11 2019, 00:38:04) [GCC 9.1.1 20190503 (Red Hat 9.1.1-1)]
Flask Version    1.0.2
Application Mode    Server

```

**UPDATE 3:**

Running `sudo netstat -nlp | grep 5432` command gives this result;

```
tcp        0      0 0.0.0.0:5432            0.0.0.0:*               LISTEN      16954/postmaster    
tcp6       0      0 :::5432                 :::*                    LISTEN      16954/postmaster    
unix  2      [ ACC ]     STREAM     LISTENING     952579   16954/postmaster     /var/run/postgresql/.s.PGSQL.5432

```

**UPDATE 4: The Solution!**

Finally, with the help of [Jan Garaj's answer](https://stackoverflow.com/a/56517031/645167), I found the solution. First of all, I installed the *SELinux Troubleshooter* app:

```
sudo dnf install setroubleshoot

```

Then I started the Troubleshooter. Next, I tried to connect to the database through *pgAdmin4*. The Troubleshooter gave me 2 errors with suggested solutions which were running these commands:

```
sudo setsebool -P httpd_can_network_connect 1
sudo setsebool -P httpd_can_network_connect_db 1

```