elective-stereophonic
elective-stereophonic
[blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
singapore
Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest Stable Nxt Client: Nxt 1.11.15 | Latest Experimental Nxt Client: Nxt 1.12.0e

Pages: 1 2 3 4 [All]

Author Topic: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2  (Read 23519 times)

coretechs

  • Board Moderator
  • Sr. Member
  • ****
  • Karma: +161/-1
  • Offline Offline
  • Posts: 436
    • View Profile

https://nxtportal.org/blog/nxt-in-a-box-rpi2.html

Please direct questions/comments here.  I will try to keep the links updated.


History:
2016.1.27 - updated references to Nxt release 1.7.5
2016.1.31 - added Oracle Java install instructions, removed OpenJDK instructions, added simplified SSL/TLS configuration steps
2016.4.2 - added blockchain download links
2016.4.19 - updated Java & Nxt release versions/links, added Nxt.org link.
2017.2.11 - updated Java & Nxt release versions/links
2017.5.8 - updated screen startup script instructions + Java & Nxt release links
« Last Edit: May 08, 2017, 08:26:48 pm by coretechs »
Logged
https://ardorportal.org - Ardor blockchain explorer | https://nxtportal.org - Nxt blockchain explorer | http://bitcoindoc.com - The Rise and Rise of Bitcoin
ARDOR-T43P-R2K9-8W79-9W2AL | NXT-WY9K-ZMTT-QQTT-3NBL7

yassin54

  • Hero Member
  • *****
  • Karma: +240/-14
  • Offline Offline
  • Posts: 2503
  • I am Homer, Sorry my english is Bad!!
    • View Profile

Thank you very much for this tutorial!!  :-* :-*

Tweeted!! https://twitter.com/MagicNxt/status/684061829346254848  ;)

apenzl

  • Hero Member
  • *****
  • Karma: +247/-10
  • Offline Offline
  • Posts: 2496
    • View Profile
    • Nxter.org

Wonderful! Thanks.

phideas

  • Jr. Member
  • **
  • Karma: +16/-0
  • Offline Offline
  • Posts: 41
    • View Profile
    • Phideas.info | graphic designer and web developer

Good job! Looking forward to your next blog post.
Logged
graphic designer and web developer | NXT-KYNB-JC3D-PRS3-99GP5
www.phideas.info | Telegram: @phideas

Fern

  • Jr. Member
  • **
  • Karma: +15/-3
  • Offline Offline
  • Posts: 86
    • View Profile

Great post. With some tweaks, can this work on my pi 1 Model B or is it best to upgrade to pi 2?
Logged

allwelder

  • Hero Member
  • *****
  • Karma: +196/-13
  • Offline Offline
  • Posts: 1867
  • NxtChina.org
    • View Profile
    • NxtChina.org

Great post. With some tweaks, can this work on my pi 1 Model B or is it best to upgrade to pi 2?
I tested with pi 1 B,worked well. :)
Logged
NxtChina |Weibo |Twitter Donation welcomed:NXT-APL9-66GU-K8LY-B3JJJ

Fern

  • Jr. Member
  • **
  • Karma: +15/-3
  • Offline Offline
  • Posts: 86
    • View Profile

Great post. With some tweaks, can this work on my pi 1 Model B or is it best to upgrade to pi 2?
I tested with pi 1 B,worked well. :)
Thanks, what about the memory and swap files changes?
Logged

crimi

  • Hero Member
  • *****
  • Karma: +122/-11
  • Offline Offline
  • Posts: 863
    • View Profile

good clean tutorial, thanks shared on peerexplorer
Logged

MrCluster87

  • Hero Member
  • *****
  • Karma: +81/-3
  • Offline Offline
  • Posts: 855
    • View Profile
    • youtube

Hi Coretechs!! Really nice tutorial indeed.

I would like to republish it on nxter.org and translate it in our 9 languages beside english. What's your thought?

coretechs

  • Board Moderator
  • Sr. Member
  • ****
  • Karma: +161/-1
  • Offline Offline
  • Posts: 436
    • View Profile

Hi Coretechs!! Really nice tutorial indeed.

I would like to republish it on nxter.org and translate it in our 9 languages beside english. What's your thought?

Thanks!  Translation would be awesome, please feel free to republish.   :)
Logged
https://ardorportal.org - Ardor blockchain explorer | https://nxtportal.org - Nxt blockchain explorer | http://bitcoindoc.com - The Rise and Rise of Bitcoin
ARDOR-T43P-R2K9-8W79-9W2AL | NXT-WY9K-ZMTT-QQTT-3NBL7

macht

  • Newbie
  • *
  • Karma: +0/-0
  • Offline Offline
  • Posts: 4
    • View Profile
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #10 on: January 17, 2016, 12:10:44 am »

Nice tutorial! Only thing I cannot seem to get working is setting up SSL.

After entering this command, (keytool -importkeystore -srckeystore mycert.pkcs12 -srcstoretype PKCS12 -destkeystore keystore) , I typed "storepwd" for all three prompts thereafter.

I receive an error after the third time: (keytool error: java.io.IOException: failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded)

Any help is appreciated!

Logged

coretechs

  • Board Moderator
  • Sr. Member
  • ****
  • Karma: +161/-1
  • Offline Offline
  • Posts: 436
    • View Profile
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #11 on: January 17, 2016, 01:33:42 am »

Nice tutorial! Only thing I cannot seem to get working is setting up SSL.

After entering this command, (keytool -importkeystore -srckeystore mycert.pkcs12 -srcstoretype PKCS12 -destkeystore keystore) , I typed "storepwd" for all three prompts thereafter.

I receive an error after the third time: (keytool error: java.io.IOException: failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded)

Any help is appreciated!

Hmm, I'm not sure what is causing that error.  Perhaps you are referencing a file from an earlier attempt that has a different password?  Have you tried deleting mycert.*, privkey.pem and the keystore and starting from scratch?  I just recreated another test cert (using "storepwd" for every password) on my rpi2 using the steps from the wiki without issue.

