Update fails after "FWCloud-Updater" has been updated to 2.0.0 | FWCloud Forum

Update fails after "FWCloud-Updater" has been updated to 2.0.0

webadmin

New member
Hello,

we have installed a FWCloud setup via the install script on a clean Ubuntu 20.04. Now the update prompt was shown after login.
When updating, the updater will freeze here:
  • [09:12:19] - Updating FWCloud-Updater application
  • [09:12:57] - FWCloud-Updater has been updated successfully
  • [09:12:57] - Updating FWCloud-API application
  • [09:12:59] - Waiting for the server to apply updates
The Server only returns 500 (Internal Server Error) for requests like 3030/socket.io/?EIO=4&transport=po...

Where to start debugging the problem?

Thanks!
 

Carles Munyoz

Administrator
Staff member
Hi,
Sorry for the delayed answer.
Which operative system are you using for the installation?

What about to install FWCloud by means of the .deb and .rpm available packages ?

This kind of installation is more easy to maintain.

Greetings.
 

webadmin

New member
Thank you for your feedback. Since it's a free solution, it won't be a problem if support takes a little longer. We are very grateful for your support.

It was installed on a clean Ubuntu 20.04 setup via your script:
curl -k -s https://raw.githubusercontent.com/soltecsis/fwcloud-installer/main/fwcloud-installer.sh -o ./fwcloud-installer.sh && sudo bash ./fwcloud-installer.sh && rm -f ./fwcloud-installer.sh

But it won't be a problem to change this. So what would be the best way switching from the current installation to a .deb based?

Running apt upgrade on the current system does only show an update for fwcloud-agent.
 

Carles Munyoz

Administrator
Staff member

darkowl

New member
Hello.

The auto updater seems to have some dificulties starting services after update.
You can just wait, start the services manually and check for updates again.
 

webadmin

New member
Have you verified this ?
Yes, but it does not solve the problem. It will start 1.9.2 instead of 2.0.

In order to install the FWCloud .deb package version you have to follow the instructions in our website:

For a distribution based on DEB packages like Ubuntu or Debian we only have to execute the following commands:
Running the script "curl -s https://packagecloud.io/install/repositories/SOLTECSIS/FWCloud/script.deb.sh?any=true | sudo bash" and then "apt -y install fwcloud-api fwcloud-ui" will in fact update it to 2.0, but I have the following problem afterwards:

DPKG will show a broken installed package because of

-e ERROR: Executing SQL: create database fwcloud CHARACTER SET utf8 COLLATE utf8_general_ci
ERROR 1007 (HY000) at line 1: Can't create database 'fwcloud'; database exists

As it is an updated system, the databse is already present.
 

Carles Munyoz

Administrator
Staff member
That error is normal because the `fwcloud` database already exists.

Let's try the next ...
As the `fwcloud` user, execute the next commands:
cd /opt/fwcloud/updater
npm run update
systemctl start fwcloud-updater
Then access again the FWCloud user interface and update the other FWCloud modules.
 

webadmin

New member
Just tested this, but :3030/api/updates will also only return a 500 (Internal Server Error) after updater was started
 

Attachments

  • error.JPG (12.2 KB)
    File size
    12.2 KB
    Download
    1

Carles Munyoz

Administrator
Staff member
This is because the fwcloud-updater is not answering.
Can you review the fwcloud-api logs in the directory /opt/fwcloud/api/logs ?
 

webadmin

New member
API Log is showing
2024-11-11 11:28:33|ERROR|Proxying update request: connect ECONNREFUSED ::1:3132
2024-11-11 11:28:33|ERROR|Error: Proxying update request
2024-11-11 11:28:33|ERROR| at UpdateService.proxyUpdate (/opt/fwcloud/api/dist/src/updates/updates.service.js:85:19)
2024-11-11 11:28:33|ERROR| at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-11-11 11:28:33|ERROR| at async UpdateController.proxy (/opt/fwcloud/api/dist/src/controllers/updates/update.controller.js:43:22)
2024-11-11 11:28:33|ERROR| at async /opt/fwcloud/api/dist/src/fonaments/http/router/router.service.js:126:33
2024-11-11 11:28:33|INFO|WebSocket: User connected (ID: UsHiT64EduADrDwQAAAp, IP: ::1, session: o-En5Wg4s8c50ZwXysBhOQy1PQo41kr0)

But updater Log is showing:

2024-11-11 10:18:05|INFO|------- Starting application -------
2024-11-11 10:18:05|INFO|FWCloud Updater v2.0.1 (PID=7900)
2024-11-11 10:18:05|INFO|Listening on https://127.0.0.1:3132

Could it be an IPv6 problem? API is requesting via IPv6, but Updater is only listening on IPv4?
 

Carles Munyoz

Administrator
Staff member
I think that it is a problem with de `localhost` resolution.
We have solved in the new versions, but you can not update for it.
Can you print here the content of your /etc/hosts file ?
 

webadmin

New member
127.0.0.1 localhost
x.x.x.x fwcadmin-vm.*****.de fwcadmin-vm

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
 

webadmin

New member
Thank you very much for your support! This solved all the problems!

Just a question: We are thinking about to switch to a docker based setup. What would be the best migration path from the package based setup to a docker based? Simply importing a backup into the new setup?
 
Top