forknote / forknote-pool

Mining pool for Bytecoin/Forknote based coins such as Bytecoin and Dashcoin.
https://github.com/forknote/forknote-pool
GNU General Public License v2.0
123 stars 185 forks source link

Running pool via systemd on Ubuntu 16.04 - Refused port connections #83

Closed ghost closed 6 years ago

ghost commented 6 years ago

My pool works ok but I need to run it via systemd on Ubuntu 16.04. I've tried it with this .service but pool does not receive incoming connections on mining ports. I've done the same thing with forknote daemon and wallet and they work ok. With this pool I can't do it the same, incoming connections are refused.

SERVICE

[[Unit]
Description=Forknote Pool
After=network.target

[Service]
User=user
Group=user
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=forknote-pool
Restart=always
RestartSec=30
Environment=REDIS_HOST=localhost
WorkingDirectory=/home/sam/Bitsum/forknote-pool
ExecStart=/usr/bin/node /home/sam/Bitsum/forknote-pool/init.js

[Install]
WantedBy=multi-user.target

When I run systemctl status Forknote-pool it shows this, It seems that the pool crashes but it still running... when I try to connect my miner software, the connection is refused.

sudo systemctl status forknote-pool
● forknote-pool.service - Forknote Pool
   Loaded: loaded (/etc/systemd/system/forknote-pool.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

May 29 01:08:12 localhost.localdomain forknote-pool[47721]:     at Function.Module._load (module.js:301:12)
May 29 01:08:12 localhost.localdomain forknote-pool[47721]:     at Module.require (module.js:354:17)
May 29 01:08:12 localhost.localdomain forknote-pool[47721]:     at require (internal/module.js:12:17)
May 29 01:08:12 localhost.localdomain forknote-pool[47721]:     at Object.<anonymous> (/home/user/forknote-pool/node_modules/bignum/iMay 29 01:08:12 localhost.localdomain forknote-pool[47721]:     at Module._compile (module.js:410:26)
May 29 01:08:12 localhost.localdomain forknote-pool[47721]:     at Object.Module._extensions..js (module.js:417:10)
May 29 01:08:12 localhost.localdomain forknote-pool[47721]:     at Module.load (module.js:344:32)
May 29 01:08:12 localhost.localdomain forknote-pool[47721]: 2018-05-29 01:08:12 [master] Pool fork 2 died, spawning replacement worker...
May 29 01:08:13 localhost.localdomain systemd[1]: Stopping Forknote Pool...
May 29 01:08:13 localhost.localdomain systemd[1]: Stopped Forknote Pool.
ghost commented 6 years ago

works fine just replacing /usr/bin/node (v4) by /usr/bin/local/node (v0.10.4) the fist one run an incorrect version of node

because I installed node version -> 0.10 to run the pool

sudo npm install -g n
# use node's version 0.10.^
sudo n 0.10