Tosch110 reported running into the same error in Riker's thread (https://nxtforum.org/public-nodes-vpss/setting-up-sslhttps-on-a-public-node/20/) perhaps he knows a solution.
Logged
https://ardorportal.org - Ardor blockchain explorer | https://nxtportal.org - Nxt blockchain explorer | http://bitcoindoc.com - The Rise and Rise of Bitcoin
ARDOR-T43P-R2K9-8W79-9W2AL | NXT-WY9K-ZMTT-QQTT-3NBL7

MrCluster87

  • Hero Member
  • *****
  • Karma: +81/-3
  • Offline Offline
  • Posts: 855
    • View Profile
    • youtube
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #12 on: January 21, 2016, 09:41:09 am »

Hi Coretechs!! Really nice tutorial indeed.

I would like to republish it on nxter.org and translate it in our 9 languages beside english. What's your thought?

Thanks!  Translation would be awesome, please feel free to republish.   :)

Published!!! http://nxter.org/how-to-set-up-a-nxt-node-on-a-raspberry-pi-2/

Translations will follow shortly  ;).

Thank you again!!

MrCluster87

  • Hero Member
  • *****
  • Karma: +81/-3
  • Offline Offline
  • Posts: 855
    • View Profile
    • youtube
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #13 on: January 30, 2016, 12:51:39 pm »

Hey!!

Let's say that I want to build a future proof system, so let's say that the Nxt Blockchain would be 15 Gb, is it possible to associate a NAS to this raspberry pi 2 full node config?

Since I'm lazy, I would go with a plug and play solution such as Western Digital WD My Cloud: https://www.youtube.com/watch?v=078xdmH1DiM

what are your suggestions?

RocketBunny

  • Jr. Member
  • **
  • Karma: +5/-2
  • Offline Offline
  • Posts: 65
  • Big engines fan
    • View Profile
    • Stocks.exchange - where real business meet with crypto world
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #14 on: January 30, 2016, 03:51:36 pm »

Hey!!

Let's say that I want to build a future proof system, so let's say that the Nxt Blockchain would be 15 Gb, is it possible to associate a NAS to this raspberry pi 2 full node config?

Since I'm lazy, I would go with a plug and play solution such as Western Digital WD My Cloud: https://www.youtube.com/watch?v=078xdmH1DiM

what are your suggestions?

Just move nxt_db folder to your WD and make symlink from nxt folder.
Logged
NXT: Vadym
https://stocks.exchange
mailto: vk@stocks.exchange

coretechs

  • Board Moderator
  • Sr. Member
  • ****
  • Karma: +161/-1
  • Offline Offline
  • Posts: 436
    • View Profile
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #15 on: January 30, 2016, 05:14:02 pm »

Hey!!

Let's say that I want to build a future proof system, so let's say that the Nxt Blockchain would be 15 Gb, is it possible to associate a NAS to this raspberry pi 2 full node config?

Since I'm lazy, I would go with a plug and play solution such as Western Digital WD My Cloud: https://www.youtube.com/watch?v=078xdmH1DiM

what are your suggestions?

Just move nxt_db folder to your WD and make symlink from nxt folder.

Good suggestion.  Step-by-step instructions (assuming your external drive is already mounted):

Code: [Select]
mv ~/nxt/nxt_db /path/to/WD_mountpoint/
ln -s /path/to/WD_mountpoint/nxt_db/ ~/nxt/nxt_db



If you don't want to use a symlink you can configure a different database path in your nxt.properties file using the nxt.dbUrl configuration option instead.  Note that you would still need to move the nxt_db directory to your external disk first.

Code: [Select]
nxt.dbUrl=jdbc:h2:/path/to/WD_mountpoint/nxt_db/nxt;DB_CLOSE_ON_EXIT=FALSE;MVCC=TRUE;MV_STORE=FALSE
Logged
https://ardorportal.org - Ardor blockchain explorer | https://nxtportal.org - Nxt blockchain explorer | http://bitcoindoc.com - The Rise and Rise of Bitcoin
ARDOR-T43P-R2K9-8W79-9W2AL | NXT-WY9K-ZMTT-QQTT-3NBL7

penoze

  • Jr. Member
  • **
  • Karma: +4/-1
  • Offline Offline
  • Posts: 69
    • View Profile
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #16 on: January 31, 2016, 02:19:14 pm »

trying out now  ;D
This is also the first time i use a raspberry.

Maybe this is a n00b question but what i must fill in here:

The following is an example configuration file:

nxt.myAddress=12.34.56.78
nxt.apiServerHost=0.0.0.0
nxt.allowedBotHosts=*
Logged
Altinvest
Asset ID: 9923803162541911347

coretechs

  • Board Moderator
  • Sr. Member
  • ****
  • Karma: +161/-1
  • Offline Offline
  • Posts: 436
    • View Profile
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #17 on: January 31, 2016, 02:23:05 pm »

trying out now  ;D
This is also the first time i use a raspberry.

Maybe this is a n00b question but what i must fill in here:

The following is an example configuration file:

nxt.myAddress=12.34.56.78
nxt.apiServerHost=0.0.0.0
nxt.allowedBotHosts=*


You only need to put your public IP address for nxt.myAddress if you opened the port on your firewall.  Otherwise you can remove that parameter and leave the other two as they are.
Logged
https://ardorportal.org - Ardor blockchain explorer | https://nxtportal.org - Nxt blockchain explorer | http://bitcoindoc.com - The Rise and Rise of Bitcoin
ARDOR-T43P-R2K9-8W79-9W2AL | NXT-WY9K-ZMTT-QQTT-3NBL7

coretechs

  • Board Moderator
  • Sr. Member
  • ****
  • Karma: +161/-1
  • Offline Offline
  • Posts: 436
    • View Profile
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #18 on: January 31, 2016, 02:38:54 pm »

I'm in the process of updating the post to recommend Oracle Java instead of OpenJDK for performance reasons.

