Xymon Mailing List Archive search

HTTP error 0

15 messages in this thread

list Larry Barber · Thu, 30 Nov 2006 16:33:04 -0600 ·
What does "HTTP error 0" signify when given as the result of an http test?
An empty page?

Thanks,
Larry Barber
list Henrik Størner · Fri, 1 Dec 2006 08:18:16 +0100 ·
quoted from Larry Barber
On Thu, Nov 30, 2006 at 04:33:04PM -0600, Larry Barber wrote:
What does "HTTP error 0" signify when given as the result of an http test?
An empty page?
It connected to the server, sent the request, and got no response.


Henrik
list Aaron Li · Tue, 11 Nov 2008 23:47:39 -0800 ·
Hi all
 
When hobbit monitors the https site, it always gets the error " HTTP
error 0" like below, I appreciate a lot if anyone can give the solution,
thanks
 
https://x.x.x.x/ - HTTP error 0
list Henrik Størner · Wed, 12 Nov 2008 12:15:50 +0000 (UTC) ·
quoted from Aaron Li
In <user-7bd96d8c477b@xymon.invalid> "Aaron Li" <user-deffebe7d884@xymon.invalid> writes:
When hobbit monitors the https site, it always gets the error " HTTP
error 0" like below, I appreciate a lot if anyone can give the solution,
"HTTP error 0" basically means that Hobbit could connect to the
webserver, but it didn't receive any response to the web request
it sent.


Regards,
Henrik
list Samuel Cai · Wed, 12 Nov 2008 17:38:05 -0800 ·
Hi Henrik,

I'm with Aaron in same company, the weird thing is, if we use wget, then can still receive data, so not sure what's wrong.

Thanks,
Samuel Cai
quoted from Henrik Størner

-----Original Message-----
From: Henrik "Størner [mailto:user-ce4a2c883f75@xymon.invalid] 
Sent: Wednesday, November 12, 2008 8:16 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] HTTP error 0

In <user-7bd96d8c477b@xymon.invalid> "Aaron Li" <user-deffebe7d884@xymon.invalid> writes:
When hobbit monitors the https site, it always gets the error " HTTP
error 0" like below, I appreciate a lot if anyone can give the solution,
"HTTP error 0" basically means that Hobbit could connect to the
webserver, but it didn't receive any response to the web request
it sent.


Regards,
Henrik
list Josh Luthman · Wed, 12 Nov 2008 21:12:20 -0500 ·
Can you post your configuration in bb-hosts?

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer
quoted from Samuel Cai


On Wed, Nov 12, 2008 at 8:38 PM, Samuel Cai <user-ba507acc1d03@xymon.invalid>wrote:
Hi Henrik,

I'm with Aaron in same company, the weird thing is, if we use wget, then
can still receive data, so not sure what's wrong.

Thanks,
Samuel Cai

-----Original Message-----
From: Henrik "Størner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Wednesday, November 12, 2008 8:16 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] HTTP error 0

In <user-7bd96d8c477b@xymon.invalid>
"Aaron Li" <user-deffebe7d884@xymon.invalid> writes:
When hobbit monitors the https site, it always gets the error " HTTP
error 0" like below, I appreciate a lot if anyone can give the solution,
"HTTP error 0" basically means that Hobbit could connect to the
webserver, but it didn't receive any response to the web request
it sent.


Regards,
Henrik

list Samuel Cai · Wed, 12 Nov 2008 19:43:32 -0800 ·
Thank you Josh for looking into this, out configuration is like this: 

x.x.x.x abc.def.com    # ssldays=14:7 https://x.x.x.x/ cont=content;https://x.x.x.x;"Moved[[:space:]]Permanently"; depends=(http:server_a/http,server_b/http)

 
Here x.x.x.x is external IP.

 
Btw, blow is the email I sent before, contains more information:

From: Samuel Cai 
Sent: Tuesday, November 04, 2008 5:50 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: https test got "HTTP error 0"

 
Hi,

 
We got a weird problem recently when setting up another Hobbit server, all https tests failed, got "HTTP error 0".

I tried running bbtest-net with debug, and got following: 

2008-11-04 04:14:04 1 tests pending - 1 active tests

2008-11-04 04:14:04 Doing select

2008-11-04 04:14:05 select returned 1

2008-11-04 04:14:05 read -1 bytes from socket

