Skip to content

Commit

Permalink
reassign port numbers to 7050-7-60 range
Browse files Browse the repository at this point in the history
reassign port numbers to 7050-7060 range to avoid conflicts with
Windows port usage (5000). Fixes #2283
#2283

Port assignments as follows:
7050 REST
7051 peer gRPC
7052 peer CLI
7053 peer events
7054 eCAP
7055 eCAA
7056 tCAP
7057 tCAA
7058 tlsCAP
7059 tlsCAA

NOTE: when this PR lands, it will require people to rebuild their Vagrant
development environment(s), so we will want to make an announcement.

Also @bcbrock recommended that we eventually seek a block of ports from IANA.
We should hold off on that until we sort out Consensus next.

Change-Id: I1e54d45589e155a69a2a779b1dac447d5473cf03
Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
  • Loading branch information
christo4ferris committed Jul 31, 2016
1 parent 1c982e8 commit dad7a9d
Show file tree
Hide file tree
Showing 55 changed files with 299 additions and 306 deletions.
4 changes: 2 additions & 2 deletions bddtests/docker-compose-1-devmode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ccenv:
image: hyperledger/fabric-ccenv
environment:
- CORE_CHAINCODE_ID_NAME=testCC
- CORE_PEER_ADDRESS=vp0:30303
- CORE_PEER_ADDRESS=vp0:7051
command: bash -c "GOBIN=/opt/gopath/bin go install github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 && /opt/gopath/bin/chaincode_example02"
links:
- vp0
- vp0
2 changes: 1 addition & 1 deletion bddtests/docker-compose-1-exp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ vp0:
environment:
- CORE_PEER_ID=vp0
ports:
- 31315:31315
- 7053:7053
5 changes: 2 additions & 3 deletions bddtests/docker-compose-1-profiling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ vp0:
environment:
- CORE_PEER_ID=vp0
- CORE_PEER_PROFILE_ENABLED=true
ports:
- 5000:6060

ports:
- 7050:6060
2 changes: 1 addition & 1 deletion bddtests/docker-compose-2-tls-basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ vp1:
service: vp0
environment:
- CORE_PEER_ID=vp1
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links:
- vp0
2 changes: 1 addition & 1 deletion bddtests/docker-compose-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ vp1:
service: vp0
environment:
- CORE_PEER_ID=vp1
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links:
- vp0
4 changes: 2 additions & 2 deletions bddtests/docker-compose-3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ vp1:
service: vp0
environment:
- CORE_PEER_ID=vp1
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links:
- vp0

Expand All @@ -19,6 +19,6 @@ vp2:
service: vp0
environment:
- CORE_PEER_ID=vp2
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links:
- vp0
6 changes: 3 additions & 3 deletions bddtests/docker-compose-4-consensus-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ vpBase:
service: vp
environment:
- CORE_SECURITY_ENABLED=true
- CORE_PEER_PKI_ECA_PADDR=membersrvc0:50051
- CORE_PEER_PKI_TCA_PADDR=membersrvc0:50051
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc0:50051
- CORE_PEER_PKI_ECA_PADDR=membersrvc0:7054
- CORE_PEER_PKI_TCA_PADDR=membersrvc0:7054
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc0:7054
- CORE_PEER_PKI_TLS_ROOTCERT_FILE=./bddtests/tlsca.cert
# TODO: Currently required due to issue reading obbca configuration location
- CORE_PBFT_GENERAL_N=4
Expand Down
8 changes: 4 additions & 4 deletions bddtests/docker-compose-4-consensus-batch-1-byzantine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ vp1:
service: vpBatch
environment:
- CORE_PEER_ID=vp1
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
- CORE_SECURITY_ENROLLID=test_vp1
- CORE_SECURITY_ENROLLSECRET=5wgHK9qqYaPy
links:
Expand All @@ -33,7 +33,7 @@ vp2:
service: vpBatch
environment:
- CORE_PEER_ID=vp2
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
- CORE_SECURITY_ENROLLID=test_vp2
- CORE_SECURITY_ENROLLSECRET=vQelbRvja7cJ
links:
Expand All @@ -46,10 +46,10 @@ vp3:
service: vpBatch
environment:
- CORE_PEER_ID=vp3
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
- CORE_SECURITY_ENROLLID=test_vp3
- CORE_SECURITY_ENROLLSECRET=9LKqKH5peurL
- CORE_PBFT_GENERAL_BYZANTINE=true
- CORE_PBFT_GENERAL_BYZANTINE=true
links:
- membersrvc0
- vp0
10 changes: 5 additions & 5 deletions bddtests/docker-compose-4-consensus-batch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ vp0:
- CORE_PEER_PROFILE_ENABLED=true
links:
- membersrvc0
ports:
- 5000:6060
ports:
- 7050:6060


