Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: konradp on May 13, 2014, 06:11:58 AM



Title: Bitcoind requires user login and a password
Post by: konradp on May 13, 2014, 06:11:58 AM
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?


Title: Re: Bitcoind requires user login and a password
Post by: gweedo on May 13, 2014, 06:15:22 AM
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.


Title: Re: Bitcoind requires user login and a password
Post by: konradp on May 13, 2014, 06:24:16 AM
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?


Title: Re: Bitcoind requires user login and a password
Post by: konradp on May 13, 2014, 07:35:39 AM
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?


Title: Re: Bitcoind requires user login and a password
Post by: spin on May 13, 2014, 08:00:20 AM
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



Title: Re: Bitcoind requires user login and a password
Post by: Envrin on May 13, 2014, 10:03:35 AM

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".  :D


Title: Re: Bitcoind requires user login and a password
Post by: konradp on May 13, 2014, 10:05:34 AM

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".  :D


I am learning this stuff right now.


Title: Re: Bitcoind requires user login and a password
Post by: nowise on May 14, 2014, 12:50:20 AM

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".  :D


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)


Title: Re: Bitcoind requires user login and a password
Post by: konradp on May 14, 2014, 06:14:49 AM
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.


Title: Re: Bitcoind requires user login and a password
Post by: konradp on May 14, 2014, 08:33:55 AM
Thanks. I know I'm responsible for users' money, but how can I find information if not here? I will finally learn it :) With your help.