how to configure http loadbalancer??

50 views
Skip to first unread message

Hee-Sung Kim

unread,
Feb 16, 2015, 7:35:17 AM2/16/15
to scalr-...@googlegroups.com
HI. there...

after using the Scalr packages installation, i can not create role from a non-scalr-server.

    * one proxy server + one server (all the service for scalr) + one db server
      - proxy server ip : 192.168.56.10
      - service for scalr server ip : 192.168.56.20
      - db server ip : 192.168.56.30
      - non-scalr-server ip : 192.168.56.40

when the non-scalr-server(192.168.56.40) was imported, outbound (scalr -> non-scalr-server) communication couldn't be established.

- error message 

         Could not establish communication with 192.168.56.10:8013

is there some function like DSR(Direct Server Return) on scalr-proxy-server so that the server could send return traffic directly to the client..??
that ip is proxy-server-ip, not non-scalr-server ip..

Thomas Orozco

unread,
Feb 16, 2015, 11:23:30 AM2/16/15
to scalr-...@googlegroups.com

Hi there,

8013 is the port Scalr uses to connect to the agent on the instance you're importing.

But here, it looks like Scalr is trying to connect to the agent on your proxy server.

Can you double check you selected the right server in the import step (that you didn't unintentionally select the proxy server)

If that doesn't seem work, can you send a screenshot of your sever import screen?

---

To answer your second question: Scalr -> Instances communication does *not* go through the proxy.

Cheers,

--
You received this message because you are subscribed to the Google Groups "scalr-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalr-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hee-Sung Kim

unread,
Feb 16, 2015, 7:02:15 PM2/16/15
to scalr-...@googlegroups.com
Hi.. thomas..

it seems like not to pass the client ip to app-server.... 
i think... proxy-server needs like DSR function..
or possible to use and configure DSR (Direct Server Return) on proxy-server??

2015년 2월 17일 화요일 오전 1시 23분 30초 UTC+9, Thomas Orozco 님의 말:
web.PNG
app-server.PNG
client.PNG

Hee-Sung Kim

unread,
Feb 16, 2015, 7:03:36 PM2/16/15
to scalr-...@googlegroups.com
host IPs..

172.19.130.119  proxy
172.19.130.120  app
172.19.130.121  mysql

2015년 2월 17일 화요일 오전 9시 2분 15초 UTC+9, Hee-Sung Kim 님의 말:

Hee-Sung Kim

unread,
Feb 16, 2015, 7:05:41 PM2/16/15
to scalr-...@googlegroups.com


2015년 2월 17일 화요일 오전 9시 2분 15초 UTC+9, Hee-Sung Kim 님의 말:
Hi.. thomas..
web.PNG

Thomas Orozco

unread,
Feb 16, 2015, 7:23:11 PM2/16/15
to scalr-...@googlegroups.com
You seem to not be importing the right server.

According to your screenshot, the server you're trying to import has IP 172.19.130.118.

However, the server you are trying to import (i.e. the one you selected in the Server dropdown has IP 172.19.130.119, which is your load balancer's IP).

Are you sure d8ab80a4-... is the right server? Can you provide a screenshot of your Horizon OpenStack dashboard (or a screenshot of a nova list CLI call) showing your 3 Scalr Servers and the one you are trying to import?

As for DSR: no, Scalr does not use DSR, and you're not supposed to somehow enable DSR to use Scalr.

Cheers, 

Hee-Sung Kim

unread,
Feb 16, 2015, 9:46:54 PM2/16/15
to scalr-...@googlegroups.com

My host ips
  - client(scalarizr) : 172.19.130.118
  - proxy server     : 172.19.130.119
  - app web server : 172.19.130.120
  - mysql DB server : 172.19.130.121

it is right server..

scalarizr (172.19.130.118) -> proxy (172.19.130.119) (mod_proxy Loadbalancer by scalr-package-installation, only proxy[:enable] = true) -> app web server (172.19.130.120) (all web[:enable] = true, cron[:enable] = true, service[:enable] = true and memcached[:enable] = true)

the app-web-server (SCALR) does not know the client ip except for proxy-ip.
web-openstack-.PNG
web-openstack-2.PNG
web.PNG

Igor Savchenko

unread,
Feb 17, 2015, 12:43:17 PM2/17/15
to scalr-...@googlegroups.com
Hi Hee-Sung Kim,

What is the value of scalr.instances_connection_policy configuration
in your config.yml?

Regards,
Igor

Thomas Orozco

unread,
Feb 17, 2015, 12:47:11 PM2/17/15
to scalr-...@googlegroups.com
Just in case: this file is found in /opt/scalr-server/embedded/scalr/app/etc/config.yml

Cheers,

-- Thomas | Product Manager @ Scalr | tho...@scalr.com | www.scalr.com | blog.scalr.com

Hee-Sung Kim

unread,
Feb 17, 2015, 9:16:33 PM2/17/15
to scalr-...@googlegroups.com
hi.. igor and thomas...

i am out of town...
when i get back from, i will check and give u that value..

thank you...
Message has been deleted

Hee-Sung Kim

unread,
Feb 19, 2015, 8:43:57 AM2/19/15
to scalr-...@googlegroups.com
HI... Igor and thomas..

scalr.instances_connection_policy is auto..

It looks like the value is not any affect on the major issue..

change this value???

Thomas Orozco

unread,
Feb 19, 2015, 12:06:28 PM2/19/15
to scalr-...@googlegroups.com
Hey Hee-Sung,

To debug your issue further, please:
- Copy this script to your server, and make it executable: https://gist.github.com/krallin/915c33b7091375ee336b
- Launch the import process
- When the error occurs, execute the script 

Then, provide us with the output.

Thanks!

-- Thomas | Product Manager @ Scalr | tho...@scalr.com | www.scalr.com | blog.scalr.com

Hee-Sung Kim

unread,
Feb 19, 2015, 7:22:19 PM2/19/15
to scalr-...@googlegroups.com
here the output..

[root@proxy-server debug-scalr-remote-ip]# python gistfile1.txt
(5, 'feceab42-a5a6-4c3d-aba6-424353479caf', 0.0737231, 1, 1, datetime.datetime(2015, 2, 19, 23, 54, 53), datetime.datetime(2015, 2, 19, 23, 54, 50), '<?xml version="1.0" encoding="utf-8"?><message id="feceab42-a5a6-4c3d-aba6-424353479caf" name="Hello"><meta><szr_version>3.3.5</szr_version><server_id>ba6c749d-4a50-4210-9d09-447a16ea81fc</server_id><timestamp>Thu 19 Feb 2015 23:54:48 </timestamp></meta><body><server_id>ba6c749d-4a50-4210-9d09-447a16ea81fc</server_id><dist><distributor>centos</distributor><release>6.6</release><codename>Final</codename></dist><local_ip>172.19.130.118</local_ip><storage><lvm>1</lvm><fstypes><item>ext3</item><item>ext4</item></fstypes></storage><behaviour/><role_name>test-debug</role_name><architecture>x86_64</architecture><remote_ip>172.19.130.118</remote_ip><os><arch>x86_64</arch><version>CentOS 6.6 Final</version><string_version>Linux test-image 2.6.32-504.8.1.el6.x86_64 #1 SMP Wed Jan 28 21:11:36 UTC 2015 x86_64 x86_64</string_version></os><software><item><version>2.6.6</version><name>python</name></item></software></body></message>', 'ba6c749d-4a50-4210-9d09-447a16ea81fc', None, 'in', 'Hello', None, 'xml', '172.19.130.119', None)

[root@app-server debug-scalr-remote-ip]# python gistfile1.txt
(5, 'feceab42-a5a6-4c3d-aba6-424353479caf', 0.0737231, 1, 1, datetime.datetime(2015, 2, 19, 23, 54, 53), datetime.datetime(2015, 2, 19, 23, 54, 50), '<?xml version="1.0" encoding="utf-8"?><message id="feceab42-a5a6-4c3d-aba6-424353479caf" name="Hello"><meta><szr_version>3.3.5</szr_version><server_id>ba6c749d-4a50-4210-9d09-447a16ea81fc</server_id><timestamp>Thu 19 Feb 2015 23:54:48 </timestamp></meta><body><server_id>ba6c749d-4a50-4210-9d09-447a16ea81fc</server_id><dist><distributor>centos</distributor><release>6.6</release><codename>Final</codename></dist><local_ip>172.19.130.118</local_ip><storage><lvm>1</lvm><fstypes><item>ext3</item><item>ext4</item></fstypes></storage><behaviour/><role_name>test-debug</role_name><architecture>x86_64</architecture><remote_ip>172.19.130.118</remote_ip><os><arch>x86_64</arch><version>CentOS 6.6 Final</version><string_version>Linux test-image 2.6.32-504.8.1.el6.x86_64 #1 SMP Wed Jan 28 21:11:36 UTC 2015 x86_64 x86_64</string_version></os><software><item><version>2.6.6</version><name>python</name></item></software></body></message>', 'ba6c749d-4a50-4210-9d09-447a16ea81fc', None, 'in', 'Hello', None, 'xml', '172.19.130.119', None)


please refer 
in the old days, i tested some LB (haporxy, lvs) for multi-cluster-environment.
using linux LVS(ldirectord) via DR(direct routing), it was work..
but haporxy gave me same error like scalr-proxy.

2015년 2월 20일 금요일 오전 2시 6분 28초 UTC+9, Thomas Orozco 님의 말:

Thomas Orozco

unread,
Feb 19, 2015, 8:43:34 PM2/19/15
to scalr-...@googlegroups.com
Thanks,

Can you please do the following steps on all your Scalr servers:
- Add the attached path (e.g. in /tmp/the.patch)
- cd to /opt/scalr-server/embedded/scalr
- Apply the patch with patch -p1 < /tmp/the.patch (or wherever you put it)
- Kill all the scalr daemons (this is a bit hackish for now, but will change in the next release): killall -9 php

Then, retry your import. 

Let us know if that works!

Cheers, 
0001-Candidate-fix.patch

Hee-Sung Kim

unread,
Feb 20, 2015, 9:46:04 PM2/20/15
to scalr-...@googlegroups.com
Hi.. Thomas...

work... it's working.. good.. great... :)

Thank you Thomas..

2015년 2월 20일 금요일 오전 10시 43분 34초 UTC+9, Thomas Orozco 님의 말:

Thomas Orozco

unread,
Feb 20, 2015, 9:49:16 PM2/20/15
to scalr-...@googlegroups.com
Glad to hear that!

-- Thomas | Product Manager @ Scalr | tho...@scalr.com | www.scalr.com | blog.scalr.com

Reply all
Reply to author
Forward
0 new messages