Solved v20 restore failing to fresh Debian 12 machine

Status
Not open for further replies.

mv772

Customer
Joined
Apr 13, 2024
Messages
5
Reaction score
0
Hello,

Looking for some feedback on my issue but I have a VM on a VMWare host that has my existing 3CX running on it. I recently upgraded it tonight from v18 to v20 then took a full backup and saved the backup to my downloads folder.

I then deployed an "LXC Container" on my new Proxmox server host and the container is running Debian 12
I followed steps to getting the "apt" install method it all works fine it asks me "Finish setup in CLI or web UI" I select "1 for web UI" and get to the browser tab
From there I upload the backup from the restore option on this fresh install it works on FQDN then cert then eventually errors out to this error -

Server error​

System.Exception: Error in CreatingCloudServerManagementDatabase.sql: 22023: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII) ---> Npgsql.PostgresException (0x80004005): 22023: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII) at Npgsql.Internal.NpgsqlConnector.g__ReadMessageLong|234_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage) at Npgsql.NpgsqlDataReader.g__ReadMessageSequential|44_0(NpgsqlConnector connector, Boolean async) at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken) at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken) at Npgsql.NpgsqlDataReader.NextResult() at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteScalar(Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteScalar() at PostInstall.DBConnection.ExecuteScriptInternal(NpgsqlConnection connection, String sqlQuery, IDictionary`2 parameters) at PostInstall.DBConnection.ExecuteScript(String sqlQuery, IDictionary`2 parameters) at _3CXCloudDBManager.DbConnectionExtensions.ExecuteScript(IDBConnection connection, Object configurationStructure, String scriptText, Boolean asResourceName) Exception data: Severity: ERROR SqlState: 22023 MessageText: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII) Hint: Use the same encoding as in the template database, or use template0 as template. File: dbcommands.c Line: 1080 Routine: createdb --- 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.CreateCloudServerManagementDatabase(CloudDBManager cloudDbManager, IDBConnection templateConnection) 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)
OK

BELOW IS MY PORT SELECTION ----

Port selection for Web services (HTTPS/HTTP) and VoIP (SIP and Tunnel)​

Select the ports required for the management console, web client and VoIP services. You can leave the default options or choose other ports. Not all ports are permitted and ports cannot be changed after. These ports are automatically opened on your Windows or Linux local firewalls but you will need to port forward these ports on your border firewall device. More information here.

HTTPS. 5001

HTTP 5000.

SIP server. Default 5060.

Tunnel Port. Default 5090.
 

Attachments

  • 3cx error.PNG
    3cx error.PNG
    127.4 KB · Views: 7
Can you create a new VM from within Proxmox instead? KVM is what is supported by 3CX - and they provide a Debian 12 ISO with 3CX pre-installed in your Portal > Downloads, also you would have the ability to live migrate to other nodes in your Proxmox Cluster without affecting 3CX Services by going with a VM instead of a Container. If you are determined to use an LXC Container, try switching Privileged/Un-Privileged Container checkbox.

Related:
https://www.3cx.com/community/threads/3cx-on-a-proxmox-lxc-debian-10-error.86077/
 
Hi there.
As mentioned from the colleague above, virtualisation must be supported, and you will have to go thought the guide here and ensure you meet the requirements.
Once done let us know how it goes.
 
Hi there.
As mentioned from the colleague above, virtualisation must be supported, and you will have to go thought the guide here and ensure you meet the requirements.
Once done let us know how it goes.
Thank you both for your time in responding. I was trying to experiment with the lxc container options to use with 3cx but instead I gave up on that and just installed with the ISO from 3cx.com downloads from the account as suggested.

New issue though! I tried the lxc method so many times I can't use my FQDN anymore and the backup file includes in. In v20 it cant be excluded in the backup I still have the old VM and can login via local IP to take more backups but no option now to exclude the FQDN. Any way around this error? -

Invalid backup file
Certificate Authority Error: ID (429) - too many certificate requests for the same FQDN. This means you have tried to generate a certificate for this FQDN more than 5 times in the last 7 days. If you want this certificate you need to wait until the counter is adjusted. If you cannot wait, you will need to choose another FQDN. To re-install 3CX using the same license key with a different FQDN you need to release your current FQDN to free your license. Follow this guide: https://www.3cx.com/docs/fqdn-management-allocation/

I don't care for the fqdn I am okay with changing it just no options at this point that I can see. Thanks for the help!
 
Okay disregard my posts. I got a solution figured out lucking before upgrading to v20 on the old VM I took a few backups one in which did not include FQDN/Licensing so I setup the new 3CX Vm as "Fresh" and got into the UI and uploaded that old backup from v18 that did not include license/fqdn as mentioned it worked and restored all my stuff! I am 100% good to go. Sorry for the bother and thanks again! :)
 
Great, thank you for the feedback and glad you have worked out and solved the issue.
Keep in mind that in V20 backup file will always include FQDN, so if you wish to use a new FQDN, a new install from scratch is needed.
Have a great week ahead
 
Sounds Great Oleg, appreciate the help you provided 3CX is a great product looking forward to another great year with our system as a small business its been great to us so far.
 
Michael, thank you for your kind words and have a great rest of the year ahead!
 
Status
Not open for further replies.

Forum statistics

Threads
111,953
Messages
589,914
Members
164,849
Latest member
BillyAkansel