It's good practice to use 0.0.0.0 instead of localhost if you want to
listen on all network interfaces.

Best,
Christian

Sent from a mobile device
Am 15.08.2012 14:15 schrieb "balkishore" <balkishore.pan...@gmail.com>:

> Dear memebers,
> This would be my first post in this forum and I am glad. I have started
> using camel a while back for a project of mine to create a load balancing
> application.
>
> Well to start with,
> My load balncer would listen to a port, lets say 8080 and would balance all
> the incoming SOAP requests to a set of backened servers.
> These backend servers have apache tomcat installed and listen to port 8080.
> The load balancer would be recieving the request from a web browser.
> I would have configured the clients in such a way that they would send the
> request directly to load balancer.
>
> Now I have written a small route for initial phase, which is as follow:
>
>
> public class LoadBalancer {
>    public static void main(String args[]) throws Exception {
>           CamelContext context = new DefaultCamelContext();
>
>         context.addRoutes(new RouteBuilder() {
>
>             public void configure() {
>                 from("jetty://http://localhost:8080";)
>
> .loadBalance().roundRobin().to("http://172.28.39.138:8080",";
> http://172.168.20.118:8080";);
>             }
>         });
>
>         context.start();
>
>         Thread.sleep(100000);
>         context.stop();
>     }
>  }
>
>  As it can be seen, i am forwarding all the request to two ip address.
>  When I run this code, I don't get any error, but my client browser shows
> an
> error which explicitly means that the request was not recieved by the load
> balancer server.
> And when I type localhost:8080, on the local computer where the camel is
> running, I get
>
> HTTP ERROR: 404
> Problem accessing /. Reason:
>
>     Not Found
>
> I have no idea, why the requests are not being recieved by the camel and
> why
> am i getting this error in the browser.
>
> Any help would be very much appreciated. I even tried to log the incoming
> request using this piece of code
> from("jetty://http://localhost:8080";)
>                 .to("file:output");
>                 from("file://output").process(new Processor() {
>
>                         private Exchange e;
>
>                                         public void process(Exchange
> exchange) throws Exception {
>                         System.out.println("Received exchange:" +
> e.getIn());
>                    }
>                 });
>
> But it seems my camel isn't recieveing any request at all and i get
> nothing.
>
> Any help would be really useful as I am struck in this phase for a long
> time.
>
> Cheers!
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Load-balancing-camel-in-real-world-tp5717381.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to