Does URL_SCHEME and FORCE_SECURE_CONNECTION apply to jsonrpc?


#1

I’m having this issue although no with workbench, but rather with Peatio installed from 1-8-stable from the RubyKube repositories. The QR code that shows up is a dummy code, and the field for address is empty. I checked that all the daemons are running, and that jsonrpc request are working using curl.

How can I check what could be causing the problem? Is there a log file somewhere that I can check?

Could it be related to the options URL_SCHEME, and FORCE_SECURE_CONNECTION, in config/applicacion.yml being set to https and 'true' respectibly, causing the jsonrpc requests to be made to the wrong address?

$ god status
amqp:deposit_coin: up
amqp:deposit_coin_address: up
amqp:market_ticker: up
amqp:matching: up
amqp:order_processor: up
amqp:pusher_market: up
amqp:pusher_member: up
amqp:slave_book: up
amqp:trade_executor: up
amqp:withdraw_coin: up
coins: up
global_state: up
hot_wallets: up
k: up
payment_transaction: up
websocket_api: up
withdraw_audit: up
$ curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnewaddress", "params": [] }' -H 'content-type: text/plain;' http://user:password@localhost:8332
{"result":"37q6EnJdWg7jWFhJQdg4YGoxbWnm4CTqKM","error":null,"id":"curltest"}

#2

So, what I did after reinstalling Peatio a few times and trying a couple of things, was to edit all the template files (listed below) and to replace the default values to the actual values used by the exchange, then reinstall Peatio (once more), stop it, and re-start it again. I’d love to know what could be the real cause of the problem though :sweat_smile:

config/templates/application.yml.erb
config/templates/seed/currencies.yml.erb
config/templates/seed/markets.yml.erb