I am running Bitcoin Network on local Ubuntu machine. The network consists 
of multiple nodes. I want to connect to the network from a java application 
running on the same machine via JSON RPC. I can connect to the Bitcoind 
server from command line using bitcoin-cli. However, I cannot to the 
Bitcoind server from the Java application using Bitcoinj Libraray. I 
suspect that the problem is related to RPC authentication. I specified rpc 
username and password in the bitcoin.conf file and I tried to use Java 
Authenticator in my Java code. However, it hasn't solved the problem.




*        Authenticator.setDefault(new Authenticator() {                    
protected PasswordAuthentication getPasswordAuthentication() {     return 
new PasswordAuthentication (rpcuser, rpcpassword.toCharArray());            
        }});*

My bitcoin.conf file is as follows:












*    regtest=1    server=1    listen=1    rpcuser=user    
rpcpassword=password    fallbackfee=0.0001    [regtest]    port=10000    
rpcport=20000    bind=127.0.0.1    rpcbind=127.0.0.1    
rpcallowip=127.0.0.1*

This is the log message I see when from the Bitcoind server side:
https://i.stack.imgur.com/ttEyH.png

And this is the error I am receiving on the application side:
https://i.stack.imgur.com/84WvF.png

I am using Bitcoin core version 22 for the server and Bitcoinj library 
version 16.1 (https://bitcoinj.org/getting-started) to connect to the server

-- 
You received this message because you are subscribed to the Google Groups 
"bitcoinj" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bitcoinj/a34b68fd-2748-45e4-89bf-63e18289061en%40googlegroups.com.

Reply via email to