How bitcoind starts the RPC service

I compiled the source code for bitcoin and btcpool respectively. When running some services in btcpool, I need to set up the RPC service.

this RPC service should be provided by bitcoind.

now I need to set the address of the RPC service is 127.0.0.1 onerpc, 8332, and the user"s password is 123. How to set it?
the command I started is
bitcoind-server-rpcuser=onerpc-rpcpassword=123-port=8332

the following error was made using the command:

bitcoind -rpcuser=onerpc -rpcpassword=123 -port=8332 -jsonrpc -server

Error: Unable to bind to 0.0.0.0:8332 on this computer. Bitcoin Core is probably already running.
Error: Failed to listen on any port. Use -listen=0 if you want this.
Mar.02,2021

create a configuration file bitcoin.conf under / root/.bitcoin/

cp. / contrib/debian/examples/bitcoin.conf / root/.bitcoin/

run bitcoind
bitcoind

directly

View port 8332
lsof-iVol 8332
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
bitcoind 8331 root 9u IPv6 308456 0t0 TCP *: 8332 (LISTEN)


error message, unable to bind port 8332. Bitcoin core core code on this computer is always running.
the following is the solution, listen on any port, please use the-listen= port number.

Menu