Seems Hobbit couldn't get anything from that URL, but if I use wget (have to use --no-check-certificate since we tests IP directly), can still get contents.

 
I know this may be more related to the network infrastructure the new Hobbit server is in, but if you got same issue before, please help share your experiences.

 
Thanks,

Samuel Cai
quoted from Josh Luthman

 
From: Josh Luthman [mailto:user-4c45a83f15cb@xymon.invalid] 
Sent: Thursday, November 13, 2008 10:12 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] HTTP error 0

 
Can you post your configuration in bb-hosts?

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer


On Wed, Nov 12, 2008 at 8:38 PM, Samuel Cai <user-ba507acc1d03@xymon.invalid> wrote:

Hi Henrik,

I'm with Aaron in same company, the weird thing is, if we use wget, then can still receive data, so not sure what's wrong.

Thanks,
Samuel Cai


-----Original Message-----
From: Henrik "Størner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Wednesday, November 12, 2008 8:16 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] HTTP error 0

In <user-7bd96d8c477b@xymon.invalid> "Aaron Li" <user-deffebe7d884@xymon.invalid> writes:
When hobbit monitors the https site, it always gets the error " HTTP
error 0" like below, I appreciate a lot if anyone can give the solution,
"HTTP error 0" basically means that Hobbit could connect to the
webserver, but it didn't receive any response to the web request
it sent.


Regards,
Henrik
list Henrik Størner · Thu, 13 Nov 2008 06:56:08 +0000 (UTC) ·
quoted from Samuel Cai
In <user-543359c918a2@xymon.invalid> "Samuel Cai" <user-ba507acc1d03@xymon.invalid> writes:
In <user-7bd96d8c477b@xymon.invalid> =
"Aaron Li" <user-deffebe7d884@xymon.invalid> writes:
When hobbit monitors the https site, it always gets the error " HTTP
error 0" like below, I appreciate a lot if anyone can give the =
solution,
I'm with Aaron in same company, the weird thing is, if we use wget, then =
can still receive data, so not sure what's wrong.

Can you try running '~hobbit/server/bin/bbtest-net --version' just to
check the version number of your OpenSSL library ?

And can you get data using just the openssl client utility ? Like this:

  openssl s_client -connect 10.20.30.40:443

(replace the IP with that of your server). If that succeeds and shows
you the server certificate then enter

  GET / HTTP/1.0

and hit <enter> twice - this mimicks a simple HTTP request. Does that
work ? And how long does it take to complete ?


Finally, you could try modifying the code in hobbit-4.2.0/bbnet/contest.c
In there is a routine called "socket_read"; delete the version in your
file and replace it with the version below. Recompile with "make bbnet-build"
and copy the new bbnet/bbtest-net program to ~hobbit/server/bin/ . Then
run it with the "--debug" option enabled, like

   bbcmd bbtest-net --noping --debug HOSTNAME

to run the test of just this one host. Hopefully that will print out
some more info about what happens with that read that returns -1.


Regards,
Henrik


static int socket_read(tcptest_t *item, char *inbuf, int inbufsize)
{
        int res = 0;
        char errtxt[1024];

        if (item->svcinfo->flags & TCP_SSL) {
                if (item->sslrunning) {
                        item->sslagain = 0;
                        res = SSL_read(item->ssldata, inbuf, inbufsize);
                        if (res < 0) {
                                switch (SSL_get_error (item->ssldata, res)) {
                                  case SSL_ERROR_WANT_READ:
                                  case SSL_ERROR_WANT_WRITE:
                                          item->sslagain = 1;
                                          break;
                                  default:
                                          ERR_error_string(ERR_get_error(), errtxt);
                                          dbgprintf("SSL read error %s\n", errtxt);
                                          break;
                                }
                        }
                }
                else {
                        /* SSL setup failed - flag 0 bytes read. */
                        res = 0;
                }
        }
        else {
                res = read(item->fd, inbuf, inbufsize);
                if (res < 0) {
                        dbgprintf("Read error %s\n", strerror(errno));
                }
        }

        if (res > 0) item->bytesread += res;
        return res;
}
list Samuel Cai · Thu, 13 Nov 2008 02:36:42 -0800 ·
Thank you Henrik, this is the root cause!
We did not install openssl dev package, the "bbtest-net --version" only returns hobbit version.
After we installed and recompile, problem is gone!

Thanks again.
quoted from Henrik Størner

Samuel Cai

