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?
Which version of Bitcoin Core do you use? Does the password/username contain non-ascii characters? – user2084795 – 2016-10-19T20:08:46.403
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 | & hdto see what those characters are in hex? – wumpus – 2016-10-20T01:25:01.003One 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 – 2016-10-20T01:31:07.797@user2084795 I am using the version from the repository. It is 120100. My username and password only contain letters and number. – Jan Wytze – 2016-10-20T17:04:56.877
@wumpus your command is not correct, I get a syntax error. – Jan Wytze – 2016-10-20T17:07:48.617
That syntax is based on bash. Your shell may have a different syntax for exporting environment variables – wumpus – 2016-11-19T10:14:37.307
1Could 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 – 2016-11-19T10:49:15.457