Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal Error: Failed to create blocktemplate #74

Open
2acoin opened this issue Mar 8, 2018 · 13 comments
Open

Internal Error: Failed to create blocktemplate #74

2acoin opened this issue Mar 8, 2018 · 13 comments

Comments

@2acoin
Copy link

2acoin commented Mar 8, 2018

I have a new install of forknote-pool running. It has been running fine for over 24 hours with my cpu miner mining just fine against the pool. I have received expected payouts and I see blocks being generated with appropriate shares/payouts being triggered.

However, within the last few minutes I started seeing these errors in the pool instance.

image

I've stopped and restarted the daemon, the wallet, the miner, and the pool (nodejs) but the problem continues.

What is throwing this "code":-5,"message" error?
What can I check to determine what the issue is?

Any suggestions on where to look would be appreciated.

@blueavenue
Copy link

blueavenue commented Mar 8, 2018

This is easy. You have to change port of daemon.

Change in pool config.json your p2p port to rpc-port (like in the mycoin.conf).

Try it. If it doesnt works, you have to put the right API Port and Ip in the website config.js.

Try both.

And start simplewallet like this:

./simplewallet --config-file configs/yourcoin.conf --wallet-file yourwallet --password yourpassword --set_log 5 --wallet-rpc-bind-ip 127.0.0.1 --wallet-rpc-bind-port 8085

The Port must be the same like in the pool config.json under wallet. And put the right wallet in the config.json (your generated pool wallet)

All with screen:

Start daemon, start simplewallet, start node init.js (pool)

Start miner on localhost.

Or the coin-decimal point is wrong.

Or the minpayment and maxpayment.

The last error could be the mixin. Try to change in config.json the mixin to 1.

@2acoin
Copy link
Author

2acoin commented Mar 9, 2018

@blueavenue wrote -

This is easy. You have to change port of daemon.

Thanks for the suggestions... Unfortunately, none of your solutions are relevant to my needs. You skipped over the part of my help request that stated;

I have a new install of forknote-pool running. It has been running fine for over 24 hours with my cpu miner mining just fine against the pool. I have received expected payouts and I see blocks being generated with appropriate shares/payouts being triggered.

My installation was running fine for over 24 hours. If there was a configuration setting that was not correct then I would have expected to have these issues from the start. This appears to be more of an issue with the code where it reaches a point that it is not generating the proper block template.

If I am wrong, please help me understand.

@blueavenue
Copy link

blueavenue commented Mar 9, 2018

its no error in code. my forknote-pool is up and runinng. all time.

Look at http://62.75.139.132/pool

what says the admin panel? Daemon and Wallet ok?

The next step you can try is (only you have blockchain saved on a local machine or another vps - because this step kills all DB and Blockchain):

  1. Delete the folder node_modules in pool folder
  2. Go to root and put in redis-cli
  3. Flushall (kills all Database)
  4. exit
  5. Go to Pool Folder
  6. npm update

Which npm version you have installed?

What says the log-files under admin-panel? Has the error occured before in the 24 Hours pool-running?

Hope it helps. When not i have few other solutions for you.

@2acoin
Copy link
Author

2acoin commented Mar 11, 2018

@blueavenue Thank You for your help...

The daemon and the wallet seem to be working as expected. No issues there, also I can start up the .miner and mine just fine. The issue appears to be with the pool. Only after a period of time executing then I start to get the error "Code":"-5"...

I followed your steps 1-6 above... I am running NPM v 2.15.1 with NVM 0.10.48 and I am still seeing the same issue.

The pool starts and runs just as expected... After 12 or more hours the error "error polling getBlocktemplate" occurs.

Any other suggestions?

@2acoin
Copy link
Author

2acoin commented Mar 11, 2018

@blueavenue Not sure if this will help at all...

I turned on detailed logging on the daemon and the started up the pool. In the pool I immediately started seeing the error message "code":"-5" "Internal Error: failed to create block template".

I switched back over to the daemon to see what was getting logged there, and I see the following message;
image

Do you know what is meant by DIFFICULTY OVERHEAD..?

That ERROR appears to be the cause of the issue I am seeing.

@2acoin
Copy link
Author

2acoin commented Mar 11, 2018

@blueavenue You can see my pool running at;
http://pool.2acoin.org
Admin page info is here;
admin / admin

It's running fine again because I wiped everything and restarted it... Hoowever, it most likely will die with the same error after 12 or so hours...