-----Original Message-----
From: Henrik "Størner [mailto:user-ce4a2c883f75@xymon.invalid] 
Sent: Thursday, November 13, 2008 2:56 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] HTTP error 0

In <user-543359c918a2@xymon.invalid> "Samuel Cai" <user-ba507acc1d03@xymon.invalid> writes:
In <user-7bd96d8c477b@xymon.invalid> =
"Aaron Li" <user-deffebe7d884@xymon.invalid> writes:
When hobbit monitors the https site, it always gets the error " HTTP
error 0" like below, I appreciate a lot if anyone can give the =
solution,
I'm with Aaron in same company, the weird thing is, if we use wget, then =
can still receive data, so not sure what's wrong.

Can you try running '~hobbit/server/bin/bbtest-net --version' just to
check the version number of your OpenSSL library ?

And can you get data using just the openssl client utility ? Like this:

  openssl s_client -connect 10.20.30.40:443

(replace the IP with that of your server). If that succeeds and shows
you the server certificate then enter

  GET / HTTP/1.0

and hit <enter> twice - this mimicks a simple HTTP request. Does that
work ? And how long does it take to complete ?


Finally, you could try modifying the code in hobbit-4.2.0/bbnet/contest.c
In there is a routine called "socket_read"; delete the version in your
file and replace it with the version below. Recompile with "make bbnet-build"
and copy the new bbnet/bbtest-net program to ~hobbit/server/bin/ . Then
run it with the "--debug" option enabled, like

   bbcmd bbtest-net --noping --debug HOSTNAME

to run the test of just this one host. Hopefully that will print out
some more info about what happens with that read that returns -1.


Regards,
Henrik


static int socket_read(tcptest_t *item, char *inbuf, int inbufsize)
{
        int res = 0;
        char errtxt[1024];

        if (item->svcinfo->flags & TCP_SSL) {
                if (item->sslrunning) {
                        item->sslagain = 0;
                        res = SSL_read(item->ssldata, inbuf, inbufsize);
                        if (res < 0) {
                                switch (SSL_get_error (item->ssldata, res)) {
                                  case SSL_ERROR_WANT_READ:
                                  case SSL_ERROR_WANT_WRITE:
                                          item->sslagain = 1;
                                          break;
                                  default:
                                          ERR_error_string(ERR_get_error(), errtxt);
                                          dbgprintf("SSL read error %s\n", errtxt);
                                          break;
                                }
                        }
                }
                else {
                        /* SSL setup failed - flag 0 bytes read. */
                        res = 0;
                }
        }
        else {
                res = read(item->fd, inbuf, inbufsize);
                if (res < 0) {
                        dbgprintf("Read error %s\n", strerror(errno));
                }
        }

        if (res > 0) item->bytesread += res;
        return res;
}
list Aaron Li · Thu, 13 Nov 2008 18:37:31 -0800 ·
Thanks a lot for all your help 


Aaron.Li
quoted from Samuel Cai
 

-----Original Message-----
From: Samuel Cai [mailto:user-ba507acc1d03@xymon.invalid] 
Sent: Thursday, November 13, 2008 6:37 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] HTTP error 0

Thank you Henrik, this is the root cause!
We did not install openssl dev package, the "bbtest-net --version" only returns hobbit version.
After we installed and recompile, problem is gone!

Thanks again.

Samuel Cai

-----Original Message-----
From: Henrik "Størner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Thursday, November 13, 2008 2:56 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] HTTP error 0

In <user-543359c918a2@xymon.invalid> "Samuel Cai" <user-ba507acc1d03@xymon.invalid> writes:
In <user-7bd96d8c477b@xymon.invalid> 
= "Aaron Li" <user-deffebe7d884@xymon.invalid> writes:
When hobbit monitors the https site, it always gets the error " HTTP 
error 0" like below, I appreciate a lot if anyone can give the =
solution,
I'm with Aaron in same company, the weird thing is, if we use wget, 
then =
can still receive data, so not sure what's wrong.

Can you try running '~hobbit/server/bin/bbtest-net --version' just to check the version number of your OpenSSL library ?

And can you get data using just the openssl client utility ? Like this:

  openssl s_client -connect 10.20.30.40:443

(replace the IP with that of your server). If that succeeds and shows you the server certificate then enter

  GET / HTTP/1.0

and hit <enter> twice - this mimicks a simple HTTP request. Does that work ? And how long does it take to complete ?