If you have already installed OpenJDK, it's not too difficult to remove it.  Stop the Nxt server and run the following:

Code: [Select]
sudo apt-get remove openjdk-8-jre
sudo apt-get autoremove

Download the Oracle JDK version for Linux ARM 32 Hard Float ABI from here:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

To use wget you have to include a header to accept the Oracle license:
Code: [Select]
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/8u71-b15/jdk-8u71-linux-arm32-vfp-hflt.tar.gz

Extract the file:
Code: [Select]
tar xvzf jdk-8u71-linux-arm32-vfp-hflt.tar.gz

Rename and move the extracted directory:
Code: [Select]
sudo mv jdk1.8.0_71/ /usr/local/java

Update your system to use java at this location:
Code: [Select]
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/bin/javac" 1
sudo update-alternatives --set java /usr/local/java/bin/java
sudo update-alternatives --set javac /usr/local/java/bin/javac

Set your environment variables:
Code: [Select]
sudo nano /etc/profile

Add the following to the end of the file:
Code: [Select]
JAVA_HOME=/usr/local/java
JRE_HOME=$JAVA_HOME/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
export JAVA_HOME
export JRE_HOME
export PATH

Reload /etc/profile and check the java version:
Code: [Select]
source /etc/profile
java -version

If everything is correct you should see the following output:

java version "1.8.0_71"
Java(TM) SE Runtime Environment (build 1.8.0_71-b15)
Java HotSpot(TM) Client VM (build 25.71-b15, mixed mode)

When new versions of Oracle Java are released, you can simply extract them and overwrite the directory at /usr/local/java.
Logged
https://ardorportal.org - Ardor blockchain explorer | https://nxtportal.org - Nxt blockchain explorer | http://bitcoindoc.com - The Rise and Rise of Bitcoin
ARDOR-T43P-R2K9-8W79-9W2AL | NXT-WY9K-ZMTT-QQTT-3NBL7

penoze

  • Jr. Member
  • **
  • Karma: +4/-1
  • Offline Offline
  • Posts: 69
    • View Profile
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #19 on: January 31, 2016, 02:47:23 pm »

trying out now  ;D
This is also the first time i use a raspberry.

Maybe this is a n00b question but what i must fill in here:

The following is an example configuration file:

nxt.myAddress=12.34.56.78
nxt.apiServerHost=0.0.0.0
nxt.allowedBotHosts=*


You only need to put your public IP address for nxt.myAddress if you opened the port on your firewall.  Otherwise you can remove that parameter and leave the other two as they are.

okay if i fill in:

nxt.myAddress=(my ipadress)
nxt.apiServerHost=0.0.0.0
nxt.allowedBotHosts=*

It should be good?
Logged
Altinvest
Asset ID: 9923803162541911347

coretechs

  • Board Moderator
  • Sr. Member
  • ****
  • Karma: +161/-1
  • Offline Offline
  • Posts: 436
    • View Profile
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #20 on: January 31, 2016, 03:22:30 pm »

okay if i fill in:

nxt.myAddress=(my ipadress)
nxt.apiServerHost=0.0.0.0
nxt.allowedBotHosts=*

It should be good?

Yes.  I've updated the post to clarify that step.  I see now that the 12.34.56.78 was somewhat confusing.
Logged
https://ardorportal.org - Ardor blockchain explorer | https://nxtportal.org - Nxt blockchain explorer | http://bitcoindoc.com - The Rise and Rise of Bitcoin
ARDOR-T43P-R2K9-8W79-9W2AL | NXT-WY9K-ZMTT-QQTT-3NBL7

penoze

  • Jr. Member
  • **
  • Karma: +4/-1
  • Offline Offline
  • Posts: 69
    • View Profile
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #21 on: January 31, 2016, 03:30:03 pm »

okay if i fill in:

nxt.myAddress=(my ipadress)
nxt.apiServerHost=0.0.0.0
nxt.allowedBotHosts=*

It should be good?

Yes.  I've updated the post to clarify that step.  I see now that the 12.34.56.78 was somewhat confusing.

Thanks,

I start over from the beginning of the tutorial.
I think i make some more faults  :)
When i say exit i can't save this  :(.

kind regards,
Logged
Altinvest
Asset ID: 9923803162541911347

allwelder

  • Hero Member
  • *****
  • Karma: +196/-13
  • Offline Offline
  • Posts: 1867
  • NxtChina.org
    • View Profile
    • NxtChina.org
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #22 on: February 03, 2016, 12:23:47 pm »

Hi,coretechs
If start run.sh without using nohup command ,and when i close putty,seems the NRS/Forger will be closed too,right?

The problem is I can not start run.sh with
Code: [Select]
nohup ./run.sh &
Any suggestion?
Thanks.
Logged
NxtChina |Weibo |Twitter Donation welcomed:NXT-APL9-66GU-K8LY-B3JJJ

websioux

  • Sr. Member
  • ****
  • Karma: +69/-1
  • Offline Offline
  • Posts: 343
  • Great changes grow bottom up
    • View Profile
    • Scriba.io the Blockchain Scribe
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #23 on: February 03, 2016, 01:13:53 pm »

Why can't you use nohup ?
Otherwise, you could try screen.
Some explainations here : http://superuser.com/questions/871869/running-scripts-independently-on-raspberry-pi
Logged
Secret Miner <= communicate with style | NotBot <= timestamp digital docs

verymuchso

  • Hero Member
  • *****
  • Karma: +118/-2
  • Offline Offline
  • Posts: 549
    • View Profile
    • HEAT Ledger
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #24 on: February 03, 2016, 01:31:54 pm »

@CoreTechs

Have you tried upstart to run NXT?
We used to use god in the past to both auto start NXT at server start and to keep it up once it dies for whatever reason.

But recently we've switched to upstart and i'd recommend it to anyone.
The idea is you create an `upstart` script for NXT (see example below) the script should be put here /etc/init/nxt.conf then you can simply `start nxt` or `stop nxt` and when it dies it's restarted.

