update port and rpcport