Bitcoin Forum
May 14, 2024, 05:41:20 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: regtest specific port don't seems to work  (Read 217 times)
jscode017 (OP)
Newbie
*
Offline Offline

Activity: 22
Merit: 1


View Profile
February 01, 2019, 09:56:12 AM
Last edit: February 01, 2019, 10:09:41 AM by jscode017
 #1

regtest=1 rpcuser=rpc rpcpassword=rpc port=8335 rpcport=8336

this is what I write in my bitcoin.conf (which is in .bitcoin)
after bitcoind -daemon
I type netstat -pant
However instead of getting it listen at port 8335 and 8336, it listen at 18444 18332 (the default)
seems that the port and rpcport do not work
Any help please

ps I'm using ubuntu virtualbox maybe there's something block it?
domob
Legendary
*
Offline Offline

Activity: 1135
Merit: 1166


View Profile WWW
February 01, 2019, 10:20:29 AM
Merited by ABCbits (1), darosior (1)
 #2

For certain options to take effect on non-mainnet (including port and rpcport), you need to put them into a "[regtest]" section in your config file.

I.e., something like this:

Code:
regtest = 1

[regtest]
port = 8335
rpcport = 8336

Use your Namecoin identity as OpenID: https://nameid.org/
Donations: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS | GPG 0xA7330737
jscode017 (OP)
Newbie
*
Offline Offline

Activity: 22
Merit: 1


View Profile
February 02, 2019, 01:21:21 AM
Last edit: February 02, 2019, 01:41:54 AM by jscode017
 #3

thanks but still not work
still get
tcp6       0      0 ::1:18332               :::*                    LISTEN      27578/bitcoind  
tcp6       0      0 :::18444                :::*                    LISTEN      27578/bitcoind  
 though i can make it work by typing command bitcoind -daemon -port=8333
chameleon123
Jr. Member
*
Offline Offline

Activity: 48
Merit: 17


View Profile
February 04, 2019, 03:19:49 PM
 #4

thanks but still not work
still get
tcp6       0      0 ::1:18332               :::*                    LISTEN      27578/bitcoind  
tcp6       0      0 :::18444                :::*                    LISTEN      27578/bitcoind  
 though i can make it work by typing command bitcoind -daemon -port=8333

I did the same way but got :

Code:
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:8335            0.0.0.0:*               LISTEN      2452/bitcoind      
tcp        0      0 127.0.0.1:8336          0.0.0.0:*               LISTEN      2452/bitcoind      
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      -                  
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      -                  
tcp        0      0 127.0.0.1:16443         0.0.0.0:*               LISTEN      15741/bitcoind      
tcp        0      0 0.0.0.0:16444           0.0.0.0:*               LISTEN      15741/bitcoind      
tcp6       0      0 :::8335                 :::*                    LISTEN      2452/bitcoind      
tcp6       0      0 ::1:8336                :::*                    LISTEN      2452/bitcoind      
tcp6       0      0 ::1:631                 :::*                    LISTEN      -                  
tcp6       0      0 ::1:16443               :::*                    LISTEN      15741/bitcoind      
tcp6       0      0 :::16444                :::*                    LISTEN      15741/bitcoind    

in my bitcoin.conf :
Code:
dns=0
dnsseed=0
regtest=1
port=8335
rpcport=8336
It worked fine. Which version you're using? Mine is 0.17.1.
I disabled DNS for some reasons but It doesn't play a part here.
By the way, I changed some default port numbers but the two that I set in bitcoin.conf work fine.
jscode017 (OP)
Newbie
*
Offline Offline

Activity: 22
Merit: 1


View Profile
February 05, 2019, 05:50:16 AM
 #5

It seems is the problem of my editor or something
Seems like it just read the eof so do not execute the port and rpcport command
darosior
Sr. Member
****
Offline Offline

Activity: 279
Merit: 435


View Profile
February 05, 2019, 06:19:25 AM
 #6

It seems is the problem of my editor or something
Seems like it just read the eof so do not execute the port and rpcport command

Hi,

What is your OS ? Where is located your conf file ?
chameleon123
Jr. Member
*
Offline Offline

Activity: 48
Merit: 17


View Profile
February 05, 2019, 07:12:38 AM
 #7

It seems is the problem of my editor or something
Seems like it just read the eof so do not execute the port and rpcport command

Hi,

What is your OS ? Where is located your conf file ?

I use Ubuntu in virtual box like you. Make sure that your .bitcoin directory is in /home/<os_username>.  Otherwise if it not here specify it with :
Code:
bitcoind -datadir=<data_directory>
For the editor I'm not sure but try it with gedit which is on Ubuntu. There are way better editors but test with it if you think the problem is because of your editor.
darosior
Sr. Member
****
Offline Offline

Activity: 279
Merit: 435


View Profile
February 05, 2019, 10:22:26 AM
 #8

It seems is the problem of my editor or something
Seems like it just read the eof so do not execute the port and rpcport command

Hi,

What is your OS ? Where is located your conf file ?

I use Ubuntu in virtual box like you.
Huh
I haven't seen his PS ^^'.
jscode017 (OP)
Newbie
*
Offline Offline

Activity: 22
Merit: 1


View Profile
February 06, 2019, 02:05:24 PM
 #9

I use getedit too and specify datadir but still get the problem
But thanks for all the helps
Since I could solve this problem by adding command line (i.e -port) I think that is okay now

If I find out why i will post it here
Thanks again  Cheesy
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!