(Migrated) How to make services available from outside

(This message has been automatically imported from the retired mailing list)

I followed the tutorial part I to make an initial service, and I’m able
to invoke it with curl from the server itself with the command:

curl localhost:11223/tutorial/first-service -d ‘{}’

My next attempt was to try to do it from my PC with:

curl <servers’ip>:11223/tutorial/first-service -d ‘{}’

The resulted in a ‘connection refused’ error. So I went to the web admin
interface and tried to set the load balancer’s ip to the servers’ ip (it
was 127.0.0.1). Then the call from my PC went well, but after I made the
configuration change I was no longer able to list the service using the
admin. Trying to do so resulted in a Python traceback in the browser.

What is wrong?

Regards,

Finn Gruwier Larsen

On 11/21/2013 08:17 PM, Finn Gruwier Larsen wrote:

My next attempt was to try to do it from my PC with:

curl <servers’ip>:11223/tutorial/first-service -d ‘{}’

The resulted in a ‘connection refused’ error. So I went to the web admin
interface and tried to set the load balancer’s ip to the servers’ ip (it
was 127.0.0.1). Then the call from my PC went well, but after I made the
configuration change I was no longer able to list the service using the
admin. Trying to do so resulted in a Python traceback in the browser.

Hi Finn,

the default configuration of quickstart clusters sets everything up on
localhost, as you know, and there’s a couple of steps needed to have
quickstart available from the outside.

The instructions below assume a clean state of a working quickstart
cluster and were sent in by one of the users - they will serve as a
basis for a future blog post/a new chapter in the docs.

  • Go to the web admin, clusters section-
    Click on Edit, to edit the cluster definition and substitute 0.0.0.0 to
    127.0.0.1 (or localhost) into the LB host field

  • Click on Load-balancer, and edit PLAIN HTTP host field, from 127.0.0.1
    to 0.0.0.0, then Validate and Save.

  • Modify the servers’ server.conf configuration files, under
    /path/to/zato/server1/config/repo/server.conf and
    /path/to/zato/server2/config/repo/server.conf, changing the bind address
    in the second line, from 127.0.0.1 to 0.0.0.0

[main]
gunicorn_bind=0.0.0.0:17010

As a side note - quickstart is simply a convenient means to have a
working environment so there is nothing in the docs specific to making
it accessible to external systems, i.e. a quickstart is simply two
servers, LB an web admin conveniently wrapped under a single command.

But I can easily see the need to document it how such a setup should be
exposed to the outside world so like I say, this will be covered in the
docs as well.

On 11/21/2013 08:17 PM, Finn Gruwier Larsen wrote:

My next attempt was to try to do it from my PC with:

curl <servers’ip>:11223/tutorial/first-service -d ‘{}’

The resulted in a ‘connection refused’ error. So I went to the web admin
interface and tried to set the load balancer’s ip to the servers’ ip (it
was 127.0.0.1). Then the call from my PC went well, but after I made the
configuration change I was no longer able to list the service using the
admin. Trying to do so resulted in a Python traceback in the browser.

Hi Finn,

the default configuration of quickstart clusters sets everything up on
localhost, as you know, and there’s a couple of steps needed to have
quickstart available from the outside.

The instructions below assume a clean state of a working quickstart
cluster and were sent in by one of the users - they will serve as a
basis for a future blog post/a new chapter in the docs.

  • Go to the web admin, clusters section-
    Click on Edit, to edit the cluster definition and substitute 0.0.0.0 to
    127.0.0.1 (or localhost) into the LB host field

  • Click on Load-balancer, and edit PLAIN HTTP host field, from 127.0.0.1
    to 0.0.0.0, then Validate and Save.

  • Modify the servers’ server.conf configuration files, under
    /path/to/zato/server1/config/repo/server.conf and
    /path/to/zato/server2/config/repo/server.conf, changing the bind address
    in the second line, from 127.0.0.1 to 0.0.0.0

[main]
gunicorn_bind=0.0.0.0:17010

As a side note - quickstart is simply a convenient means to have a
working environment so there is nothing in the docs specific to making
it accessible to external systems, i.e. a quickstart is simply two
servers, LB an web admin conveniently wrapped under a single command.

But I can easily see the need to document it how such a setup should be
exposed to the outside world so like I say, this will be covered in the
docs as well.