• V20: 3CX Re-engineered. Get V20 for increased security, better call management, a new admin console and Windows softphone. Learn More.

Solved Weird error message when setting up a new 3CX instance

Status
Not open for further replies.

ovizii

Forum User
Joined
Nov 20, 2017
Messages
55
Reaction score
1
I had setup a cheap 10$ server with a free 3CX license and tested for a couple of months. My company is now ready to move to a proper server and purchase a license. I have setup the new server, installed 3CX and tried importing my backup from the old server. It gets to the last step and then when trying to finish the setup I get this cryptic error message:


btw. I am setting this up on a brand/new setup of Debian 9 as described here: https://www.3cx.com/docs/manual/installing-debian-linux-pbx/

Could this be a problem on the remote site? I haven't yet configured any firewall rules so its unlikely a FW problem.

Code:
Server error
System.Exception: Error in CreatingCloudServerManagementDatabase.sql: Connection refused ---> System.Net.Sockets.SocketException: Connection refused at Npgsql.NpgsqlConnector.Connect(NpgsqlTimeout timeout) at Npgsql.NpgsqlConnector.d__139.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Npgsql.NpgsqlConnector.d__136.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Npgsql.NpgsqlConnection.d__28.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Npgsql.NpgsqlConnection.Open() at PostInstall.DBConnection.get_Connection() at PostInstall.DBConnection.ExecuteScript(String sqlQuery, IDictionary`2 parameters) at _3CXCloudDBManager.DbConnectionExtensions.ExecuteScript(IDBConnection connection, Object configurationStructure, String scriptText, Boolean asResourceName) --- End of inner exception stack trace --- at _3CXCloudDBManager.DbConnectionExtensions.ExecuteScript(IDBConnection connection, Object configurationStructure, String scriptText, Boolean asResourceName) at _3CXCloudDBManager.CloudDBManager.CreateCloudServerManagementDatabase(IDBConnection superuser, CloudServerManagementDatabaseConfiguration configuration) at PostInstall.SetupExecutor.CreateDatabase(Action`1 stateChanged) at PostInstall.SetupExecutor.ExecuteSetup(SetupSettings setupSettings, Action`1 stateChanged, Action`1 errorNotifier) at PbxWebConfigTool.PbxSetupService.CreatePbxInternal(SetupSettings settings)
 
solved on my own, Google seems to indicate its an IPV6 issue. Turning it off now.
 
seems its not that easy, any pointers?
 
I also found some people suggesting uninstalling locales and reinstalling but not seeing any changes.
 
I also gave it a try with the command line setup, yielding in a very similar error:

Code:
Starting database service...

Database service started successfully
Creating database (Single Instance) ...
System.Exception: Error in CreatingCloudServerManagementDatabase.sql: Connection refused ---> System.Net.Sockets.SocketException: Connection refused
   at Npgsql.NpgsqlConnector.Connect(NpgsqlTimeout timeout)
   at Npgsql.NpgsqlConnector.<RawOpen>d__139.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__136.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<Open>d__28.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.Open()
   at PostInstall.DBConnection.get_Connection()
   at PostInstall.DBConnection.ExecuteScript(String sqlQuery, IDictionary`2 parameters)
   at _3CXCloudDBManager.DbConnectionExtensions.ExecuteScript(IDBConnection connection, Object configurationStructure, String scriptText, Boolean asResourceName)
   --- End of inner exception stack trace ---
   at _3CXCloudDBManager.DbConnectionExtensions.ExecuteScript(IDBConnection connection, Object configurationStructure, String scriptText, Boolean asResourceName)
   at _3CXCloudDBManager.CloudDBManager.CreateCloudServerManagementDatabase(IDBConnection superuser, CloudServerManagementDatabaseConfiguration configuration)
   at PostInstall.SetupExecutor.CreateDatabase(Action`1 stateChanged)
   at PostInstall.SetupExecutor.ExecuteSetup(SetupSettings setupSettings, Action`1 stateChanged, Action`1 errorNotifier)
   at PostInstall.Setup.RequestSetupParametersAndExecute(String path, String[] commandLineArguments)
 
Anyone? I have already setup this server from scratch and it didn't help. I basically went to the server provider's dashboard and selected: fresh clean debian 9 install.
 
hmm, I am running Postgresql 9.6
Code:
 apt-cache show postgresql
Package: postgresql
Source: postgresql-common (181+deb9u2)
Version: 9.6+181+deb9u2
Installed-Size: 60

checking the PQ logs:
Code:
cat /var/log/postgresql/postgresql-9.6-main.log

2018-08-20 10:54:17.323 CEST [10840] LOG:  Datenbanksystem ist bereit, um Verbindungen anzunehmen
2018-08-20 10:54:17.776 CEST [10847] [unbekannt]@[unbekannt] LOG:  unvollständiges Startpaket
Basically the second last line is saying: DB ready for connections and the last one translates to:
Code:
[unknown] LOG [unknown] incomplete startup packet

Does that help narrow the issue down?
 
Hello @ovizii

Can you check and tell me if in your /etc/hosts file you have the following entry: 127.0.0.1 localhost
 
  • Like
Reactions: Ebiscuit
Hello @ovizii

Can you check and tell me if in your /etc/hosts file you have the following entry: 127.0.0.1 localhost

OMG that's it. I made a typo.

I had this in my hosts file:
Code:
127.0.0.1 localhost.localdomain
127.0.0.1 localhost

but when I wanted to consolidate that into 1 line I made a typo and it read:
Code:
127.0.1.1 localhost.localdomain localhost
basically I replaced a 0 with a 1

Let me see this afternoon if this fixes my issues.
 
Let us know if that fixes the problem.
 
yes, that fixed it.

I had even checked with netstat to see if postgresql was listening, I just didn't notice that one typo. many, many thanks for spotting that and helping out!
 
Glad to see the issue has been resolved
 
Status
Not open for further replies.

Getting Started - Admin

Latest Posts

Forum statistics

Threads
141,635
Messages
748,985
Members
144,753
Latest member
ChristianNetron
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.