vp1:
Expand All @@ -24,7 +24,7 @@ vp1:
service: vpBatch
environment:
- CORE_PEER_ID=vp1
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
- CORE_SECURITY_ENROLLID=test_vp1
- CORE_SECURITY_ENROLLSECRET=5wgHK9qqYaPy
links:
Expand All @@ -37,7 +37,7 @@ vp2:
service: vpBatch
environment:
- CORE_PEER_ID=vp2
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
- CORE_SECURITY_ENROLLID=test_vp2
- CORE_SECURITY_ENROLLSECRET=vQelbRvja7cJ
links:
Expand All @@ -50,7 +50,7 @@ vp3:
service: vpBatch
environment:
- CORE_PEER_ID=vp3
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
- CORE_SECURITY_ENROLLID=test_vp3
- CORE_SECURITY_ENROLLSECRET=9LKqKH5peurL
links:
Expand Down
8 changes: 4 additions & 4 deletions bddtests/docker-compose-4-consensus-noops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ vp0:
links:
- membersrvc0
ports:
- 5000:5000
- 7050:7050

vp1:
extends:
file: docker-compose-4-consensus-base.yml
service: vpBase
environment:
- CORE_PEER_ID=vp1
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
- CORE_SECURITY_ENROLLID=test_vp1
- CORE_SECURITY_ENROLLSECRET=5wgHK9qqYaPy
links:
Expand All @@ -35,7 +35,7 @@ vp2:
service: vpBase
environment:
- CORE_PEER_ID=vp2
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
- CORE_SECURITY_ENROLLID=test_vp2
- CORE_SECURITY_ENROLLSECRET=vQelbRvja7cJ
links:
Expand All @@ -48,7 +48,7 @@ vp3:
service: vpBase
environment:
- CORE_PEER_ID=vp3
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
- CORE_SECURITY_ENROLLID=test_vp3
- CORE_SECURITY_ENROLLSECRET=9LKqKH5peurL
links:
Expand Down
3 changes: 1 addition & 2 deletions bddtests/docker-compose-4-consensus-nvp0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ nvp0:
service: vpBase
environment:
- CORE_PEER_VALIDATOR_ENABLED=false
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
- CORE_PEER_ID=nvp0
- CORE_SECURITY_ENROLLID=test_nvp0
- CORE_SECURITY_ENROLLSECRET=iywrPBDEPl0K
links:
- membersrvc0
- vp0

6 changes: 3 additions & 3 deletions bddtests/docker-compose-4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ vp1:
service: vp0
environment:
- CORE_PEER_ID=vp1
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links:
- vp0

Expand All @@ -19,7 +19,7 @@ vp2:
service: vp0
environment:
- CORE_PEER_ID=vp2
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links:
- vp0

Expand All @@ -28,6 +28,6 @@ vp3:
service: vp0
environment:
- CORE_PEER_ID=vp3
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links:
- vp0
8 changes: 4 additions & 4 deletions bddtests/docker-compose-5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ vp1:
service: vp0
environment:
- CORE_PEER_ID=vp1
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links:
- vp0

Expand All @@ -19,7 +19,7 @@ vp2:
service: vp0
environment:
- CORE_PEER_ID=vp2
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links:
- vp0

Expand All @@ -28,7 +28,7 @@ vp3:
service: vp0
environment:
- CORE_PEER_ID=vp3
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links:
- vp0

Expand All @@ -37,6 +37,6 @@ vp4:
service: vp0
environment:
- CORE_PEER_ID=vp4
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
links:
- vp0
5 changes: 2 additions & 3 deletions bddtests/docker-compose-sdk-node.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
sampleApp0:
image: hyperledger-sdk-node
environment:
- MEMBERSRVC_ADDRESS=membersrvc0:50051
- PEER_ADDRESS=vp0:30303
- MEMBERSRVC_ADDRESS=membersrvc0:7054
- PEER_ADDRESS=vp0:7051
- KEY_VALUE_STORE=/tmp/hl_sdk_node_key_value_store
# Startup of peer must be delayed to allow membersrvc to come up first
command: node sampleSDKApp
links:
- membersrvc0
- vp0

