Skip to content

Instantly share code, notes, and snippets.

@insidenothing
Last active July 9, 2021 14:31
Show Gist options
  • Save insidenothing/e7c1f015624198568bd0e931abc7d38a to your computer and use it in GitHub Desktop.
Save insidenothing/e7c1f015624198568bd0e931abc7d38a to your computer and use it in GitHub Desktop.
Error Message when trying to connect MM2 to ElectrumX 1.17.0
Following This
https://developers.komodoplatform.com/basic-docs/atomicdex/atomicdex-tutorials/how-to-become-a-liquidity-provider.html#connecting-to-a-network-other-than-kmd-or-ltc
coins setup
{
"coin": "KEVA",
"name": "kevacoin",
"fname": "KevaCoin",
"rpcport": 9337,
"mm2": 1,
"required_confirmations": 2,
"avg_blocktime": 2.5,
"protocol": {
"type": "UTXO"
}
}
Created This
KEVAconnect.sh
#!/bin/bash
source userpass
curl -vvv --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"electrum\",\"coin\":\"KEVA\",\"servers\":[{\"url\":\"127.0.0.1:50002\"}]}"
Ran it
ubuntu@ip-172-31-19-204:~/atomicDEX-API/target/debug$ ./KEVAconnect.sh
* Rebuilt URL to: http://127.0.0.1:7783/
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 7783 (#0)
> POST / HTTP/1.1
> Host: 127.0.0.1:7783
> User-Agent: curl/7.58.0
> Accept: */*
> Content-Length: 95
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 95 out of 95 bytes
< HTTP/1.1 500 Internal Server Error
< access-control-allow-origin: http://localhost:3000
< content-length: 244
< date: Fri, 09 Jul 2021 13:57:43 GMT
<
* Connection #0 to host 127.0.0.1 left intact
{"error":"rpc:173] dispatcher_legacy:155] lp_commands:98] lp_coins:1149] utxo_standard:34] utxo_common:112] utxo_common:86] utxo:1089] utxo:1172] utxo:1215] utxo:1393] Failed protocol version verifying of at least 1 of Electrums in 5 seconds."}
RPC Log
09 14:09:57, coins:rpc_clients:1854] INFO Electrum client connected to 127.0.0.1:50002
09 14:09:57, coins:rpc_clients:1878] INFO EOF from 127.0.0.1:50002
09 14:09:57, coins:rpc_clients:1918] INFO 127.0.0.1:50002 connection dropped
09 14:09:57, coins:rpc_clients:1854] INFO Electrum client connected to 127.0.0.1:50002
09 14:10:02, rpc:238] ERROR RPC error response: rpc:173] dispatcher_legacy:155] lp_commands:98] lp_coins:1149] utxo_standard:34] utxo_common:112] utxo_common:86] utxo:1089] utxo:1172] utxo:1215] utxo:1393] Failed protocol version verifying of at least 1 of Electrums in 5 seconds.
Here is what is listening on what port
ubuntu@ip-172-31-19-204:~/atomicDEX-API/target/debug$ lsof -i -P -n | grep LISTEN
kevacoind 3231 ubuntu 11u IPv6 44097 0t0 TCP [::1]:9337 (LISTEN)
kevacoind 3231 ubuntu 12u IPv4 44099 0t0 TCP 127.0.0.1:9337 (LISTEN)
kevacoind 3231 ubuntu 28u IPv6 44103 0t0 TCP *:9338 (LISTEN)
kevacoind 3231 ubuntu 29u IPv4 44104 0t0 TCP *:9338 (LISTEN)
mm2 6718 ubuntu 13u IPv4 79515 0t0 TCP 127.0.0.1:7783 (LISTEN)
python3.7 7578 ubuntu 33u IPv4 91154 0t0 TCP 127.0.0.1:50001 (LISTEN)
python3.7 7578 ubuntu 37u IPv6 91155 0t0 TCP *:50002 (LISTEN)
python3.7 7578 ubuntu 38u IPv4 91156 0t0 TCP *:50002 (LISTEN)
Here is the ElectrumX info
INFO:SessionManager:{"coin": "Kevacoin", "daemon": "127.0.0.1:9337/",
"daemon height": 360062, "db height": 360062, "db_flush_count": 5008,
"groups": 0, "history cache": "0 lookups 0 hits 0 entries", "merkle cache": "0 lookups 0 hits 0 entries",
"pid": 3273, "peers": {"bad": 0, "good": 0, "never": 0, "stale": 0, "total": 0}, "request counts": {},
"request total": 0, "sessions": {"count": 0, "count with subs": 0, "errors": 0, "logged": 0, "pending requests": 0,
"subs": 0}, "tx hashes cache": "0 lookups 0 hits 0 entries", "txs sent": 0, "uptime": "12h 01m 16s",
"version": "ElectrumX 1.17.0"}
ubuntu@ip-172-31-19-204:~/.kevacoin$ cat kevacoin.conf
server=1
rpcport=9337
txindex=1
rpcuser=xxx
rpcpassword=xxx
@insidenothing
Copy link
Author

Production Servers will use

curl -vvv --url "http://127.0.0.1:7783" --data "{"userpass":"$userpass","method":"electrum","coin":"KEVA","servers":[{"url":"ec1.kevacoin.org:50002"},{"url":"ec0.kevacoin.org:50002"}]}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment