SQLState - 08S01 Error Setup Confluence Server with MSQL on Synology Docker
Asked by Van Tor:

I saw online that some users successfully installed confluence server on DSM 6.2.3 synology. Here is my trial:

* confluence-server.lastest installed on the nas
* MSSQL (14.0.3048.4) running docker on the same synology (running with other app fine) - it has no connection issues for various apps.

After completing the installation on docker, In browser, run setup fine (after enter license key) then database setup, the error coming out all times:

**Can't reach database server or port**

SQLState - 08S01  
com.microsoft.sqlserver.jdbc.SQLServerException: The connection to the host localhost, named instance MSSQLSERVER failed. Error: "java.net.SocketTimeoutException: Receive timed out". Verify the server and instance names and check that no firewall is blocking UDP traffic to port 1434. For SQL Server 2005 or later, verify that the SQL Server Browser Service is running on the host.

![confluenceError.png](/t5/image/serverpage/image-id/96846iCC9D6EDC13EB69F9/image-size/large?v=v2&px=999 "confluenceError.png")

Very likely the cause is "**For SQL Server 2005 or later, verify that the SQL Server Browser Service is running on the host.** " SQL Server Browser Service status in container can be viewed? any possible solution?

Anyone can help to resolve this issue?

Thank you.


Answers:
author: Van Tor
body: Resolved for Postgres, not MSSQLSERVER: share with other who use DSM Synology - once you get inside, a very great tool!

Read one article in the site talking about creating a docker net that should be the solution. I am not building it yet. So far working now.

Installed in Synology Docker:

![01.png](https://community.atlassian.com/t5/image/serverpage/image-id/97123iD33E0771EE706F6A/image-size/large?v=v2&px=999 "01.png")

openJKD (hotspot supported) not sure it is being used by related confluence and db or not:

![02-openjdk.png](https://community.atlassian.com/t5/image/serverpage/image-id/97124i117BD6595F1B628B/image-size/large?v=v2&px=999 "02-openjdk.png")

Postgres10 (supported by confluence)

![03-postgres.png](https://community.atlassian.com/t5/image/serverpage/image-id/97125i8F0A5DBFE7644FB8/image-size/large?v=v2&px=999 "03-postgres.png")

Confluence: latest

![04-confluence.png](https://community.atlassian.com/t5/image/serverpage/image-id/97129iC681D4AE8BAC2D98/image-size/large?v=v2&px=999 "04-confluence.png")

Conventionally failed connecting this way:

![05-confluence.png](https://community.atlassian.com/t5/image/serverpage/image-id/97131iA92B87A8403C58F8/image-size/large?v=v2&px=999 "05-confluence.png")

You look postgre:

![successfully confluenece connected on Postgres 2020-05-30_20-42-30.png](https://community.atlassian.com/t5/image/serverpage/image-id/97132i0DA1699AE896EC5E/image-size/large?v=v2&px=999 "successfully confluenece connected on Postgres 2020-05-30_20-42-30.png")

Successfully connected using 172.17.0.1

![successfully connected with Postgres 2020-05-30_20-42-30.png](https://community.atlassian.com/t5/image/serverpage/image-id/97133i2F61387883AB0B5D/image-size/large?v=v2&px=999 "successfully connected with Postgres 2020-05-30_20-42-30.png")

This caused me a couple of days to try many options to find out a solution. Likely guru may provide NAS public user a guide - how to setup a docker net bridging simply confluence and database (at least workable on postgres).

At this step no need to change (no changes on pg_hba.conf nor postgresql.conf). I am not sure after reboot, the 172.17.0.1 would be changed or not. At least, Synology DSM users can save a lot of time very smoothly pass the connection troubles.

After digging into confluence from scratch, it is a wonderful world of confluence! Thank mediawiki upgrade crashed on DSM my base (over 1000 pages I cannot retrieve) and forced me move into confluence.

Environment settings for each container should be very helpful for none-tech users like me to make life simple.

Hope the shares help to some NAS users.

comments: author: Van Tor
body: Just found out [the posted reference by Rafael on March 18 2019. Cheers!](https://community.atlassian.com/t5/Confluence-questions/Connecting-confluence-to-Postgres-database-error/qaq-p/1035224)


author: Moses Thomas
body: [@Van Tor](/t5/user/viewprofilepage/user-id/3913338)

There few things here that could be the reason

* The host name might not be localhost even better use "IP address" instead of local host
* The port, you need to verify that database server is running on "1433" If you have access to database as admin(Microsoft SQL sever installed) you need to find the right port.

* Next is to make sure that no **fire wall** is blocking TCP connection to that port

Kind regards,

Moses

comments: author: Van Tor
body: Thanks Moses. Indeed it is localhost, also IP tried too. MSSQL Studio works fine with 1433 as well as many nodejs app access to the MSSQL without any problem. For sore no firewall block those ports. Today I followed your guide, setup PostgreSQL 9.18 but failed too.

**Can't reach database server or port**

SQLState - 08001  
org.postgresql.util.PSQLException: Connection to localhost:5433 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

Failed too many times by simply setup db connections.

Thank you.


author: Van Tor
body: For PostgreSQL: now turned to the error:

**Can't reach database server or port**

SQLState - 08001  
org.postgresql.util.PSQLException: The connection attempt failed.

The login user has been temporally fully granted as a super user still failed.


author: Moses Thomas
body: [@Van Tor](/t5/user/viewprofilepage/user-id/3913338)

You need to look for the configuration file in the postgres installation folder in Windows the file should be

"**postgresql.conf**"

Listen address would be **listen_addresses = '::'** most likely

Change it to **listen_addresses = 'localhost'** or IP address of the server

**Regarding MS SQL server something must be blocking it for sure**.

It should also work check whether or not TCP/IP is enabled see here on how.

[Enable Named Pipes and TCP/IP Connections](https://www.blackbaud.com/files/support/infinityinstaller/content/installermaster/tkenablenamedpipesandtcpipconnections.htm)

There is also similar issue here [Bitbucket with MS SQL named server](https://community.atlassian.com/t5/Bitbucket-questions/Bitbucket-with-MS-SQL-named-server/qaq-p/979940)

Try and give feed back.

Kind regards,

Mo


author: Van Tor
body: Thanks Moses! I am using MSSQL container and it seems no way that I can find out any where to enable the browser service. It's totally strange why my nodejs apps can use the similar syntax to connect the exact docker MSSQL on my nas? Best


author: Van Tor
body: I did change "**postgresql.conf** " tried both MSSQL and postgres but no luck.


author: Moses Thomas
body: [@Van Tor](/t5/user/viewprofilepage/user-id/3913338)

Remember to restart the postgresql server and check again if no progress then

please show what is in the Configuration file of Postgre there could be some configuration issue.

Kind regards,

Mo


author: Van Tor
body: postgres works fine and the above shared screenshots should be helpful for those Synology NASers. Thank you Mo!


Tags: synology