Finally, you could try modifying the code in hobbit-4.2.0/bbnet/contest.c In there is a routine called "socket_read"; delete the version in your file and replace it with the version below. Recompile with "make bbnet-build"
and copy the new bbnet/bbtest-net program to ~hobbit/server/bin/ . Then run it with the "--debug" option enabled, like

   bbcmd bbtest-net --noping --debug HOSTNAME

to run the test of just this one host. Hopefully that will print out some more info about what happens with that read that returns -1.


Regards,
Henrik


static int socket_read(tcptest_t *item, char *inbuf, int inbufsize) {
        int res = 0;
        char errtxt[1024];

        if (item->svcinfo->flags & TCP_SSL) {
                if (item->sslrunning) {
                        item->sslagain = 0;
                        res = SSL_read(item->ssldata, inbuf, inbufsize);
                        if (res < 0) {
                                switch (SSL_get_error (item->ssldata, res)) {
                                  case SSL_ERROR_WANT_READ:
                                  case SSL_ERROR_WANT_WRITE:
                                          item->sslagain = 1;
                                          break;
                                  default:
                                          ERR_error_string(ERR_get_error(), errtxt);
                                          dbgprintf("SSL read error %s\n", errtxt);
                                          break;
                                }
                        }
                }
                else {
                        /* SSL setup failed - flag 0 bytes read. */
                        res = 0;
                }
        }
        else {
                res = read(item->fd, inbuf, inbufsize);
                if (res < 0) {
                        dbgprintf("Read error %s\n", strerror(errno));
                }
        }

        if (res > 0) item->bytesread += res;
        return res;
}
list T.J. Yang · Thu, 13 Nov 2008 20:52:16 -0600 ·
Would you mind to  make an entry of your Xymon usage at here ?

http://en.wikibooks.org/wiki/System_Monitoring_with_Xymon/User_Guide/The_Xymon_Users_list

Your entry  first entry from China.

tj yang
quoted from Aaron Li

From: "Aaron Li" <user-deffebe7d884@xymon.invalid>
Sent: Thursday, November 13, 2008 8:37 PM
To: <user-ae9b8668bcde@xymon.invalid>
Subject: RE: [hobbit] HTTP error 0
Thanks a lot for all your help


Aaron.Li


-----Original Message-----
From: Samuel Cai [mailto:user-ba507acc1d03@xymon.invalid]
Sent: Thursday, November 13, 2008 6:37 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] HTTP error 0

Thank you Henrik, this is the root cause!
We did not install openssl dev package, the "bbtest-net --version" only returns hobbit version.
After we installed and recompile, problem is gone!

Thanks again.

Samuel Cai

-----Original Message-----
From: Henrik "Størner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Thursday, November 13, 2008 2:56 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] HTTP error 0

In <user-543359c918a2@xymon.invalid> "Samuel Cai" <user-ba507acc1d03@xymon.invalid> writes:
In <user-7bd96d8c477b@xymon.invalid>
= "Aaron Li" <user-deffebe7d884@xymon.invalid> writes:
When hobbit monitors the https site, it always gets the error " HTTP
error 0" like below, I appreciate a lot if anyone can give the =
solution,
I'm with Aaron in same company, the weird thing is, if we use wget,
then =
can still receive data, so not sure what's wrong.

Can you try running '~hobbit/server/bin/bbtest-net --version' just to check the version number of your OpenSSL library ?

And can you get data using just the openssl client utility ? Like this:

 openssl s_client -connect 10.20.30.40:443

(replace the IP with that of your server). If that succeeds and shows you the server certificate then enter

 GET / HTTP/1.0

and hit <enter> twice - this mimicks a simple HTTP request. Does that work ? And how long does it take to complete ?


Finally, you could try modifying the code in hobbit-4.2.0/bbnet/contest.c In there is a routine called "socket_read"; delete the version in your file and replace it with the version below. Recompile with "make bbnet-build"
and copy the new bbnet/bbtest-net program to ~hobbit/server/bin/ . Then run it with the "--debug" option enabled, like

  bbcmd bbtest-net --noping --debug HOSTNAME

to run the test of just this one host. Hopefully that will print out some more info about what happens with that read that returns -1.


Regards,
Henrik