@blueavenue
Copy link

blueavenue commented Mar 11, 2018

It could be a error with the config-file and Zawy Difficulty. Do you changed the Forknote Version or the config file? Do you mined before changing, if you did?

Another question. Whats your api port in config.json?

But i have a question to you. How did you fix the network issue? On my site, there is no pool shown under network-site.

@2acoin
Copy link
Author

2acoin commented Mar 12, 2018

No changes made to Forknote version or the config file... Once I started mining, generated the genesis block, I shut down the miner and start up the pool. I then use my local machine to connect to the pool to CPU mine.

I'm using the standard API port 8117 in the config.json file.

You can activate the Network Statistics and get your pool to be listed by adding this to your config.json file;

image

Obviously, change the entry to your pools address daemon API port.

I'm still battling getting this to work. It seems that block 134 is the magic block where I always have issues with the getblocktemplate error. If you can come up with any more ideas that I might try, I'd love to hear them.

BTW - in an effort to rule out machine specs... What size machine and OS are you running with? I am running a single CPU with 1Gb of memory with Ubuntu 16.04 LTS...

@blueavenue
Copy link

blueavenue commented Mar 12, 2018

Thx for the tip with the Network. It works. Im forgot to edit the coin symbol ;-)

I have 2 Ubuntu 14.04. VPS Server with each 4GB and 2 CPU.

But you need at least for correct blockchain sync 2 Server. This could be the problem. Or the low power.

And if you set up a new 2AC-Coin and conf-file, please delete all blockchain folder (on local machine and VPS [stored in root-folder and can be show with command ls -A).

I tried to connect your api (104.238.165.130:8117). But doesnt works. I think its time to reset the pool ;-)

Regards

@2acoin
Copy link
Author

2acoin commented Mar 12, 2018

I'm actually running 4 servers... 2 Seed Servers, a 3rd server running my daemon/pool server and hosting the static pages on a 4th server.

I'm beginning to think the issue is the OS version. You said you are running 14.04 whereas I am running 16.04. I'm going to load up another VPS with 14.04 and see if that resolves the issue.

What version of Node.JS and NPM are you running?

@blueavenue
Copy link

blueavenue commented Mar 12, 2018

All commands from root please!

I have Node is 0.10.25 (manually installed) and NPM is 1.3.10 automatic

I installed the node manually, because of errors. Do this after restore to 14.04. minimal or LAMP:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git build-essential redis-server libboost1.55-all-dev nodejs-dev nodejs-legacy npm cmake libssl-dev

CHECK NOW THE Node Version by typing:

node -v

If its newer, than delete the version and run:

wget https://nodejs.org/dist/v0.10.25/node-v0.10.25.tar.gz && tar xvzf node-v0.10.25.tar.gz
cd node-v0.10.25
make
sudo make install

Download Pool with git

cd /home/user/pool
npm update

Use the latest forknote release for pool (also latest simplewallet).

Optional:

And after that, start the pool with deleted blockchains on local machines and sync. Dont work all, you have to build the coin from source (look at my forknote repo)

I fixed with other help and threads the Allow Origin Problem. You can build it on your Ubuntu local machine,
with libboost1.55. If you build with 1.58 or later, you have to install libboost to the version
with you build the coin on local machine. I used 1.55. Was hard work to destroy 1.58 and set to 1.55.

You can clone my pool with some changes, if you want. It works.

Could be, that you have to install without node-js-dev and nodejs-legacy like in the top commando (its long time ago for me to remind). I would try
first with inside and if it false without and only with manually node install.

I restored my VPS much more like you. Believe that ;-)

Good Luck

@2acoin
Copy link
Author

2acoin commented Mar 13, 2018

I finally was able to resolve the error I was seeing in the Pool;

image

Apparently, this is being thrown by the ZAWY Difficulty Code in the ForkNote daemon. Even though this error appears to be from the POOL, it is not.

To resolve the issue temporarily, until the problem is resolved, I just commented out the ZAWY_DIFFICULTY_BLOCK_INDEX in the Forknote Coin config file. As per Issue #42 forknote/forknote#42 from the ForkNote git repository.

I'm now very proficient in Forknote having installed and reinstalled at least a dozen times!!

Thanks to all those that helped get me through the problems especially @blueavenue !

@blueavenue
Copy link

Good Job! I believed in you ;-)

Have fun with your pool and all times much coins!

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants