0

When I try to connect to my bitcoind server with the username and password in my bitcoin.conf I get a 401 error. When I set an username and password in the bitcoind parameters(bitcoind -rpcuser=... -rpcpassword=... -daemon) it does work.

I also have prune in my config file. For some reason this does work. Also the rpcallow works fine. So it does read my config file?

When I add the -conf parameter with my config file I get this error:

Error reading configuration file: the options configuration file contains an invalid line '�� (I also can't read those last 2 characters)

I even get this error when the file is empty

Does someone know how I can fix this?

7
  • Which version of Bitcoin Core do you use? Does the password/username contain non-ascii characters? Oct 19, 2016 at 20:08
  • I'm also interested in what version you're using. Did you build it yourself or does it come from ports? I didn't have this problem with 0.13.1 at least. Also can you do bitcoind -conf someconffile.conf | & hd to see what those characters are in hex?
    – wumpus
    Oct 20, 2016 at 1:25
  • One guess would be that it is something to do with locale, which isn't set by default on FreeBSD (and the boost function used for conf file parsing may croak on that). e.g. try export LC_ALL=en_US.UTF-8.
    – wumpus
    Oct 20, 2016 at 1:31
  • @user2084795 I am using the version from the repository. It is 120100. My username and password only contain letters and number.
    – Jan Wytze
    Oct 20, 2016 at 17:04
  • 1
    Could you do an hexdump on bitcoin.conf and check for >0x80 characters, or upload the entire file (w/ censored user and pass) somewhere? I'm quite interested what unicode it contains. Some editors leave UTF-8 BOM markers at the beginning, for example.
    – wumpus
    Nov 19, 2016 at 10:49

1 Answer 1

0

I don't know exacly how, but I got it working. I do know that I used export LC_ALL=en_US.UTF-8 but I am not sure that is the reason it works.

I still have the same error with the -conf paramter. Even when permissions are 777.

I know this isn't a perfect answer. But my bitcoind server works now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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