verge: JSON RPC not working on ubuntu
I am trying to use the VERGE-PYTHON module to integrate verge payments onto a website. I have had this working on windows and have moved to ubuntu to test before going to a production environment. No matter what I have tried the VERGEd RPC commands will not work, I need some help with what I am doing wrong here. I have set everything up exactly as the documentation specifies but I only get 405 errors when trying to send RPC commands via cURL and empty responses from the VERGE-PYTHON module. Even if i try sudo VERGEd getinfo from the terminal I get a 405 from server. Any help would be greatly appreciated!
Prerequisites
- [] Are you running the latest version? yes
User Story:
- "I’m submitting a … "
- [] support request
Your Environment
- Verge Release: VERGE version v4.0.2.0-541f2e9-funky-beta
- CPU: Intel® Core™ i7-6500U
- GPU: Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430]
- RAM: 12gb
- OS: Ubuntu 18.04
- [yes ] I’m using Linux
Any extra information that might be useful in the debugging process.
My VERGE.conf: rpcuser=testuser rpcpassword=testing rpcport=20102 port=21102 daemon=1 server=1 algo=groestl
My torrc:
Tor opens a SOCKS proxy on port 9050 by default – even if you don’t
configure one below. Set “SOCKSPort 0” if you plan to run Tor only
as a relay, and not make any local application connections yourself.
HTTPTunnelPort localhost:20102 #SOCKSPort localhost:20101 #SOCKSPort 0 ## Default: Bind to localhost:9050 for local connections. #SOCKSPort 192.168.0.1:9100 # Bind to this address:port too.
cURL: curl -v -u testuser:testing --data ‘{“version”: “1.1”, “method”: “getinfo”, “params”: [], “id”: 1}’ -H ‘content-type: text/plain;’ http://localhost:20102
- Rebuilt URL to: http://localhost:20102/
- Trying 127.0.0.1…
- TCP_NODELAY set
- Connected to localhost (127.0.0.1) port 20102 (#0)
- Server auth using Basic with user ‘testuser’
POST / HTTP/1.1 Host: localhost:20102 Authorization: Basic dGVzdHVzZXI6dGVzdGluZw== User-Agent: curl/7.58.0 Accept: / content-type: text/plain; Content-Length: 62
- upload completely sent off: 62 out of 62 bytes
- HTTP 1.0, assume close after body < HTTP/1.0 405 Method Not Allowed <
- Closing connection 0
With VERGE-PYTHON: Internal Server Error: /home/ Traceback (most recent call last): File “/home/user/env/test/lib/python3.6/site-packages/django/core/handlers/exception.py”, line 35, in inner response = get_response(request) File “/home/user/env/test/lib/python3.6/site-packages/django/core/handlers/base.py”, line 128, in _get_response response = self.process_exception_by_middleware(e, request) File “/home/user/env/test/lib/python3.6/site-packages/django/core/handlers/base.py”, line 126, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File “/home/user/env/test//views.py”, line 56, in index print(conn.getinfo()) File “/home/user/env/test/vergerpc/connection.py”, line 132, in getinfo return ServerInfo(**self.proxy.getinfo()) File “/home/user/env/test/vergerpc/proxy.py”, line 126, in call resp = json.loads(resp, parse_float=decimal.Decimal) File “/usr/lib/python3.6/json/init.py”, line 367, in loads return cls(**kw).decode(s) File “/usr/lib/python3.6/json/decoder.py”, line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File “/usr/lib/python3.6/json/decoder.py”, line 357, in raw_decode raise JSONDecodeError(“Expecting value”, s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
From Terminal: sudo VERGEd getinfo error: server returned HTTP error 405
tor.log: May 11 23:06:19.000 [notice] Tor 0.3.2.8-rc-dev opening log file. May 11 23:06:19.365 [notice] Tor 0.3.2.8-rc-dev running on Linux with Libevent 2.1.8-stable, OpenSSL 1.1.0g, Zlib 1.2.11, Liblzma N/A, and Libzstd N/A. May 11 23:06:19.365 [notice] Tor can’t help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning May 11 23:06:19.365 [notice] Read configuration file “/home/user/.VERGE/tor/torrc”. May 11 23:06:19.369 [notice] Scheduler type KIST has been enabled. May 11 23:06:19.369 [notice] Opening Socks listener on 127.0.0.1:9089 May 11 23:06:19.369 [notice] Opening HTTP tunnel listener on 127.0.0.1:20102 May 11 23:06:19.000 [notice] Parsing GEOIP IPv4 file /usr/local/share/tor/geoip. May 11 23:06:19.000 [notice] Parsing GEOIP IPv6 file /usr/local/share/tor/geoip6. May 11 23:06:19.000 [warn] You are running Tor as root. You don’t need to, and you probably shouldn’t. May 11 23:06:19.000 [notice] Bootstrapped 0%: Starting May 11 23:06:19.000 [notice] Starting with guard context “default” May 11 23:06:19.000 [notice] Bootstrapped 80%: Connecting to the Tor network May 11 23:06:20.000 [notice] Bootstrapped 85%: Finishing handshake with first hop May 11 23:06:22.000 [notice] Bootstrapped 90%: Establishing a Tor circuit May 11 23:06:23.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working. May 11 23:06:23.000 [notice] Bootstrapped 100%: Done May 11 23:11:18.000 [warn] Saying “HTTP/1.0 405 Method Not Allowed\r\n\r\n” May 11 23:11:18.000 [warn] connection_mark_unattached_ap_(): Bug: stream (marked at src/or/connection_edge.c:2544) sending two socks replies? (on Tor 0.3.2.8-rc-dev 9ef97a268b06fed7) May 11 23:12:19.000 [warn] Saying “HTTP/1.0 405 Method Not Allowed\r\n\r\n” May 11 23:12:19.000 [warn] connection_mark_unattached_ap_(): Bug: stream (marked at src/or/connection_edge.c:2544) sending two socks replies? (on Tor 0.3.2.8-rc-dev 9ef97a268b06fed7) May 11 23:15:45.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory. May 11 23:15:52.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory. May 11 23:16:28.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory. May 11 23:16:30.000 [notice] Closing stream for ‘[scrubbed].onion’: hidden service is unavailable (try again later). May 11 23:17:52.000 [notice] Closing stream for ‘[scrubbed].onion’: hidden service is unavailable (try again later). May 11 23:18:28.000 [notice] Closing stream for ‘[scrubbed].onion’: hidden service is unavailable (try again later). May 11 23:18:51.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory. May 11 23:18:54.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory. May 11 23:18:55.000 [notice] Closing stream for ‘[scrubbed].onion’: hidden service is unavailable (try again later). May 11 23:19:07.000 [warn] Saying “HTTP/1.0 405 Method Not Allowed\r\n\r\n” May 11 23:19:07.000 [warn] connection_mark_unattached_ap_(): Bug: stream (marked at src/or/connection_edge.c:2544) sending two socks replies? (on Tor 0.3.2.8-rc-dev 9ef97a268b06fed7)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (10 by maintainers)
weird – i’m glad it’s working. Keep an eye out for major updates coming with new codebase. No ETA !
Cheers !
Sorry for the delay, tried on production environment running CentOS, works perfectly first time without needing clearnet. Aside from updating the boost libraries it installed without any issue.