MiniDAPP icon indicating copy to clipboard operation
MiniDAPP copied to clipboard

[SOLVED] Problem with installing the app in MDS (node on Ubuntu server, without desktop)

Open an-trader opened this issue 1 year ago • 4 comments

For participants: Don't take any action until you've read all the way through. The real cause of the problem is at the end. https://github.com/minima-global/MiniDAPP/issues/9#issuecomment-1623557355

I'll try to describe it step by step: After I switched to Mainnet, I did not access the server with the Minima node installed for a long time. Yesterday I found out that the Minima node was down:

  • Doesn't give out status;
  • did not show the version of the node;
  • It does not show the seed-phrase.

Minima node installed in Docker Attempts to restart Docker did nothing:

sudo docker stop minima9001
sudo docker start minima9001

Attempting to run the update script did not give a positive result either:

docker run --name watchtower_runonce -e WATCHTOWER_CLEANUP=true -e WATCHTOWER_TIMEOUT=60s -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once

Trying to resync the node did not solve the problem: archive action:resync host:auto

I decided to try uninstalling the Docker container and reinstalling it and then restore the data from the backup:

sudo docker stop minima9001
sudo docker rm minima9001
sudo rm -rf minimadocker9001

After deleting, I entered the command (with my password for MDS):

docker run -d -e minima_mdspassword=MY_PASSWORD_MDS -e minima_server=true -v ~/minimadocker9001:/home/minima/data -p 9001-9004:9001-9004 --restart unless-stopped --name minima9001 minimaglobal/minima:latest

The command to view the logs: docker logs minima9001 displayed: image

command: docker exec -it minima9001 minima status image

Attempting to check the version:

curl -s 127.0.0.1:9005/status | jq '{'Version':.response.version,'Block height':.response.chain.block,'Block time':.response.chain.time}'

Doesn't give out anything: image

I then tried to log in to MDS using my browser. First I went to port 9004 https://my_server_ip:9004 Got a warning and approved it: image

Then I went to port 9003 https://my_server_ip:9003 I entered my login and got to MDS - there is a blank screen (no apps installed) image

Clicking on the plus sign, I selected the previously downloaded archive with the terminal, from the website: https://minidapps.minima.global/. image

A spinning wheel appeared, which rotates to infinity (the application is not installed): image

⚠️ How to solve this problem? How to restore normal operation of the Minima node

an-trader avatar Jul 04 '23 18:07 an-trader

After reinstalling the Minima node with the following command:

docker run -d -e minima_mdspassword=MY_PASSWORD_MDS -e minima_rpcenable=true -e minima_rpcpassword=MY_PASSWORD_RPC -e minima_server=true -v ~/minimadocker9001:/home/minima/data -p 9001-9004:9001-9004 -p 127. 0.0.0.1:9005:9005 --restart unless-stopped --name minima9001 minimaglobal/minima:latest

The node worked and I was able to restore the data from the backup. Now I can see through my MobaXterm SSH terminal the status of the node and the amount of coins, ⚠️but I still can't install the applications to MDS.

Also when installing a Minima node with the above command I could not add a parameter: -e minima_rpcssl=true For some reason with this parameter the node does not show status and number of coins.

⚠️How can I solve the problem with the installation of applications in MDS?

an-trader avatar Jul 05 '23 00:07 an-trader

I have solved this problem. Simply uninstalling the container and reinstalling it does not help: docker stop minima9001 docker rm minima9001 sudo rm -rf minimadocker9001

docker run -d -e minima_mdspassword=MY_PASSWORD_MDS -e minima_rpcenable=true -e minima_rpcpassword=MY_PASSWORD_RPC -e minima_server=true -v ~minimadocker9001:/home/minima/data -p 9001-9004 -p 127. 0.0.0.1:9005:9005 --restart unless-stopped --name minima9001 minimaglobal/minima:latest

This one does not work.☝🏻

It helps to completely delete everything, roughly speaking, format the VPS and then install everything from scratch. Requires docker Minima to be built from scratch.

image

an-trader avatar Jul 05 '23 10:07 an-trader

After these steps, you must restore the data from the backup. If the backup is fresh, then: restore the file: password:

If the backup is old, then: restoresync file: password:

If the backup was created automatically, it has no password. I used the backup from May 9, 2023 (old, created automatically and is in minimadocker9001) - I used the command restoresync file:minima-backup-1683638985908.bak Or you can do it like this: restoresync file:/home/minima/data/minima-backup-1683638985908.bak My coins were restored and so were the transactions.

If you don't have a backup, you can restore it with the seed phrase like this archive action:resync phrase: "YOUR 24 WORD SEED PHRASE HERE" host:auto keys:1000

Documentation: https://docs.minima.global/docs/runanode/restorefunds

an-trader avatar Jul 05 '23 22:07 an-trader

In my case, the cause of the problem was incorrect port forwarding. I have everything built on LXD containers One LXD container for one node only (so that the problem of one node does not affect other nodes).

In my case: The external IP and external ports are different from the internal IP and internal ports of the LXD containers.

I redirected my external_IP:9033 to internal_IP:9003 and redirected external_IP:9044 to internal_IP:9004

I went to https://внешний_IP:9044 in my browser which redirected to internal_IP:9004 and approved the connection (I turned off the antivirus for a while) Then I went to https://внешний_IP:9033 which redirected to internal_IP:9003 --> entered password and got to empty MDS (no applications). In the browser I pressed F12 and selected Console. From that point, everything made sense - the browser is knocking on port 9034, not port 9044. Redirected the external_IP:9034 to the internal_IP:9004 and the MDS immediately showed all the applications.

image

an-trader avatar Jul 06 '23 11:07 an-trader