Tried Phoenix 2.8c today. Mostly good, but have a
problem with the remote monitoring.
I have a basic python script using sockets to monitor all rigs and send me alerts if things go wrong.
This works with claymore, which says it uses raw TCP/IP connections (not HTTP) for remote management.
This same script does not work with Phoenix, and hangs when waiting for data from the miner.
It sends the request JSON as per the claymore API
{"id":0,"jsonrpc":"2.0","method":"miner_getstat1"}It then waits for the response, expecting
{"result": ["9.3 - ETH" ... data, but it never gets any data.
It uses the
socket.recv(1024) method which blocks until there is some data to be read.
The remote monitoring is enabled, and responds to HTTP requests on 3333, showing a html version of the console.
Interestingly claymore's EthMan.exe does work and can see the rigs using Phoenix.
The devs say "Phoenix miner is fully compatible with Claymore's dual miner protocol for remote monitoring and
management.", so am I correct to assume that phoenix should support the raw TCP/IP requests in JSON format?
It's a pretty simple script, that works with claymore, perhaps someone can see if I'm doing something wrong, here is a stripped down version that hangs when waiting for data from the miner.
#!/usr/bin/python3
import socket
import json
def contact_miner(ip,port):
request = b'{"id":0,"jsonrpc":"2.0","method":"miner_getstat1"}'
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
try:
s.connect((ip, port))
except Exception:
return None
s.sendall(request)
data = s.recv(1024)
if data != b'':
return(json.loads(data.decode('utf-8'))['result'])
answer = contact_miner('192.168.1.198', 3333)
print(answer)
It hangs because
socket.recv blocks when there is no data. If you Ctrl+C you get
user@server:~/bin$ ./checkPhoenix.py
^CTraceback (most recent call last):
File "./checkPhoenix.py", line 19, in
answer = contact_miner('192.168.1.198', 3333)
File "./checkPhoenix.py", line 14, in contact_miner
data = s.recv(1024)
KeyboardInterrupt
Anyone else got monitoring scripts working with Phoenix? Any idea what could be going wrong?