Updating node problem

Hello. Need to update the node from 1.02 version

  1. I stoped service
  2. The I Was exporting blocks to file with this command
    "sudo -u waves waves export -c /etc/waves/waves.conf -o blockchain "

On this step I Have error:
“Failed to create file ‘blockchain-1739999’: java.io.FileNotFoundException: blockchain-1739999 (Permission denied)”

How can I solve it?

I would just delete data directory completely and download latest blockchain snapshot. You don’t need to export blockchain at all

ok, thanks.
So I delete data directory.

Than I need to do all the steps like when I was installing the node from scratch?

Or I can skip some steps? Can you give more details at what to do please

I suppose you already installed newest node version with sudo dpkg -i command (installing over old version is fine)
After deleting /var/lib/waves/data just do:
sudo wget -qO- http://blockchain.wavesnodes.com/blockchain_last.tar | tar xv -C /var/lib/waves
The downloading process will take some 40 minutes.
After it finishes, just start your node again.
Note: probably next time you will upgrade, you won’t need to get new blockchain. It is needed only when some major changes in the blockchain format are happening

1 Like

Thanks very much. Just in case…
So I can just install new deb over old one? and then delete data folder and thats all?

Basically, yes. In most cases, you have to:

  • stop the node
  • if needed, delete data folder and download new blockchain snapshot (but in 99% cases just skip this step)
  • download new node deb file and install it over old node
  • start node and wait till it starts mining microblocks

entered this comand and got error
tar: /var/li/waves: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

ps. dont know this options - -qo- | tar xv -C

Ok, its donwloading without -qo-

Just copy-paste the command. I see at least 2 mistakes you made

when finished I got htis error

2019-10-29 14:48:22 (3.67 MB/s) - ‘blockchain_last.tar’ saved [36027340800/36027340800]

tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors

Sorry for noob quistions ) im newby here and learning…
copied and got this
tar: data: Cannot mkdir: Permission denied
tar: data/8182989.ldb: Cannot open: No such file or directory

Then I made new data dir in waves dir.
sudo mkdir data

and copied comand wget again
and got this error

tar: data/8183096.ldb: Cannot open: Permission denied
data/8181610.ldb

Obviously, you created data dir with root owner, but tar archive contains blockchain files with waves owner. So you need to change data dir owner and group both to waves before untaring

1 Like

It worked i think! I changed owner to my login (waves… and grouped to sudo)

Then it worked. Thanks for help!

I will write here after I complete downloading and unpacking, when finish last step

PS. Isn it faster to just download the tar file first completly and then unpack it?

Downloading takes some 95% of time and extracting 5%, so, if you do it sequentially, you have 95%+5%. With simultaneous operation you have just 95%. Also, if you are limited in space, an archive and extracted contents might just not fit both

1 Like

Got this ((

It was downloading. But then I was afk turned book off.
When Came back I checked stats of server and saw that I dont have incoming traffic. So I think that dowload finished. CAuse I dont know how to check if everythig is dowloaded.

SO I started waves.service and got this now ((
Hope you can help me resolve this…

/var/lib/waves/data/LOCK - permission denied
Change owner and group to waves and waves, so it will look like this:

$ ls -al /var/lib/waves/
total 628
drwxr-xr-x  4 waves waves   4096 Oct  4 15:45 .
drwxr-xr-x 35 root  root    4096 Oct  4 12:28 ..
drwxr-xr-x  2 waves waves 622592 Oct 30 11:29 data
-rw-r--r--  1 waves waves   5117 Oct 24 21:04 peers.dat
drwxr-xr-x  2 waves waves   4096 Oct  4 12:41 wallet

and

$ ls -al /var/lib/waves/data
total 35794940
drwxr-xr-x 2 waves waves   622592 Oct 30 11:30 .
drwxr-xr-x 4 waves waves     4096 Oct  4 15:45 ..
-rw-r--r-- 1 waves waves  2112369 Sep 19 19:22 000287.ldb
-rw-r--r-- 1 waves waves  2113751 Sep 19 19:22 000288.ldb
.....
-rw-r--r-- 1 waves waves  2113350 Sep 20 07:11 999434.ldb
-rw-r--r-- 1 waves waves  2112385 Sep 20 07:12 999898.ldb
-rw-r--r-- 1 waves waves       17 Oct 26 16:52 CURRENT
-rw-r--r-- 1 waves waves        0 Sep 19 19:20 LOCK
-rw-r--r-- 1 waves waves 53077538 Oct 30 11:30 LOG
-rw-r--r-- 1 waves waves 10440388 Oct 26 16:42 LOG.old
-rw-r--r-- 1 waves waves 28275686 Oct 30 11:30 MANIFEST-7751283
1 Like

my login is wavesadmin. Anyway I need to set owner and group of “data” dir and all inside of it to waves?

Yes, it is no matter what your login is, waves is special user, auto created during .deb installing

Ok ! Now its working! Thank you very much brox!

1 Like

Node began to work…

But in journal I saw this



Then error validating transaction repeated in other transaction…

What can be wrong???

Maybe its temporary until the final height is reached?
Now I see this. Or its working properly now?

This is “normal”. I have the same validation errors sometimes and I reported it to github. My understanding is that latest node versions 1.1.4 and 1.1.5 were written in a hurry and thus not properly tested.
Congrats, you node is mining microblocks now - everything is good!

1 Like