static int socket_read(tcptest_t *item, char *inbuf, int inbufsize) {
       int res = 0;
       char errtxt[1024];

       if (item->svcinfo->flags & TCP_SSL) {
               if (item->sslrunning) {
                       item->sslagain = 0;
                       res = SSL_read(item->ssldata, inbuf, inbufsize);
                       if (res < 0) {
                               switch (SSL_get_error (item->ssldata, res)) {
                                 case SSL_ERROR_WANT_READ:
                                 case SSL_ERROR_WANT_WRITE:
                                         item->sslagain = 1;
                                         break;
                                 default:
                                         ERR_error_string(ERR_get_error(), errtxt);
                                         dbgprintf("SSL read error %s\n", errtxt);
                                         break;
                               }
                       }
               }
               else {
                       /* SSL setup failed - flag 0 bytes read. */
                       res = 0;
               }
       }
       else {
               res = read(item->fd, inbuf, inbufsize);
               if (res < 0) {
                       dbgprintf("Read error %s\n", strerror(errno));
               }
       }

       if (res > 0) item->bytesread += res;
       return res;
}

list Aaron Li · Thu, 13 Nov 2008 22:15:11 -0800 ·
Actually, we use hobbit in our US company, sorry I can't list our company name here.


Aaron.Li
quoted from T.J. Yang
 
-----Original Message-----
From: T.J. Yang [mailto:user-8e841282cda5@xymon.invalid] Sent: Friday, November 14, 2008 10:52 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] HTTP error 0

Would you mind to  make an entry of your Xymon usage at here ?

http://en.wikibooks.org/wiki/System_Monitoring_with_Xymon/User_Guide/The_Xymon_Users_list

Your entry  first entry from China.

tj yang

From: "Aaron Li" <user-deffebe7d884@xymon.invalid>
Sent: Thursday, November 13, 2008 8:37 PM
To: <user-ae9b8668bcde@xymon.invalid>
Subject: RE: [hobbit] HTTP error 0
Thanks a lot for all your help


Aaron.Li


-----Original Message-----
From: Samuel Cai [mailto:user-ba507acc1d03@xymon.invalid]
Sent: Thursday, November 13, 2008 6:37 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] HTTP error 0

Thank you Henrik, this is the root cause!
We did not install openssl dev package, the "bbtest-net --version" only returns hobbit version.
After we installed and recompile, problem is gone!

Thanks again.

Samuel Cai

-----Original Message-----
From: Henrik "Størner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Thursday, November 13, 2008 2:56 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] HTTP error 0

In <user-543359c918a2@xymon.invalid>
"Samuel Cai" <user-ba507acc1d03@xymon.invalid> writes:
In <user-7bd96d8c477b@xymon.invalid>
= "Aaron Li" <user-deffebe7d884@xymon.invalid> writes:
When hobbit monitors the https site, it always gets the error " HTTP error 0" like below, I appreciate a lot if anyone can give the =
solution,
I'm with Aaron in same company, the weird thing is, if we use wget, then =
can still receive data, so not sure what's wrong.

Can you try running '~hobbit/server/bin/bbtest-net --version' just to check the version number of your OpenSSL library ?

And can you get data using just the openssl client utility ? Like this:

 openssl s_client -connect 10.20.30.40:443

(replace the IP with that of your server). If that succeeds and shows you the server certificate then enter

 GET / HTTP/1.0

and hit <enter> twice - this mimicks a simple HTTP request. Does that work ? And how long does it take to complete ?


Finally, you could try modifying the code in hobbit-4.2.0/bbnet/contest.c In there is a routine called "socket_read"; delete the version in your file and replace it with the version below. Recompile with "make bbnet-build"
and copy the new bbnet/bbtest-net program to ~hobbit/server/bin/ . Then run it with the "--debug" option enabled, like

  bbcmd bbtest-net --noping --debug HOSTNAME

to run the test of just this one host. Hopefully that will print out some more info about what happens with that read that returns -1.


Regards,
Henrik


static int socket_read(tcptest_t *item, char *inbuf, int inbufsize) {
       int res = 0;
       char errtxt[1024];

       if (item->svcinfo->flags & TCP_SSL) {
               if (item->sslrunning) {
                       item->sslagain = 0;
                       res = SSL_read(item->ssldata, inbuf, inbufsize);
                       if (res < 0) {
                               switch (SSL_get_error (item->ssldata, res)) {
                                 case SSL_ERROR_WANT_READ:
                                 case SSL_ERROR_WANT_WRITE:
                                         item->sslagain = 1;
                                         break;
                                 default:
                                         ERR_error_string(ERR_get_error(), errtxt);
                                         dbgprintf("SSL read error %s\n", errtxt);
                                         break;
                               }
                       }
               }
               else {
                       /* SSL setup failed - flag 0 bytes read. */
                       res = 0;
               }
       }
       else {
               res = read(item->fd, inbuf, inbufsize);
               if (res < 0) {
                       dbgprintf("Read error %s\n", strerror(errno));
               }
       }

       if (res > 0) item->bytesread += res;
       return res;
}

