Bitcoin Forum
May 29, 2024, 10:50:57 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoind requires user login and a password  (Read 1344 times)
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
May 13, 2014, 06:11:58 AM
 #1

Hi,

I'm trying to create a pool, one of the things I have to implement is communication with p2p/bitcoind. I started with getting the difficulty. And the bitcoind answers like this:  Invalid params, response status code: 401] code: -32602 }, code 401 according to wikipedia means "Unauthorized", what should I enter as login & password?
gweedo
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000


View Profile
May 13, 2014, 06:15:22 AM
 #2

I would say you shouldn't be running a pool if you don't know how to properly use bitcoind. You can lose a lot of money if your wallet isn't secure properly.

The RPCUser and RPCPassword is in the bitcoin.conf.
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
May 13, 2014, 06:24:16 AM
 #3

Quote
I would say you shouldn't be running a pool if you don't know how to properly use bitcoind
Thanks, but this doesn't depend on me. It is a project I'm responsable for in a company I work for.
Quote
The RPCUser and RPCPassword is in the bitcoin.conf
I'm communicating with bitcoind via JSON-RPC, I don't think I need this file.
Can you tell me what should I in the "user" & "pass" fields?
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
May 13, 2014, 07:35:39 AM
 #4

Thanks again.

I have no problems with JSON-rpc, I just have no idea what to use as a "login" and "password".

I'm using https://github.com/freewil/node-bitcoin which does the job related to JSON-rpc, however it requires login and password.

Can you guide me to an article about using the bitcoin daemon?
spin
Sr. Member
****
Offline Offline

Activity: 362
Merit: 261


View Profile
May 13, 2014, 08:00:20 AM
 #5

You have to understand this stuff to play around with other peoples money, which is what you are doing with a pool.  You are using a wrapper to connect to the bincoind.  So you need to understand bitcoind.  Gweedo has answered your question but you don't even understand his answer.  I'll put it in simpler terms.

Read this.  It tells you about the conf file and what it does. 
https://en.bitcoin.it/wiki/Running_Bitcoin

Then on your repo read the readme! Right at the bottom.  It shows you how to call the client with a user and pass (obtained from the conf file) and also ssl. 
https://github.com/freewil/node-bitcoin/blob/master/Readme.md


If you liked this post buy me a beer.  Beers are quite cheap where I live!
bc1q707guwp9pc73r08jw23lvecpywtazjjk399daa
Envrin
Sr. Member
****
Offline Offline

Activity: 318
Merit: 251



View Profile
May 13, 2014, 10:03:35 AM
 #6


Love it.  "Ohhh, it's ok that I don't know what I'm doing.  It's not my money, I'm just responsible for it".  Cheesy
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
May 13, 2014, 10:05:34 AM
 #7


Love it.  "Ohhh, it's ok that I don't know what I'm doing.  It's not my money, I'm just responsible for it".  Cheesy


I am learning this stuff right now.
nowise
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile
May 14, 2014, 12:50:20 AM
 #8


Love it.  "Ohhh, it's ok that I don't know what I'm doing.  It's not my money, I'm just responsible for it".  Cheesy


I am learning this stuff right now.

cool it on the kid.  He's doing a job and reaching out to get up to speed.  I would question the management not him, and hope they have some serious QA in place before this code goes prime time.

note to big money btc build out projects (pay attention winklevi)... don't let your developers post questions on this site without being trained, and even then their posts can't be associated with the project (biz/social media 101)
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
May 14, 2014, 06:14:49 AM
 #9

Thank you everybody for the answers.

The problem was, that the bitcoin daemon is doing something during the first ~10 seconds upon start up. It's not downloading the blockchain, it did it before, it's something else. Nevertheless it returns 401 during this time. After ~10 seconds everything's fine.

I just don't understand why there are so negative posts, I'm learning bitcoin.
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
May 14, 2014, 08:33:55 AM
 #10

Thanks. I know I'm responsible for users' money, but how can I find information if not here? I will finally learn it Smiley With your help.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!