18 changes: 9 additions & 9 deletions bddtests/steps/bdd_grpc_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def getTxResult(context, enrollId):

(channel, userRegistration) = getGRPCChannelAndUser(context, enrollId)
stub = devops_pb2.beta_create_Devops_stub(channel)

txRequest = devops_pb2.TransactionRequest(transactionUuid = context.transactionID)
response = stub.GetTransactionResult(txRequest, 2)
assert response.status == fabric_pb2.Response.SUCCESS, 'Failure getting Transaction Result from {0}, for user "{1}": {2}'.format(userRegistration.composeService,enrollId, response.msg)
Expand All @@ -45,7 +45,7 @@ def getTxResult(context, enrollId):
return txResult

def getGRPCChannel(ipAddress):
channel = implementations.insecure_channel(ipAddress, 30303)
channel = implementations.insecure_channel(ipAddress, 7051)
print("Returning GRPC for address: {0}".format(ipAddress))
return channel

Expand All @@ -58,7 +58,7 @@ def getGRPCChannelAndUser(context, enrollId):

channel = getGRPCChannel(ipAddress)

return (channel, userRegistration)
return (channel, userRegistration)


def getDeployment(context, ccAlias):
Expand All @@ -69,9 +69,9 @@ def getDeployment(context, ccAlias):
else:
context.deployments = {}
if ccAlias in context.deployments:
deployment = context.deployments[ccAlias]
deployment = context.deployments[ccAlias]
# else:
# raise Exception("Deployment alias not found: '{0}'. Are you sure you have deployed a chaincode with this alias?".format(ccAlias))
# raise Exception("Deployment alias not found: '{0}'. Are you sure you have deployed a chaincode with this alias?".format(ccAlias))
return deployment

def deployChaincode(context, enrollId, chaincodePath, ccAlias, ctor):
Expand Down Expand Up @@ -106,17 +106,17 @@ def invokeChaincode(context, enrollId, ccAlias, functionName):
# Create a new ChaincodeSpec by copying the deployed one
newChaincodeSpec = chaincode_pb2.ChaincodeSpec()
newChaincodeSpec.CopyFrom(deployedCcSpec)

# Update hte chaincodeSpec ctorMsg for invoke
args = getArgsFromContextForUser(context, enrollId)
chaincodeInput = chaincode_pb2.ChaincodeInput(function = functionName, args = args )

chaincodeInput = chaincode_pb2.ChaincodeInput(function = functionName, args = args )
newChaincodeSpec.ctorMsg.CopyFrom(chaincodeInput)

ccInvocationSpec = chaincode_pb2.ChaincodeInvocationSpec(chaincodeSpec = newChaincodeSpec)

(channel, userRegistration) = getGRPCChannelAndUser(context, enrollId)

stub = devops_pb2.beta_create_Devops_stub(channel)
response = stub.Invoke(ccInvocationSpec,2)
return response
Expand Down
2 changes: 1 addition & 1 deletion bddtests/steps/peer_basic_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import bdd_test_util

CORE_REST_PORT = 5000
CORE_REST_PORT = 7050
JSONRPC_VERSION = "2.0"

class ContainerData:
Expand Down
2 changes: 1 addition & 1 deletion core/chaincode/chaincode_support.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const (
DevModeUserRunsChaincode string = "dev"
chaincodeStartupTimeoutDefault int = 5000
chaincodeInstallPathDefault string = "/opt/gopath/bin/"
peerAddressDefault string = "0.0.0.0:30303"
peerAddressDefault string = "0.0.0.0:7051"
)

// chains is a map between different blockchains and their ChaincodeSupport.
Expand Down
6 changes: 3 additions & 3 deletions core/chaincode/chaincodetest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ eca:
cli:

# The address that the cli process will use for callbacks from chaincodes
address: 0.0.0.0:30304
address: 0.0.0.0:7052



Expand All @@ -98,7 +98,7 @@ rest:
enabled: true

# The address that the REST service will listen on for incoming requests.
address: 0.0.0.0:5000
address: 0.0.0.0:7050


###############################################################################
Expand Down Expand Up @@ -226,7 +226,7 @@ peer:

events:
# The address that the Event service will be enabled on the validator
address: 0.0.0.0:31315
address: 0.0.0.0:7053

# total number of events that could be buffered without blocking the
# validator sends
Expand Down
Loading

0 comments on commit dad7a9d

Please sign in to comment.