list T.J. Yang · Fri, 14 Nov 2008 07:10:12 -0600 ·
quoted from Aaron Li

From: "Aaron Li" <user-deffebe7d884@xymon.invalid>
Sent: Friday, November 14, 2008 12:15 AM
To: <user-ae9b8668bcde@xymon.invalid>
Subject: RE: [hobbit] HTTP error 0
Actually, we use hobbit in our US company, sorry I can't list our company 
name here.
no problem, same here.

tj
quoted from Aaron Li
Aaron.Li


-----Original Message-----
From: T.J. Yang [mailto:user-8e841282cda5@xymon.invalid]
Sent: Friday, November 14, 2008 10:52 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] HTTP error 0

Would you mind to  make an entry of your Xymon usage at here ?

http://en.wikibooks.org/wiki/System_Monitoring_with_Xymon/User_Guide/The_Xymon_Users_list

Your entry  first entry from China.

tj yang

From: "Aaron Li" <user-deffebe7d884@xymon.invalid>
Sent: Thursday, November 13, 2008 8:37 PM
To: <user-ae9b8668bcde@xymon.invalid>
Subject: RE: [hobbit] HTTP error 0
Thanks a lot for all your help


Aaron.Li


-----Original Message-----
From: Samuel Cai [mailto:user-ba507acc1d03@xymon.invalid]
Sent: Thursday, November 13, 2008 6:37 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] HTTP error 0

Thank you Henrik, this is the root cause!
We did not install openssl dev package, the "bbtest-net --version"
only returns hobbit version.
After we installed and recompile, problem is gone!

Thanks again.

Samuel Cai

-----Original Message-----
From: Henrik "Størner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Thursday, November 13, 2008 2:56 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] HTTP error 0

In <user-543359c918a2@xymon.invalid>
"Samuel Cai" <user-ba507acc1d03@xymon.invalid> writes:
In <user-7bd96d8c477b@xymon.invalid>
= "Aaron Li" <user-deffebe7d884@xymon.invalid> writes:
When hobbit monitors the https site, it always gets the error " HTTP
error 0" like below, I appreciate a lot if anyone can give the =
solution,
I'm with Aaron in same company, the weird thing is, if we use wget,
then =
can still receive data, so not sure what's wrong.

Can you try running '~hobbit/server/bin/bbtest-net --version' just to
check the version number of your OpenSSL library ?

And can you get data using just the openssl client utility ? Like this:

 openssl s_client -connect 10.20.30.40:443

(replace the IP with that of your server). If that succeeds and shows
you the server certificate then enter

 GET / HTTP/1.0

and hit <enter> twice - this mimicks a simple HTTP request. Does that
work ? And how long does it take to complete ?


Finally, you could try modifying the code in
hobbit-4.2.0/bbnet/contest.c In there is a routine called
"socket_read"; delete the version in your file and replace it with the
version below. Recompile with "make bbnet-build"
and copy the new bbnet/bbtest-net program to ~hobbit/server/bin/ .
Then run it with the "--debug" option enabled, like

  bbcmd bbtest-net --noping --debug HOSTNAME

to run the test of just this one host. Hopefully that will print out
some more info about what happens with that read that returns -1.


Regards,
Henrik


