Servant file running

Hi,

I have set up a node , and it’s all working fine from what I gather. The only issue I have is with the servant file. I ran the startservant.sh file, it came up initially with this message

Exception in thread “main” java.lang.ExceptionInInitializerError
Caused by: org.nem.core.crypto.CryptoException: java.lang.IllegalArgumentExcepti on: org.apache.commons.codec.DecoderException: Illegal hexadecimal character < a t index 0

After looking through the forum it was caused by the delegated private key not being in the config.properties. I put this information in, and also added the IP address of the host in nem.host and saved the file.

Now I receive this message when running the startservant.sh file:

Error: Could not find or load main class org.nem.rewards.servant.NodeRewardsServant

Does anyone know how to resolve this?

So close, yet so far away…

I have tried with servantStart.sh file which contains:

java -Xms128M -Xmx128M -cp “.:jars/*” org.nem.rewards.servant.NodeRewardsServant

and also with startservant.sh which contains:

java -Xms128M -Xmx128M -cp “.:servant/jars/*” org.nem.rewards.servant.NodeRewardsServant

Which is the correct one to use?

how does your directory structure look like?
is the file nem-node-rewards-servant-0.0.4-ALPHA.jar in any subfolder?

@BloodyRookie

Thanks!
/root/nem - contains data, logs, etc
/root/nis-ncc/package/ contains the batch files for nisStart.sh etc
/root/nis-ncc/package/supernode-servant/servant contains the servant.sh file

The file you mentioned is in:
/root/nis-ncc/package/supernode-servant/servant/jars/nem-node-rewards-servant-0.0.4-ALPHA.jar

Is a servant running mandatory for the supernodes program? It seems like everything else is working except the servant.

yes, servant is mandatory.
servant.sh looks similar to this?

java -Xms256M -Xmx256M -cp “.:jars/*” org.nem.rewards.servant.NodeRewardsServant

@BloodyRookie
Yes, except the memory is limited to 128M as below:

java -Xms128M -Xmx128M -cp “.:jars/*” org.nem.rewards.servant.NodeRewardsServant

how do you start the servant.sh script? Are you in the /root/nis-ncc/package/supernode-servant/servant folder when starting it?

@BloodyRookie

Hi yes, I am in that folder.

I run it as ./servantStart.sh

kind of out of ideas :confused:
how many jars does the jars folder contains?

I could re-build the server, I tried it with Pauls tutorial on Debian, and I had issues with the nis service starting, then I trashed it, and tried it on ubuntu with a mixture of the ubuntu tutorial and Paul’s tutorial. The NIS is working now, but the servant doesn’t seem to start up. Is the tutorial on NEM Supernode Rewards Program one that works OK, I noticed some things are done differently than Pauls or the Ubuntu tutorial

the issue is not related to the OS i think.
Asking again, how many jars are in the jars folder?

There’s 41 jars in the jars folder.

Probably not related but which of the config.properties or config-user.properties should have my delegated private key details etc within them?

/root/nis-ncc/package/supernode-servant/servant/config.properties
/root/nis-ncc/package/mon/config.properties
/root/nis-ncc/package/nis/config.properties
/root/nis-ncc/package/ncc/config.properties

/root/nis-ncc/package/supernode-servant/config-user.properties
/root/nis-ncc/config-user.properties

I think the problem could be related to me having the private key and IP address in both:

/root/nis-ncc/package/supernode-servant/servant/config.properties

and also in

/root/nis-ncc/package/supernode-servant/config-user.properties

I think either one or the other should have the entries for del. priv. key and IP of supernode in there, I could be wrong

no that didn’t make a difference after changing back to 127.0.0.1 and # out my entry. So left back to as is. Going back to your original question, there are 41 jars as per my response earlier.

41 is the correct number of jars.
Somehow java doesn’t see the servant jar.
This has nothing to do with the configuration files. You need to have the delegated private key in the servant config and nis config. If there is a config-user then it has to in there too.

thanks BloodyRookie, I think we may have got it working. I checked all the config.properties and config-user.properties to make sure they all contain del priv key and IPs. Then I copied the servantStart.sh from the servant folder into the supernode-servant folder where the config-user.properties was located, and the servant seems to have started. Fingers crossed. Many thanks for your guidance and help. I’ll keep monitoring it.

um…but that means the jars folder is in the supernode-servant folder as well? else jar would be relative to the startservant.sh in /servant/jars.
Anyway, glad it worked.

This is what I see when I started: wondering if it is as it should be in a normally functioning supernode?

INFO Node rewards org.nem.rewards.servant is ready to serve. (org.nem.rewards.servant.NodeRewardsServant startServer)

On another putty session I have the nis running, and noticed a lot of "Account Nxxxx-… is not yet allowed to generate a block. is this normal?

Accessing 7890 on browser seems ok, info and extended info
Port 7778 on a browser shows: {“timeStamp”:46467805,“error”:“Not Found”,“message”:null,“status”:404}
When opening a browser to http://52.209.222.196:7880/ I see a 404 error
Problem accessing /. Reason:
Not Found
Is the above normal functioning?

Those are the two links that should work if everything is ok (assuming the ip is correct):

52.209.222.196:7890/node/info
52.209.222.196:7880/nr/metaData

none of them are actually working. Is this a vps or a node at home?