3

I'm trying to connect multiple wallet-RPC to the same monero node. I have started two separated terminals in order to test the setup and started it with the following command:

./monero-wallet-rpc --rpc-bind-port 18082 --wallet-file /path/to/my/wallet/wallet-viewonly --password "" --disable-rpc-login --daemon-host node.moneroworld.com:18089

Then on two web pages, I'm showing the addresses to see that they are connected to RPC. What is happening is that no matter which wallet-rpc first got connected this address is shown on the page.

So, I have two addresses, two pages and two terminals for monero-wallet-rpc. The expected result is when both terminals are connected on both pages to see those addresses. Instead on both pages is shown same address -> the first connected to the node.

Can I run multiple wallet-rpc's and connect them to the node on the same machine? How can be accomplished this?

  • have you run the two monero wallet rpc instance in two different ports? – SerHack Jan 22 '18 at 13:32
  • Yes, I've tried --rpc-bind-port 18083. Still first connected to the daemon is shown on both pages. Very strange. – S.I. Jan 22 '18 at 13:36
4

You can run multiple monero-wallet-rpc processes on the same machine (or different ones), and connect them to a single node (which can be either on the same machine again, or a different one). You don't have to do anything special for this, though it's best if the monero-wallet-rpc processes don't run off the same wallet file, or they'll overwrite each other's wallet cache when they exit, which is usually not what you want.

Now, it's pretty unclear what you mean by "I'm showing the addresses to see that they are connected to RPC. What is happening is that no matter which wallet-rpc first got connected this address is shown on the page.". What are these addresses ? Incoming connection IP addresses ? Wallet addresses ? How are you obtaining those addresses ? You really need to give information if you expect people to tell you what the problem is.

  • Simply I have created 2 view only wallets. Then I've added them to the database and by using php I'm querying the database. Then the PHP checks if the address is connected and communicated with monero daemon. On page, I just see The address XYZXSZ is connected/not connected.. – S.I. Jan 23 '18 at 5:00
  • Describe "checks if the address is connected and communicated". – user36303 Jan 23 '18 at 9:15
  • For example, If is connected with rpc to the node I can see if funds are received – S.I. Jan 23 '18 at 10:04
  • I am not interested in why you want to know, but how this check is done. You can find a bug in some code if you know how it is done, not why (though sometimes knowing why tells you it should be removed, but that's not the case here). – user36303 Jan 23 '18 at 10:11
  • I'm using this repo github.com/PsychicCat/monero-php – S.I. Jan 23 '18 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.