Re: [opencontrail-dev] analytics-api not giving proper results when queried on another IP than 127.0.0.1

2015-04-29 Thread Raj Reddy
Hi Martin,

Our analytics design requires redis to be running locally (w/ no sentinel, no 
clustering)
on each of the analytics nodes. And as Pedro stated, we do not depend on redis 
being
persistent - data is recreated when we connect to redis.

regards,
-
Raj

On Apr 29, 2015, at 12:23 PM, Martin Loschwitz 
 wrote:

> Sorry,
> 
> i just rememberd a discussion Michael Renner recently had with Pedro, in 
> which Pedro
> stated that redis doesn’t have to be persistent anyway. Okay, if that’s the 
> case, we will
> just do away with the idea of sentinel altogether.
> 
> Best regards
> Martin
> 
>> Am 29.04.2015 um 21:20 schrieb Martin Loschwitz :
>> 
>> Hallo Raj,
>> 
>> no. We’re running Redis with Sentinel here, and access to Redis is possible 
>> through an
>> HAProxy load balancer that will ensure that nodes always land on the one 
>> redis node that
>> is currently the master of the sentinel cluster. I don’t see how scaling out 
>> redis for purposes
>> of performance and high availability would work in any other way. We’ll need 
>> the analytics
>> api to be fixed to allow to specify an arbitrary ip address to connect to 
>> redis. Shall I fill a 
>> bug in Launchpad?
>> 
>> Best regards
>> Martin
>> 
>>> Am 29.04.2015 um 21:17 schrieb Raj Reddy :
>>> 
>>> Hi Martin,
>>> 
>>> It appears we are relying on the fact that redis is listening on 0.0.0.0
>>> You can comment the redis.conf bindip parameter or change it to 0.0.0.0
>>> 
>>> regards,
>>> -
>>> Raj
>> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org


Re: [opencontrail-dev] analytics-api not giving proper results when queried on another IP than 127.0.0.1

2015-04-29 Thread Martin Loschwitz
Sorry,

i just rememberd a discussion Michael Renner recently had with Pedro, in which 
Pedro
stated that redis doesn’t have to be persistent anyway. Okay, if that’s the 
case, we will
just do away with the idea of sentinel altogether.

Best regards
Martin

> Am 29.04.2015 um 21:20 schrieb Martin Loschwitz :
> 
> Hallo Raj,
> 
> no. We’re running Redis with Sentinel here, and access to Redis is possible 
> through an
> HAProxy load balancer that will ensure that nodes always land on the one 
> redis node that
> is currently the master of the sentinel cluster. I don’t see how scaling out 
> redis for purposes
> of performance and high availability would work in any other way. We’ll need 
> the analytics
> api to be fixed to allow to specify an arbitrary ip address to connect to 
> redis. Shall I fill a 
> bug in Launchpad?
> 
> Best regards
> Martin
> 
>> Am 29.04.2015 um 21:17 schrieb Raj Reddy :
>> 
>> Hi Martin,
>> 
>> It appears we are relying on the fact that redis is listening on 0.0.0.0
>> You can comment the redis.conf bindip parameter or change it to 0.0.0.0
>> 
>> regards,
>> -
>> Raj
> 


___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org


Re: [opencontrail-dev] analytics-api not giving proper results when queried on another IP than 127.0.0.1

2015-04-29 Thread Martin Loschwitz
Hallo Raj,

no. We’re running Redis with Sentinel here, and access to Redis is possible 
through an
HAProxy load balancer that will ensure that nodes always land on the one redis 
node that
is currently the master of the sentinel cluster. I don’t see how scaling out 
redis for purposes
of performance and high availability would work in any other way. We’ll need 
the analytics
api to be fixed to allow to specify an arbitrary ip address to connect to 
redis. Shall I fill a 
bug in Launchpad?

Best regards
Martin

> Am 29.04.2015 um 21:17 schrieb Raj Reddy :
> 
> Hi Martin,
> 
> It appears we are relying on the fact that redis is listening on 0.0.0.0
> You can comment the redis.conf bindip parameter or change it to 0.0.0.0
> 
> regards,
> -
> Raj


___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org


Re: [opencontrail-dev] analytics-api not giving proper results when queried on another IP than 127.0.0.1

2015-04-29 Thread Raj Reddy
Hi Martin,

It appears we are relying on the fact that redis is listening on 0.0.0.0
You can comment the redis.conf bindip parameter or change it to 0.0.0.0

regards,
-
Raj

On Apr 29, 2015, at 9:39 AM, Martin Loschwitz  wrote:

> Me again,
> 
> looking into 
> https://github.com/Juniper/contrail-controller/blob/R2.0/src/opserver/opserver.py,
>  
> it looks as if 127.0.0.1 is hardcoded there a couple of times?!
> 
> Best regards
> Martin
> 
>> Am 29.04.2015 um 18:36 schrieb Martin Loschwitz :
>> 
>> Hello Raj,
>> 
>> thanks for the pointer! Stupid me … so I am one step further now and see, in 
>> the webinterface log,
>> this:
>> 
>> 2015-04-29T16:28:27.942Z - error: URL 
>> [http://77.247.XXX.XXX:8081/analytics/query] returned error ["Failure in 
>> connection to the query DB"]
>> 2015-04-29T16:28:27.942Z - error: Error Run Query: REST Server Error: 
>> Failure in connection to the query DB
>> 
>> At the same time, I see the analytics API doing this:
>> 
>> [2015-04-29 18:26:43] "POST /analytics/query HTTP/1.1" 500 172 0.001288
>> 
>> In an strace, I see this:
>> 
>> [pid 47174] connect(8, {sa_family=AF_INET, sin_port=htons(6379), 
>> sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in 
>> progress)
>> 
>> So it looks like it is connecting to redis on the local host, albeit having 
>> the
>> following in contrail-analytics-api.conf:
>> 
>> [REDIS]
>> server = 77.247.XXX.XXX
>> redis_server_port = 6379
>> redis_query_port = 6379
>> 
>> What’s wrong here? :(
>> 
>> Best regards
>> Martin
>> 
>>> Am 29.04.2015 um 18:16 schrieb Raj Reddy :
>>> 
>>> by default analytics-api listens at 0.0.0.0:8081 -- both methods should 
>>> have worked without any config change..
>>> 
>>> You should look at what's the listen ip using
>>> netstat -anp | grep 8081..
>>> 
>>> regards,
>>> -
>>> Raj
>>> 
>>> On Apr 29, 2015, at 7:08 AM, Martin Gerhard Loschwitz 
>>> 
>>> wrote:
>>> 
 Folks,
 
 I see this when trying to query the analytics-api IP address:
 
 cloud14# curl 77.247.XXX.XXX:8081/analytics/tables
 curl: (52) Empty reply from server
 
 But when I reconfigure the API to listen on 127.0.0.1 and query that one, 
 I get:
 
 cloud14# curl 127.0.0.1:8081/analytics/tables
 [{"href": "http://127.0.0.1:8081/analytics/table/MessageTable";, "type": 
 "LOG", "name": "MessageTable"} ...
 
 What's going on here, and how do I fix the issue?
 
 Best regards
 Martin
 
 —
 Martin Gerhard Loschwitz
 OpenStack DACH e.V.
 Neuköllner Str. 306
 D-12357 Berlin
 
 T: +49 1511 9305928
 W: http://www.openstack-dach.org/
 
 ___
 Dev mailing list
 Dev@lists.opencontrail.org
 http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org
>>> 
>> 
>> 
>> ___
>> Dev mailing list
>> Dev@lists.opencontrail.org
>> http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org


Re: [opencontrail-dev] analytics-api not giving proper results when queried on another IP than 127.0.0.1

2015-04-29 Thread Martin Loschwitz
Me again,

looking into 
https://github.com/Juniper/contrail-controller/blob/R2.0/src/opserver/opserver.py,
 
it looks as if 127.0.0.1 is hardcoded there a couple of times?!

Best regards
Martin

> Am 29.04.2015 um 18:36 schrieb Martin Loschwitz :
> 
> Hello Raj,
> 
> thanks for the pointer! Stupid me … so I am one step further now and see, in 
> the webinterface log,
> this:
> 
> 2015-04-29T16:28:27.942Z - error: URL 
> [http://77.247.XXX.XXX:8081/analytics/query] returned error ["Failure in 
> connection to the query DB"]
> 2015-04-29T16:28:27.942Z - error: Error Run Query: REST Server Error: Failure 
> in connection to the query DB
> 
> At the same time, I see the analytics API doing this:
> 
> [2015-04-29 18:26:43] "POST /analytics/query HTTP/1.1" 500 172 0.001288
> 
> In an strace, I see this:
> 
> [pid 47174] connect(8, {sa_family=AF_INET, sin_port=htons(6379), 
> sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in 
> progress)
> 
> So it looks like it is connecting to redis on the local host, albeit having 
> the
> following in contrail-analytics-api.conf:
> 
> [REDIS]
> server = 77.247.XXX.XXX
> redis_server_port = 6379
> redis_query_port = 6379
> 
> What’s wrong here? :(
> 
> Best regards
> Martin
> 
>> Am 29.04.2015 um 18:16 schrieb Raj Reddy :
>> 
>> by default analytics-api listens at 0.0.0.0:8081 -- both methods should have 
>> worked without any config change..
>> 
>> You should look at what's the listen ip using
>> netstat -anp | grep 8081..
>> 
>> regards,
>> -
>> Raj
>> 
>> On Apr 29, 2015, at 7:08 AM, Martin Gerhard Loschwitz 
>> 
>> wrote:
>> 
>>> Folks,
>>> 
>>> I see this when trying to query the analytics-api IP address:
>>> 
>>> cloud14# curl 77.247.XXX.XXX:8081/analytics/tables
>>> curl: (52) Empty reply from server
>>> 
>>> But when I reconfigure the API to listen on 127.0.0.1 and query that one, I 
>>> get:
>>> 
>>> cloud14# curl 127.0.0.1:8081/analytics/tables
>>> [{"href": "http://127.0.0.1:8081/analytics/table/MessageTable";, "type": 
>>> "LOG", "name": "MessageTable"} ...
>>> 
>>> What's going on here, and how do I fix the issue?
>>> 
>>> Best regards
>>> Martin
>>> 
>>> —
>>> Martin Gerhard Loschwitz
>>> OpenStack DACH e.V.
>>> Neuköllner Str. 306
>>> D-12357 Berlin
>>> 
>>> T: +49 1511 9305928
>>> W: http://www.openstack-dach.org/
>>> 
>>> ___
>>> Dev mailing list
>>> Dev@lists.opencontrail.org
>>> http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org
>> 
> 
> 
> ___
> Dev mailing list
> Dev@lists.opencontrail.org
> http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org


___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org


Re: [opencontrail-dev] analytics-api not giving proper results when queried on another IP than 127.0.0.1

2015-04-29 Thread Martin Loschwitz
Hello Raj,

thanks for the pointer! Stupid me … so I am one step further now and see, in 
the webinterface log,
this:

2015-04-29T16:28:27.942Z - error: URL 
[http://77.247.XXX.XXX:8081/analytics/query] returned error ["Failure in 
connection to the query DB"]
2015-04-29T16:28:27.942Z - error: Error Run Query: REST Server Error: Failure 
in connection to the query DB

At the same time, I see the analytics API doing this:

[2015-04-29 18:26:43] "POST /analytics/query HTTP/1.1" 500 172 0.001288

In an strace, I see this:

[pid 47174] connect(8, {sa_family=AF_INET, sin_port=htons(6379), 
sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in 
progress)

So it looks like it is connecting to redis on the local host, albeit having the
following in contrail-analytics-api.conf:

[REDIS]
server = 77.247.XXX.XXX
redis_server_port = 6379
redis_query_port = 6379

What’s wrong here? :(

Best regards
Martin

> Am 29.04.2015 um 18:16 schrieb Raj Reddy :
> 
> by default analytics-api listens at 0.0.0.0:8081 -- both methods should have 
> worked without any config change..
> 
> You should look at what's the listen ip using
> netstat -anp | grep 8081..
> 
> regards,
> -
> Raj
> 
> On Apr 29, 2015, at 7:08 AM, Martin Gerhard Loschwitz 
> 
>  wrote:
> 
>> Folks,
>> 
>> I see this when trying to query the analytics-api IP address:
>> 
>> cloud14# curl 77.247.XXX.XXX:8081/analytics/tables
>> curl: (52) Empty reply from server
>> 
>> But when I reconfigure the API to listen on 127.0.0.1 and query that one, I 
>> get:
>> 
>> cloud14# curl 127.0.0.1:8081/analytics/tables
>> [{"href": "http://127.0.0.1:8081/analytics/table/MessageTable";, "type": 
>> "LOG", "name": "MessageTable"} ...
>> 
>> What's going on here, and how do I fix the issue?
>> 
>> Best regards
>> Martin
>> 
>> —
>> Martin Gerhard Loschwitz
>> OpenStack DACH e.V.
>> Neuköllner Str. 306
>> D-12357 Berlin
>> 
>> T: +49 1511 9305928
>> W: http://www.openstack-dach.org/
>> 
>> ___
>> Dev mailing list
>> Dev@lists.opencontrail.org
>> http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org
> 


___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org


Re: [opencontrail-dev] analytics-api not giving proper results when queried on another IP than 127.0.0.1

2015-04-29 Thread Raj Reddy
by default analytics-api listens at 0.0.0.0:8081 -- both methods should have 
worked without any config change..

You should look at what's the listen ip using
netstat -anp | grep 8081..

regards,
-
Raj

On Apr 29, 2015, at 7:08 AM, Martin Gerhard Loschwitz 
 wrote:

> Folks,
> 
> I see this when trying to query the analytics-api IP address:
> 
> cloud14# curl 77.247.XXX.XXX:8081/analytics/tables
> curl: (52) Empty reply from server
> 
> But when I reconfigure the API to listen on 127.0.0.1 and query that one, I 
> get:
> 
> cloud14# curl 127.0.0.1:8081/analytics/tables
> [{"href": "http://127.0.0.1:8081/analytics/table/MessageTable";, "type": 
> "LOG", "name": "MessageTable"} ...
> 
> What's going on here, and how do I fix the issue?
> 
> Best regards
> Martin
> 
> —
> Martin Gerhard Loschwitz
> OpenStack DACH e.V.
> Neuköllner Str. 306
> D-12357 Berlin
> 
> T: +49 1511 9305928
> W: http://www.openstack-dach.org/
> 
> ___
> Dev mailing list
> Dev@lists.opencontrail.org
> http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org