static int socket_read(tcptest_t *item, char *inbuf, int inbufsize) {
       int res = 0;
       char errtxt[1024];

       if (item->svcinfo->flags & TCP_SSL) {
               if (item->sslrunning) {
                       item->sslagain = 0;
                       res = SSL_read(item->ssldata, inbuf, inbufsize);
                       if (res < 0) {
                               switch (SSL_get_error (item->ssldata,
res)) {
                                 case SSL_ERROR_WANT_READ:
                                 case SSL_ERROR_WANT_WRITE:
                                         item->sslagain = 1;
                                         break;
                                 default:

ERR_error_string(ERR_get_error(), errtxt);
                                         dbgprintf("SSL read error
%s\n", errtxt);
                                         break;
                               }
                       }
               }
               else {
                       /* SSL setup failed - flag 0 bytes read. */
                       res = 0;
               }
       }
       else {
               res = read(item->fd, inbuf, inbufsize);
               if (res < 0) {
                       dbgprintf("Read error %s\n", strerror(errno));
               }
       }

       if (res > 0) item->bytesread += res;
       return res;
}

list T.J. Yang · Fri, 14 Nov 2008 07:10:12 -0600 ·

From: "Aaron Li" <user-deffebe7d884@xymon.invalid>
Sent: Friday, November 14, 2008 12:15 AM
To: <user-ae9b8668bcde@xymon.invalid>
Subject: RE: [hobbit] HTTP error 0
Actually, we use hobbit in our US company, sorry I can't list our company 
name here.
no problem, same here.

tj
Aaron.Li


-----Original Message-----
From: T.J. Yang [mailto:user-8e841282cda5@xymon.invalid]
Sent: Friday, November 14, 2008 10:52 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] HTTP error 0

Would you mind to  make an entry of your Xymon usage at here ?

http://en.wikibooks.org/wiki/System_Monitoring_with_Xymon/User_Guide/The_Xymon_Users_list

Your entry  first entry from China.

tj yang

From: "Aaron Li" <user-deffebe7d884@xymon.invalid>
Sent: Thursday, November 13, 2008 8:37 PM
To: <user-ae9b8668bcde@xymon.invalid>
Subject: RE: [hobbit] HTTP error 0
Thanks a lot for all your help


Aaron.Li


-----Original Message-----
From: Samuel Cai [mailto:user-ba507acc1d03@xymon.invalid]
Sent: Thursday, November 13, 2008 6:37 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] HTTP error 0

Thank you Henrik, this is the root cause!
We did not install openssl dev package, the "bbtest-net --version"
only returns hobbit version.
After we installed and recompile, problem is gone!

Thanks again.

Samuel Cai

-----Original Message-----
From: Henrik "Størner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Thursday, November 13, 2008 2:56 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] HTTP error 0

In <user-543359c918a2@xymon.invalid>
"Samuel Cai" <user-ba507acc1d03@xymon.invalid> writes:
In <user-7bd96d8c477b@xymon.invalid>
= "Aaron Li" <user-deffebe7d884@xymon.invalid> writes:
When hobbit monitors the https site, it always gets the error " HTTP
error 0" like below, I appreciate a lot if anyone can give the =
solution,
I'm with Aaron in same company, the weird thing is, if we use wget,
then =
can still receive data, so not sure what's wrong.

Can you try running '~hobbit/server/bin/bbtest-net --version' just to
check the version number of your OpenSSL library ?

And can you get data using just the openssl client utility ? Like this:

 openssl s_client -connect 10.20.30.40:443

(replace the IP with that of your server). If that succeeds and shows
you the server certificate then enter

 GET / HTTP/1.0

and hit <enter> twice - this mimicks a simple HTTP request. Does that
work ? And how long does it take to complete ?


Finally, you could try modifying the code in
hobbit-4.2.0/bbnet/contest.c In there is a routine called
"socket_read"; delete the version in your file and replace it with the
version below. Recompile with "make bbnet-build"
and copy the new bbnet/bbtest-net program to ~hobbit/server/bin/ .
Then run it with the "--debug" option enabled, like

  bbcmd bbtest-net --noping --debug HOSTNAME

to run the test of just this one host. Hopefully that will print out
some more info about what happens with that read that returns -1.


Regards,
Henrik


static int socket_read(tcptest_t *item, char *inbuf, int inbufsize) {
       int res = 0;
       char errtxt[1024];

       if (item->svcinfo->flags & TCP_SSL) {
               if (item->sslrunning) {
                       item->sslagain = 0;
                       res = SSL_read(item->ssldata, inbuf, inbufsize);
                       if (res < 0) {
                               switch (SSL_get_error (item->ssldata,
res)) {
                                 case SSL_ERROR_WANT_READ:
                                 case SSL_ERROR_WANT_WRITE:
                                         item->sslagain = 1;
                                         break;
                                 default:

ERR_error_string(ERR_get_error(), errtxt);
                                         dbgprintf("SSL read error
%s\n", errtxt);
                                         break;
                               }
                       }
               }
               else {
                       /* SSL setup failed - flag 0 bytes read. */
                       res = 0;
               }
       }
       else {
               res = read(item->fd, inbuf, inbufsize);
               if (res < 0) {
                       dbgprintf("Read error %s\n", strerror(errno));
               }
       }

       if (res > 0) item->bytesread += res;
       return res;
}

list T.J. Yang · Fri, 14 Nov 2008 07:10:12 -0600 ·

From: "Aaron Li" <user-deffebe7d884@xymon.invalid>
Sent: Friday, November 14, 2008 12:15 AM
To: <user-ae9b8668bcde@xymon.invalid>
Subject: RE: [hobbit] HTTP error 0
Actually, we use hobbit in our US company, sorry I can't list our company 
name here.
no problem, same here.

tj
Aaron.Li


-----Original Message-----
From: T.J. Yang [mailto:user-8e841282cda5@xymon.invalid]
Sent: Friday, November 14, 2008 10:52 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] HTTP error 0

