Make sure you have properly configured your coin daemon to accept json-rpc connections.
Depending on your operating system, you have to create a coin configuration file. Given that we are configuring Litecoin;
- Windows: C:\Users\user\AppData\Roaming\Litecoin.conf
- Linux / MacOS: ~/.litecoin/litecoin.conf
server=1 rpcuser=user rpcpassword=password rpctimeout=30 rpcallowip=127.0.0.1 rpcport=9333
Then in your litecoin.json that should exists in /config/pools/litecoin.json, you should set corresponding values;
"daemon": { "host": "127.0.0.1", "port": 9333, "username": "user", "password": "password", "timeout": 5 },
If you have configured properly, it should be working now. If you are running CoiniumServ over Linux and still get the error above, you may need to fix your settings to get around limits.
"Error while reading the json response: The request timed out."
If you are sure that both your coin.conf and pool.json file is properly set, you are probably hitting limits on Linux. Please take the following steps to increase the limits;
sudo echo 1200000 > /proc/sys/fs/file-max
Edit /etc/sysctl.conf and change;
fs.file-max = 1200000
Edit /etc/security/limits.conf and add;
* soft nofile 120000 * hard nofile 120000 root soft nofile 120000 root hard nofile 120000
Increase allowed number of tcp connections
The last step is increasing maximum number of allowed tcp connections on your system;
sudo echo "net.ipv4.ip_local_port_range = 20000 65535" >> /etc/sysctl.conf && echo 20000 65535 > /proc/sys/net/ipv4/ip_local_port_range && echo "net.ipv4.tcp_tw_reuse = 1" >> /etc/sysctl.conf && echo "net.core.somaxconn=65535" >> /etc/sysctl.conf && sysctl -p /etc/sysctl.conf
You should then reboot your system to get changes applied.
More