The link points to a part of our chef setup that we use to manage all our servers from but if you remove the parts between `<% if node[:ssmtp] then %>` and `<% else %> ` you'll end up with a simple upstart for NXT. The parts you'll remove are the bits we use to get notified through email whenever one of our nodes goes down.

https://github.com/fimkrypto/fimk_chef_repo/blob/master/cookbooks/nxt/templates/default/nxt.conf.erb
[the erb extension is a ruby thing used in chef, the file should be named nxt.conf]
Logged
HEAT: DEX | SDK | HOME

verymuchso

  • Hero Member
  • *****
  • Karma: +118/-2
  • Offline Offline
  • Posts: 549
    • View Profile
    • HEAT Ledger
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #25 on: February 03, 2016, 01:36:29 pm »

Just realized we compile our NXT ourselves (since we use NXT+) so this part..

Code: [Select]
exec java -cp nxt.jar:lib/*:conf nxt.Nxt
is incorrect, it will not work for standard NXT distributions.

use this way to start standard NXT instead

https://bitbucket.org/JeanLucPicard/nxt/raw/df31dfb622d51b0e6074d85c6a57528eb6895bc9/run.sh
Logged
HEAT: DEX | SDK | HOME

coretechs

  • Board Moderator
  • Sr. Member
  • ****
  • Karma: +161/-1
  • Offline Offline
  • Posts: 436
    • View Profile
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #26 on: February 03, 2016, 02:10:20 pm »

Hi,coretechs
If start run.sh without using nohup command ,and when i close putty,seems the NRS/Forger will be closed too,right?

The problem is I can not start run.sh with
Code: [Select]
nohup ./run.sh &
Any suggestion?
Thanks.

That should work and run in the background.  You can confirm by watching the nxt log file:

Code: [Select]
tail -f ~/nxt/logs/nxt.log
Personally I recommend using screen instead of running it as a background job w/nohup.  I included instructions in the blog article near the bottom.  With screen, you would instead run:

Code: [Select]
screen -mS nxt ./run.sh
This would start the Nxt server in a screen session named "nxt".  You can then detach from the screen if you press CTRL-A, D and safely exit putty.  The screen will run in the background, so you can reconnect later and re-attach to the screen by typing:

Code: [Select]
screen -r nxt
« Last Edit: February 03, 2016, 08:45:57 pm by coretechs, Reason: detach screen command »
Logged
https://ardorportal.org - Ardor blockchain explorer | https://nxtportal.org - Nxt blockchain explorer | http://bitcoindoc.com - The Rise and Rise of Bitcoin
ARDOR-T43P-R2K9-8W79-9W2AL | NXT-WY9K-ZMTT-QQTT-3NBL7

abctc

  • Hero Member
  • *****
  • Karma: +148/-13
  • Offline Offline
  • Posts: 1396
    • View Profile
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #27 on: February 03, 2016, 08:26:16 pm »

... You can then detach from the screen if you press CTRL-A, CTRL-D and safely exit putty.
- I believe " CTRL-A then 'd' " (detach screen from terminal).
Logged
Welcome to the Nxt generation of crypto!   Magis quam Moneta (More than a Coin)
"Do not worry, it is an attack" (c) Jean-Luc

coretechs

  • Board Moderator
  • Sr. Member
  • ****
  • Karma: +161/-1
  • Offline Offline
  • Posts: 436
    • View Profile
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #28 on: February 03, 2016, 08:46:18 pm »

... You can then detach from the screen if you press CTRL-A, CTRL-D and safely exit putty.
- I believe " CTRL-A then 'd' " (detach screen from terminal).

Fixed, thanks.
Logged
https://ardorportal.org - Ardor blockchain explorer | https://nxtportal.org - Nxt blockchain explorer | http://bitcoindoc.com - The Rise and Rise of Bitcoin
ARDOR-T43P-R2K9-8W79-9W2AL | NXT-WY9K-ZMTT-QQTT-3NBL7

beikeni

  • Newbie
  • *
  • Karma: +0/-0
  • Offline Offline
  • Posts: 5
    • View Profile
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #29 on: February 25, 2016, 11:09:04 am »

Forgive my ignorance. I'm new in the world of cryptocurrencies and my knowledge and understanding are still pretty incomplete.
My question is: NXT being pre-mined and NXT holders getting rewarded on a POS system, running a dedicated node as explained in this tutorial would benefit the host in some way or it would be exclusively to the purpose of helping and offering support to the NXT community?

Thanks

Beikeni
Logged

MrV777

  • Hero Member
  • *****
  • Karma: +115/-4
  • Offline Offline
  • Posts: 988
    • View Profile
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #30 on: February 25, 2016, 02:56:05 pm »

Forgive my ignorance. I'm new in the world of cryptocurrencies and my knowledge and understanding are still pretty incomplete.
My question is: NXT being pre-mined and NXT holders getting rewarded on a POS system, running a dedicated node as explained in this tutorial would benefit the host in some way or it would be exclusively to the purpose of helping and offering support to the NXT community?

Thanks

Beikeni

If you run a Hallmarked node you can earn NSC, which you can then sell for NXT if you wanted to
Logged
NXT: NXT-BK2J-ZMY4-93UY-8EM9V
NXT nodes: 209.222.98.250, 216.155.128.10

beikeni

  • Newbie
  • *
  • Karma: +0/-0
  • Offline Offline
  • Posts: 5
    • View Profile
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #31 on: February 26, 2016, 02:13:59 am »

Forgive my ignorance. I'm new in the world of cryptocurrencies and my knowledge and understanding are still pretty incomplete.
My question is: NXT being pre-mined and NXT holders getting rewarded on a POS system, running a dedicated node as explained in this tutorial would benefit the host in some way or it would be exclusively to the purpose of helping and offering support to the NXT community?

Thanks

Beikeni

If you run a Hallmarked node you can earn NSC, which you can then sell for NXT if you wanted to

Is there a way to calculate profitability?
Logged

8

  • Full Member
  • ***
  • Karma: +6/-6
  • Offline Offline
  • Posts: 122
  • English-Chinese translation Service
    • View Profile

I have some problem to run the node. this is the info:

2016-06-09 22:19:11 INFO: nxt.cjdnsOnly = "false"
2016-06-09 22:19:11 INFO: nxt.ignorePeerAnnouncedAddress = "false"
2016-06-09 22:19:11 INFO: nxt.trimDerivedTables = "true"
2016-06-09 22:19:11 INFO: nxt.numberOfForkConfirmations = "2"
2016-06-09 22:19:11 INFO: nxt.trimFrequency = "1000"
2016-06-09 22:19:11 INFO: nxt.disableGetMoreBlocksThread not defined, assuming false
2016-06-09 22:19:11 INFO: nxt.enablePublicKeyCache = "true"
2016-06-09 22:19:11 INFO: nxt.disablePeerConnectingThread not defined, assuming false
2016-06-09 22:19:11 INFO: nxt.disablePeerUnBlacklistingThread not defined, assuming false
2016-06-09 22:19:11 INFO: nxt.disableGetMorePeersThread not defined, assuming false
2016-06-09 22:19:11 INFO: nxt.peerServerHost = "0.0.0.0"
2016-06-09 22:19:11 INFO: nxt.peerServerIdleTimeout = "30000"
2016-06-09 22:19:11 INFO: nxt.enablePeerServerDoSFilter = "true"
2016-06-09 22:19:11 INFO: nxt.peerServerDoSFilter.maxRequestsPerSec = "30"
2016-06-09 22:19:11 INFO: nxt.peerServerDoSFilter.delayMs = "1000"
2016-06-09 22:19:11 INFO: nxt.peerServerDoSFilter.maxRequestMs = "300000"
2016-06-09 22:19:11 INFO: shutting down sendingService
2016-06-09 22:19:11 INFO: shutting down peersService
2016-06-09 22:19:11 INFO: Nxt server 1.8.3 stopped.
Logged
My crypto blog: http://coinour.com

kakachi

  • Newbie
  • *
  • Karma: +0/-0
  • Offline Offline
  • Posts: 5
    • View Profile

more of a windows guy so is there a guide for setting up a raspberry pi windows type forger?
Logged

coretechs

  • Board Moderator
  • Sr. Member
  • ****
  • Karma: +161/-1
  • Offline Offline
  • Posts: 436
    • View Profile

I have some problem to run the node. this is the info:

2016-06-09 22:19:11 INFO: nxt.cjdnsOnly = "false"
2016-06-09 22:19:11 INFO: nxt.ignorePeerAnnouncedAddress = "false"
2016-06-09 22:19:11 INFO: nxt.trimDerivedTables = "true"
2016-06-09 22:19:11 INFO: nxt.numberOfForkConfirmations = "2"
2016-06-09 22:19:11 INFO: nxt.trimFrequency = "1000"
2016-06-09 22:19:11 INFO: nxt.disableGetMoreBlocksThread not defined, assuming false
2016-06-09 22:19:11 INFO: nxt.enablePublicKeyCache = "true"
2016-06-09 22:19:11 INFO: nxt.disablePeerConnectingThread not defined, assuming false
2016-06-09 22:19:11 INFO: nxt.disablePeerUnBlacklistingThread not defined, assuming false
2016-06-09 22:19:11 INFO: nxt.disableGetMorePeersThread not defined, assuming false
2016-06-09 22:19:11 INFO: nxt.peerServerHost = "0.0.0.0"
2016-06-09 22:19:11 INFO: nxt.peerServerIdleTimeout = "30000"
2016-06-09 22:19:11 INFO: nxt.enablePeerServerDoSFilter = "true"
2016-06-09 22:19:11 INFO: nxt.peerServerDoSFilter.maxRequestsPerSec = "30"
2016-06-09 22:19:11 INFO: nxt.peerServerDoSFilter.delayMs = "1000"
2016-06-09 22:19:11 INFO: nxt.peerServerDoSFilter.maxRequestMs = "300000"
2016-06-09 22:19:11 INFO: shutting down sendingService
2016-06-09 22:19:11 INFO: shutting down peersService
2016-06-09 22:19:11 INFO: Nxt server 1.8.3 stopped.

Hmm, this doesn't really tell much other than that it stopped.  Didn't see this post until today, were you able to resolve?

more of a windows guy so is there a guide for setting up a raspberry pi windows type forger?

Sorry I don't have a Windows guide.  This guide is for building a dedicated Raspberry Pi Nxt server that you can access from any computer on your network.  Once it's set up, you can use your Windows computer to access it from your web browser.
Logged
https://ardorportal.org - Ardor blockchain explorer | https://nxtportal.org - Nxt blockchain explorer | http://bitcoindoc.com - The Rise and Rise of Bitcoin
ARDOR-T43P-R2K9-8W79-9W2AL | NXT-WY9K-ZMTT-QQTT-3NBL7

smabuki

  • Newbie
  • *
  • Karma: +0/-0
  • Offline Offline
  • Posts: 3
    • View Profile

Hi,

First of all, thanks a ton for the tutorial. I am a total N00b and I think I got the server running (it's doing something :))

But, when I go to http://[IP]:7876 and try to register it gives me "Server Connection Error Not allowed." prompt. What am I doing wrong?

Thanks,
Alex
Logged

Nextshares

  • Full Member
  • ***
  • Karma: +6/-1
  • Offline Offline
  • Posts: 152
    • View Profile

Hi,

First of all, thanks a ton for the tutorial. I am a total N00b and I think I got the server running (it's doing something :))

But, when I go to http://[IP]:7876 and try to register it gives me "Server Connection Error Not allowed." prompt. What am I doing wrong?

Thanks,
Alex

Have a try on this and see

https://nxtforum.org/general-discussion/localhost-and-pc-ip/
Logged

NxtSwe

  • Hero Member
  • *****
  • Karma: +124/-9
  • Offline Offline
  • Posts: 657
    • View Profile

Hi,

First of all, thanks a ton for the tutorial. I am a total N00b and I think I got the server running (it's doing something :))

But, when I go to http://[IP]:7876 and try to register it gives me "Server Connection Error Not allowed." prompt. What am I doing wrong?

Thanks,
Alex
Are you try to access this from another computer than your rasperry?
If so I think you need to set the nxt.allowedUserHosts property in your config file.

The default is:
Code: [Select]
nxt.allowedUserHosts=127.0.0.1; localhost; [0:0:0:0:0:0:0:1]; so it can only be access from the same local machine.
Logged
Check out the NxtLib, the .NET Framework API for the Nxt platform.

smabuki

  • Newbie
  • *
  • Karma: +0/-0
  • Offline Offline
  • Posts: 3
    • View Profile

Yes. I try to access it via my Mac.

I changed it to that, is that correct?

nxt.myAddress=192.##.###.###
nxt.apiServerHost=0.0.0.0
nxt.allowedBotHosts=*≈
nxt.allowedUserHosts=12#.#.#.#; localhost; 192.###.#.###; [0:0:0:0:0:0:0:1];

Doesn't work still.

When I go to [IP]:7876/test, I get HTTP error 403 / Forbidden

Thanks and sorry in advance
Logged

NxtSwe

  • Hero Member
  • *****
  • Karma: +124/-9
  • Offline Offline
  • Posts: 657
    • View Profile

Yes. I try to access it via my Mac.

I changed it to that, is that correct?

nxt.myAddress=192.##.###.###
nxt.apiServerHost=0.0.0.0
nxt.allowedBotHosts=*≈
nxt.allowedUserHosts=12#.#.#.#; localhost; 192.###.#.###; [0:0:0:0:0:0:0:1];

Doesn't work still.

When I go to [IP]:7876/test, I get HTTP error 403 / Forbidden

Thanks and sorry in advance
Hi,

I'm not sure what could be the problem.
Have you restarted the node after updating the config?
What does it work if you put an asterisk ( * ) after allowedUserHosts ?
Also, what is that ≈ character after allowedBotHosts?

On a side note, nxt.myAddress should be your public address as seen on the internet, 192.xxxxxxxx is your internal (local network) address, but I don't think that is the problem here.
Logged
Check out the NxtLib, the .NET Framework API for the Nxt platform.

shugo

  • Jr. Member
  • **
  • Karma: +5/-0
  • Offline Offline
  • Posts: 75
    • View Profile

I have a problem with my node after trying to hallmark it and then backing up my config.

Now my Status on localhost Client is "forging" but when I use peerexplorer my node is not listed anymore.

Is there a way to fix this? How can I shut down my nxt Server completely on Linux? i restarted and did not start my node again but my localhost Client is still working which means that there's something running in the Background right?

Thanks for your help
Logged

gh

  • Full Member
  • ***
  • Karma: +19/-2
  • Offline Offline
  • Posts: 202
    • View Profile
    • NXT Chart
« Last Edit: February 05, 2017, 01:08:00 pm by gh »
Logged

lurker10

  • Hero Member
  • *****
  • Karma: +168/-33
  • Offline Offline
  • Posts: 1334
    • View Profile

How can I shut down my nxt Server completely on Linux?
Try: ps xua | grep java
If there is a Java process listed with id-number, for example 8050, stop it with: kill -9 8050

Just a suggestion, use kill -15 to stop processes. the -9 switch will kill it off instantly, -15 allows the program time to save data, resulting in a good database afterwards vs sometimes corrupt database using -9.
Logged
Run a node - win a prize! "Lucky node" project jar: NXT-8F28-EDVE-LPPX-HY4E7

shugo

  • Jr. Member
  • **
  • Karma: +5/-0
  • Offline Offline
  • Posts: 75
    • View Profile

It didnt fix my Problem. the Node is still not showing on peerexplorer and if I try to acces from the Internet with my external IP, i cannot Access the node (it worked earlier).
Port 7874 is forwarded for my IP.

Any ideas?

edit:
Ok, my Firewall says, the the port is closed but I opened it, its just suddendly not working anymore:(
« Last Edit: July 07, 2016, 12:46:26 pm by shugo »
Logged

gh

  • Full Member
  • ***
  • Karma: +19/-2
  • Offline Offline
  • Posts: 202
    • View Profile
    • NXT Chart
« Last Edit: February 05, 2017, 01:07:47 pm by gh »
Logged

shugo

  • Jr. Member
  • **
  • Karma: +5/-0
  • Offline Offline
  • Posts: 75
    • View Profile

yes my raspi has an internal IP, same since beginning, and it worked with it.

what I changed once is that I openend port 7874-7876 instead of only 7874 but i changed i back and now the port is not open anymore altough it should be open in my router Settings?! I already restarted the router.

Do you think changing the internal IP of my raspi could work?
Logged

gh

  • Full Member
  • ***
  • Karma: +19/-2
  • Offline Offline
  • Posts: 202
    • View Profile
    • NXT Chart
« Last Edit: February 05, 2017, 01:04:45 pm by gh »
Logged

shugo

  • Jr. Member
  • **
  • Karma: +5/-0
  • Offline Offline
  • Posts: 75
    • View Profile

Do you think changing the internal IP of my raspi could work?
No, it should work with any internal IP, typically 192.168.x.x. In my router I have two port mappings, one for 7874 and one for 7876. Try with a port scanner, for example this one:
If you enter port 7874, it should return with a message: x.x.x.x is responding on port 7874, where x.x.x.x is your external IP address, see for example:

the port is closed while others i forwarded are open. Same Settings on router, one works, the other not. somethings wrong here:(


EDIT:
The port Problem is now fixed. Port checker says the ports are open (they had to many pings or so?!). But I Still do not appear on peerexplorer(dot)com ? this is important for a working node, right?

Edit 2:

I did hallmark my Nxt Node and now everything is working fine! Finally:)
« Last Edit: July 07, 2016, 02:24:09 pm by shugo »
Logged

beammeup

  • Jr. Member
  • **
  • Karma: +0/-0
  • Offline Offline
  • Posts: 24
    • View Profile

Hi all I am new here. I am setting up a pi2.  I have changed the swapfile to 1024 but when I try to restart the service I get an error 'No doemon to (force-)re[start load on dphys-swapfile' Will it restart if I reboot? oris this a problem?
Logged

beammeup

  • Jr. Member
  • **
  • Karma: +0/-0
  • Offline Offline
  • Posts: 24
    • View Profile

One more thing , my ISP used dynamic ip addresses. Will that make a difference? will this run OK? It seems to be working so far
Logged

lurker10

  • Hero Member
  • *****
  • Karma: +168/-33
  • Offline Offline
  • Posts: 1334
    • View Profile

One more thing , my ISP used dynamic ip addresses. Will that make a difference? will this run OK? It seems to be working so far

Is your intent to run a public node?
If so, you must do two things:
a) open port 7874 on your router to the world;
b) sing up with a dynamic dns service like http://freeddns.noip.com/ and announce your dns address in the nxt.myAddress property.

Create a file nxt/conf/nxt.properties and put:
nxt.myAddress=yourDNSAddress

See example at https://nxtportal.org/peers/
someone has announced their address nxt.noip.me

For a private forging node you needn't do any of these.

Join the lottery in my signature if you run a public node and win coins by renting out your computing resources.
« Last Edit: July 10, 2016, 04:43:21 pm by lurker10 »
Logged
Run a node - win a prize! "Lucky node" project jar: NXT-8F28-EDVE-LPPX-HY4E7

beammeup

  • Jr. Member
  • **
  • Karma: +0/-0
  • Offline Offline
  • Posts: 24
    • View Profile

my intent is just to get it working for now then do some forging. Then set up a hallmark node. I am pretty new at this. I have set it up as per the instructions, all seems OK the dashboard is almost complete downloading the blockchain. When I ./run.sh it goes for about 30 seconds the NXT server stops. Is that normal or should it be running in the background on terminal?
Logged

gh

  • Full Member
  • ***
  • Karma: +19/-2
  • Offline Offline
  • Posts: 202
    • View Profile
    • NXT Chart
« Last Edit: February 05, 2017, 03:12:11 pm by gh »
Logged

lurker10

  • Hero Member
  • *****
  • Karma: +168/-33
  • Offline Offline
  • Posts: 1334
    • View Profile

my intent is just to get it working for now then do some forging. Then set up a hallmark node. I am pretty new at this. I have set it up as per the instructions, all seems OK the dashboard is almost complete downloading the blockchain. When I ./run.sh it goes for about 30 seconds the NXT server stops. Is that normal or should it be running in the background on terminal?

When you say the NXT server stops, do you see the logged message "NXT server stopped"?
Logged
Run a node - win a prize! "Lucky node" project jar: NXT-8F28-EDVE-LPPX-HY4E7

beammeup

  • Jr. Member
  • **
  • Karma: +0/-0
  • Offline Offline
  • Posts: 24
    • View Profile

Yes it says
shutting down sendingservice
shutting down peersservice
Nxt server 1.9.2 stopped.

I had the screen set but I changed it back so I could read the log
Logged

lurker10

  • Hero Member
  • *****
  • Karma: +168/-33
  • Offline Offline
  • Posts: 1334
    • View Profile

Yes it says
shutting down sendingservice
shutting down peersservice
Nxt server 1.9.2 stopped.

I had the screen set but I changed it back so I could read the log

You should post more of the log file tail.
Logged
Run a node - win a prize! "Lucky node" project jar: NXT-8F28-EDVE-LPPX-HY4E7

beammeup

  • Jr. Member
  • **
  • Karma: +0/-0
  • Offline Offline
  • Posts: 24
    • View Profile

ok
2016-07-11 07:46:05 INFO: nxt.peerServerHost = "0.0.0.0"
2016-07-11 07:46:05 INFO: nxt.peerServerIdleTimeout = "30000"
2016-07-11 07:46:05 INFO: nxt.enablePeerServerDoSFilter = "true"
2016-07-11 07:46:05 INFO: nxt.peerServerDoSFilter.maxRequestsPerSec = "30"
2016-07-11 07:46:05 INFO: nxt.peerServerDoSFilter.delayMs = "1000"
2016-07-11 07:46:05 INFO: nxt.peerServerDoSFilter.maxRequestMs = "300000"
2016-07-11 07:46:05 INFO: shutting down sendingService
2016-07-11 07:46:05 INFO: shutting down peersService
2016-07-11 07:46:05 INFO: Nxt server 1.9.2 stopped.
It synced OK last night and was working until I installed screen and autostartup
Logged

beammeup

  • Jr. Member
  • **
  • Karma: +0/-0
  • Offline Offline
  • Posts: 24
    • View Profile

Seems to be working OK now. just rebooted again now its working.
Logged

kpstolk

  • Jr. Member
  • **
  • Karma: +2/-1
  • Offline Offline
  • Posts: 28
    • View Profile

Thanks for the nice tutorial!  :)

I guess the double wget command under the Installing Java section is a typo?

Just today a new version was released, maybe you can update the link as well.
https://nxtforum.org/nrs-releases/nrs-v1-10-2/
« Last Edit: August 29, 2016, 06:17:11 pm by kpstolk »
Logged

coretechs

  • Board Moderator
  • Sr. Member
  • ****
  • Karma: +161/-1
  • Offline Offline
  • Posts: 436
    • View Profile
Re: [blog] Nxt-in-a-box: How to setup a dedicated Nxt node on a Raspberry Pi 2
« Reply #59 on: February 11, 2017, 05:58:48 pm »

Updated links for java 1.8.0_121 and Nxt 1.11.3.
Logged
https://ardorportal.org - Ardor blockchain explorer | https://nxtportal.org - Nxt blockchain explorer | http://bitcoindoc.com - The Rise and Rise of Bitcoin
ARDOR-T43P-R2K9-8W79-9W2AL | NXT-WY9K-ZMTT-QQTT-3NBL7

ellave

  • Jr. Member
  • **
  • Karma: +1/-0
  • Offline Offline
  • Posts: 15
    • View Profile

Hi, thanks for a great guide it all went well for me & was able to run the server the first time.  After which i continued the guide & configured SSL, Screen & Cron task however not I cant start the server, as you can see below (it never autostarted after reboot).

Any advice?

Thanks

pi@raspberrypi:~/nxt $ ./run.sh
Error: Could not find or load main class screen
pi@raspberrypi:~/nxt $ ls
3RD-PARTY-LICENSES.txt  COPYING.txt          mint.sh             package.sh      start.sh
addons                  DEVELOPERS-GUIDE.md  nxt_db              README.md       stop.sh
AUTHORS.txt             Dockerfile           nxtdesktop.policy   README.txt      USERS-GUIDE.md
changelogs              html                 nxt.exe             resource        win-compile.sh
classes                 jar.sh               nxt.jar             run.bat         win-javadoc.sh
compact.bat             javadoc.sh           nxt.policy          run-desktop.sh  win-package.sh
compact.sh              lib                  nxtservice.exe      run.sh
compile.sh              LICENSE.txt          nxtservice.jar      run-tor.sh
conf                    logs                 NXT_Wallet.url      sign.sh
contrib                 mint.bat             OPERATORS-GUIDE.md  src
pi@raspberrypi:~/nxt $ run.sh
-bash: run.sh: command not found
Logged

lurker10

  • Hero Member
  • *****
  • Karma: +168/-33
  • Offline Offline
  • Posts: 1334
    • View Profile

To automatically start Nxt after reboot, run crontab -e, enter this cronjob and save:

Code: [Select]
@reboot cd /home/pi/nxt; ./run.sh
I'd also recommend downloading the blockchain from peerexplorer.com before running Nxt on RPi, because RPi is slow to do initial sync. Once you downloaded and unzipped the blockchain into /home/pi/nxt/nxt_db, RPi can keep up with the blocks.

I just realized all this is already in the guide by coretechs, LOL
Logged
Run a node - win a prize! "Lucky node" project jar: NXT-8F28-EDVE-LPPX-HY4E7

ellave

  • Jr. Member
  • **
  • Karma: +1/-0
  • Offline Offline
  • Posts: 15
    • View Profile

I think my problem is with the install screen command.  Can someone please confirm the script once i go into - nano ~/nxt/run.sh

mine reads

screen -mS nxt java -Xmx640m -cp classes:lib/*:conf nxt.Nxt
if [ -x jre/bin/java ]; then
    JAVA=./jre/bin/java
else
    JAVA=java
fi
${JAVA} screen -mS nxt java -Xmx640m -cp classes:lib/*:conf nxt.Nxt





« Last Edit: May 08, 2017, 11:58:48 am by ellave »
Logged

lurker10

  • Hero Member
  • *****
  • Karma: +168/-33
  • Offline Offline
  • Posts: 1334
    • View Profile

Does it work if you run it as:
Code: [Select]
nohup ./run.sh &
run.sh should be unmodified from the Nxt package.
Logged
Run a node - win a prize! "Lucky node" project jar: NXT-8F28-EDVE-LPPX-HY4E7

coretechs

  • Board Moderator
  • Sr. Member
  • ****
  • Karma: +161/-1
  • Offline Offline
  • Posts: 436
    • View Profile

I updated the instructions to create a separate startup script for screen rather than modifying run.sh.  The links to the JDK and NRS downloads have been updated to the latest versions as well.
Logged
https://ardorportal.org - Ardor blockchain explorer | https://nxtportal.org - Nxt blockchain explorer | http://bitcoindoc.com - The Rise and Rise of Bitcoin
ARDOR-T43P-R2K9-8W79-9W2AL | NXT-WY9K-ZMTT-QQTT-3NBL7

ellave

  • Jr. Member
  • **
  • Karma: +1/-0
  • Offline Offline
  • Posts: 15
    • View Profile

I got it working, I regenerated the keystore & this time it works
« Last Edit: May 09, 2017, 12:01:29 pm by ellave »
Logged

schoad

  • Jr. Member
  • **
  • Karma: +0/-0
  • Offline Offline
  • Posts: 28
    • View Profile

My node is up and running, but I can't get API SSL to show up on peerexplorer.
Additionally I'm not listed for the NSC payouts for hallmarked nodes.

Dns: nxt.ddnss.eu

Ports:
7874
7876 (SSL)
7878

Letsencrypt Cert for Port 7878.

Forging with 3750 NXT (leased balance from Mainaccount).


According to the API the following should be working:


{
    "apiProxy": false,
    "correctInvalidFees": false,
    "ledgerTrimKeep": 30000,
    "maxAPIRecords": 100,
    "blockchainState": "UP_TO_DATE",
    "currentMinRollbackHeight": 1338582,
    "numberOfBlocks": 1339383,
    "isTestnet": false,
    "includeExpiredPrunable": true,
    "isLightClient": false,
    "services": [
        "HALLMARK",
        "PRUNABLE",
        "API",
        "API_SSL",
        "CORS"
    ],
« Last Edit: June 06, 2017, 06:33:17 pm by schoad »
Logged

ellave

  • Jr. Member
  • **
  • Karma: +1/-0
  • Offline Offline
  • Posts: 15
    • View Profile

Anything else that needs to be done to update to 1.11.7, i run a wget from the console & unzipped, after a restart I am unable to connect to the gui although peerexplorer says I am up & running?
Logged
Pages: 1 2 3 4 [All]
 

elective-stereophonic
elective-stereophonic
assembly
assembly