Would you mind to  make an entry of your Xymon usage at here ?

http://en.wikibooks.org/wiki/System_Monitoring_with_Xymon/User_Guide/The_Xymon_Users_list

Your entry  first entry from China.

tj yang

From: "Aaron Li" <user-deffebe7d884@xymon.invalid>
Sent: Thursday, November 13, 2008 8:37 PM
To: <user-ae9b8668bcde@xymon.invalid>
Subject: RE: [hobbit] HTTP error 0
Thanks a lot for all your help


Aaron.Li


-----Original Message-----
From: Samuel Cai [mailto:user-ba507acc1d03@xymon.invalid]
Sent: Thursday, November 13, 2008 6:37 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] HTTP error 0

Thank you Henrik, this is the root cause!
We did not install openssl dev package, the "bbtest-net --version"
only returns hobbit version.
After we installed and recompile, problem is gone!

Thanks again.

Samuel Cai

-----Original Message-----
From: Henrik "Størner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Thursday, November 13, 2008 2:56 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] HTTP error 0

In <user-543359c918a2@xymon.invalid>
"Samuel Cai" <user-ba507acc1d03@xymon.invalid> writes:
In <user-7bd96d8c477b@xymon.invalid>
= "Aaron Li" <user-deffebe7d884@xymon.invalid> writes:
When hobbit monitors the https site, it always gets the error " HTTP
error 0" like below, I appreciate a lot if anyone can give the =
solution,
I'm with Aaron in same company, the weird thing is, if we use wget,
then =
can still receive data, so not sure what's wrong.

Can you try running '~hobbit/server/bin/bbtest-net --version' just to
check the version number of your OpenSSL library ?

And can you get data using just the openssl client utility ? Like this:

 openssl s_client -connect 10.20.30.40:443

(replace the IP with that of your server). If that succeeds and shows
you the server certificate then enter

 GET / HTTP/1.0

and hit <enter> twice - this mimicks a simple HTTP request. Does that
work ? And how long does it take to complete ?


Finally, you could try modifying the code in
hobbit-4.2.0/bbnet/contest.c In there is a routine called
"socket_read"; delete the version in your file and replace it with the
version below. Recompile with "make bbnet-build"
and copy the new bbnet/bbtest-net program to ~hobbit/server/bin/ .
Then run it with the "--debug" option enabled, like

  bbcmd bbtest-net --noping --debug HOSTNAME

to run the test of just this one host. Hopefully that will print out
some more info about what happens with that read that returns -1.


Regards,
Henrik


static int socket_read(tcptest_t *item, char *inbuf, int inbufsize) {
       int res = 0;
       char errtxt[1024];

       if (item->svcinfo->flags & TCP_SSL) {
               if (item->sslrunning) {
                       item->sslagain = 0;
                       res = SSL_read(item->ssldata, inbuf, inbufsize);
                       if (res < 0) {
                               switch (SSL_get_error (item->ssldata,
res)) {
                                 case SSL_ERROR_WANT_READ:
                                 case SSL_ERROR_WANT_WRITE:
                                         item->sslagain = 1;
                                         break;
                                 default:

ERR_error_string(ERR_get_error(), errtxt);
                                         dbgprintf("SSL read error
%s\n", errtxt);
                                         break;
                               }
                       }
               }
               else {
                       /* SSL setup failed - flag 0 bytes read. */
                       res = 0;
               }
       }
       else {
               res = read(item->fd, inbuf, inbufsize);
               if (res < 0) {
                       dbgprintf("Read error %s\n", strerror(errno));
               }
       }

       if (res > 0) item->bytesread += res;
       return res;
}