Skip to content

How to configure tcp router? #16

@samdai

Description

@samdai

I deployed two applications app1 and app2 to diego, in application app1, I started an activemq server, the port is 61616, in application app2, I create a java client to connect the activemq server in app1, but there is the following error, I can telnet app1.bosh-lite.com:61616 in command console of my lap-top, but can't do it in app2, I also tried the ip address of app1, got the same error

message: Could not connect to broker URL: tcp://app1.bosh-lite.com:61616. Reason: java.net.ConnectException: Connection refused

I also deployed cf-routing-release to bosh-lite, but didn't work, got the same error. I have two questions here:
(1) I saw cf release has already sub module cf-routing-release, does cf release support tcp router if I don't git clone cf-routing-release and deploy it to bosh-lite?
(2) I also tried an API call to map an external port on the router to the app1.bosh-lite.com:61616

curl 10.24.0.134:3000/routing/v1/tcp_routes/create -X POST -d '[{"route":{"router_group_guid": "tcp-default", "port": 61616}, "backend_ip": "app1.bosh-lite.com", "backend_port": 61616}]'

But got the following error:

curl: (52) Empty reply from server

The result of command bosh vms is as below:

Deployment `cf-warden'

Director task 30

Task 30 done

+------------------------------------+---------+---------------+--------------+
| Job/index                          | State   | Resource Pool | IPs          |
+------------------------------------+---------+---------------+--------------+
| api_z1/0                           | running | large_z1      | 10.244.0.134 |
| consul_z1/0                        | running | small_z1      | 10.244.0.54  |
| doppler_z1/0                       | running | medium_z1     | 10.244.0.142 |
| etcd_z1/0                          | running | medium_z1     | 10.244.0.42  |
| ha_proxy_z1/0                      | running | router_z1     | 10.244.0.34  |
| hm9000_z1/0                        | running | medium_z1     | 10.244.0.138 |
| loggregator_trafficcontroller_z1/0 | running | small_z1      | 10.244.0.146 |
| nats_z1/0                          | running | medium_z1     | 10.244.0.6   |
| postgres_z1/0                      | running | medium_z1     | 10.244.0.30  |
| router_z1/0                        | running | router_z1     | 10.244.0.22  |
| runner_z1/0                        | running | runner_z1     | 10.244.0.26  |
| uaa_z1/0                           | running | medium_z1     | 10.244.0.130 |
+------------------------------------+---------+---------------+--------------+

VMs total: 12
Deployment `cf-warden-diego'

Director task 31

Task 31 done

+--------------------+---------+------------------+---------------+
| Job/index          | State   | Resource Pool    | IPs           |
+--------------------+---------+------------------+---------------+
| access_z1/0        | running | access_z1        | 10.244.16.6   |
| brain_z1/0         | running | brain_z1         | 10.244.16.134 |
| cc_bridge_z1/0     | running | cc_bridge_z1     | 10.244.16.142 |
| cell_z1/0          | running | cell_z1          | 10.244.16.138 |
| database_z1/0      | running | database_z1      | 10.244.16.130 |
| route_emitter_z1/0 | running | route_emitter_z1 | 10.244.16.146 |
+--------------------+---------+------------------+---------------+

VMs total: 6
Deployment `cf-warden-routing'

Director task 32

Task 32 done

+-----------------+---------+---------------+------------+
| Job/index       | State   | Resource Pool | IPs        |
+-----------------+---------+---------------+------------+
| tcp_router_z1/0 | running | tcp_router_z1 | 10.244.8.2 |
+-----------------+---------+---------------+------------+

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions