1
votes

I have 3 nodes: nginx as third-party load balancer, 1 manager node, 1 worker node (just to test my setup and configs, you know). I'm doing all like in this tutorial: https://docs.wso2.com/display/CLUSTER420/Clustering+WSO2+Products+without+WSO2+ELB#ClusteringWSO2ProductswithoutWSO2ELB-Configuringthethird-partyloadbalancer So i'm starting my manager node, everything seems to be ok, i'm entering managment console successfully. And now i'm starting worker node like sh ./bin/wso2server.sh -DworkerNode=true , and i'm expecting to see in Managment Console's system logs or in Manager log something like "member joined". But I don't see. So where can be the problem? Worker starting without any error in logs. Maybe something is wrong about my nginx.conf?

upstream wrk.esb {
    server wrk.esb:9763;
}
server {
    listen 80;
server_name wrk.esb;
    location / {
        proxy_pass http://wrk.esb;
    }
}
upstream ssl.wrk.esb {
    server wrk.esb:9443;
}
server {
     listen 443;
 server_name wrk.esb;
     ssl on;
     ssl_certificate /etc/nginx/ssl/wrk.crt;
     ssl_certificate_key /etc/nginx/ssl/wrk.key; 
     location / {
        proxy_pass https://ssl.wrk.esb;
    }
}
server {
    listen 443;
server_name mgt.esb;
    ssl on;
#proxy_ssl_session_reuse off;
#proxy_set_header X-Forwarded-Host $host;
#proxy_set_header X-Forwarded-For $remote_addr;
    ssl_certificate /etc/nginx/ssl/mgt.crt;
    ssl_certificate_key /etc/nginx/ssl/mgt.key;
    location /carbon {
        proxy_pass https://mgt.esb:9443;
    #proxy_redirect https://10.0.13.4:9443 https://mgt.esb  
    #proxy_ssl_session_reuse off;
        #proxy_set_header X-Forwarded-Host $host;
        #proxy_set_header X-Forwarded-For $remote_addr;
    #proxy_set_header X-Forwarded-Server $host;     
    }
}

}

In fact, I can't see any line of code inside wso2server.sh script that can parse my -DworkerNode=true or -Dsetup input variales! So, there is no matter starting with -DworkerNode=true or -Dsetup - it's starting always like a manager... I've found also nice article http://sajithswa.blogspot.ru/2015/01/blog-post.html. And it is confusing, but many things there are different from tutorial that i've mentioned above.

1

1 Answers

0
votes

I think I've solved this problem. The deal was in that thing, that one must set <parameter name="localMemberHost"></parameter> in axis2.xml exactly as host, not ip. So, my manager's axis2.xml should have this line: <parameter name="localMemberHost">mgt.esb</parameter>, on worker in file axis2.xml this line:<parameter name="localMemberHost">wrk.esb</parameter> . And also it is necessary to set in /etc/hosts both on manager and worker nodes this lines: <ip_of_manager> mgt.esb and <ip_of_worker> wrk.esb.