View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000159 | Pgpool-II | Bug | public | 2015-12-04 18:58 | 2016-01-17 22:28 |
| Reporter | harukat | Assigned To | t-ishii | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | open | ||
| Product Version | 3.4.0 | ||||
| Summary | 0000159: message ' getsockopt() detected error "Operation now in progress" ' | ||||
| Description | We got the following error messages from pgpool-II 3.4.3. 2015-12-04 16:26:46 [No Connection] MAIN [No Connection] ERROR: failed to make persistent db connection 2015-12-04 16:26:46 [No Connection] MAIN [No Connection] DETAIL: connection to host:"10.1.1.13:5432" failed 2015-12-04 16:26:46 [No Connection] MAIN [No Connection] LOG: failed to connect to PostgreSQL server on "10.1.1.13:5432", getsockopt() detected error "Operation now in progress" Function connect_with_timeout() in src/protocol/pool_connection_pool.c has the following codes. if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &socklen) < 0) { /* Solaris returns error in this case */ ereport(LOG, (errmsg("failed to connect to PostgreSQL server on \"%s:%d\", getsockopt() failed with error \"%s\"",host,port,strerror(errno)))); return false; } /* Non Solaris case */ if (error != 0) { ereport(LOG, (errmsg("failed to connect to PostgreSQL server on \"%s:%d\", getsockopt() detected error \"%s\"",host,port,strerror(errno)))); return false; } IMHO, in this case, "strerror(errno)" should be "strerror(error)". Man connect(2) say "SO_ERROR is one of the usual error codes listed here, explaining the reason for the failure" about EINPROGRESS. | ||||
| Tags | No tags attached. | ||||
|
|
It is possible that connect_timeout is longer than health_check_timeout (or connect_timeout is 0). What are those values? |
|
|
(Sorry. I delayed an answer for a long time.) It may be so or may not be so. The important thing is what does this code get the value of "error" by getsockopt() for. |
|
|
I agree with "strerror(errno)" should be "strerror(error)". But I doubt the logic below itself is incorrect. if (error != 0) { ereport(LOG, (errmsg("failed to connect to PostgreSQL server on \"%s:%d\", getsockopt() detected error \"%s\"",host,port,strerror(errno)))); return false; } |
|
|
Fix done. Note that the bug was introduced in 3.4. 3.3 is ok. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2015-12-04 18:58 | harukat | New Issue | |
| 2015-12-07 15:27 | t-ishii | Note Added: 0000605 | |
| 2015-12-07 15:27 | t-ishii | Assigned To | => t-ishii |
| 2015-12-07 15:27 | t-ishii | Status | new => feedback |
| 2015-12-20 18:26 | harukat | Note Added: 0000619 | |
| 2015-12-20 18:26 | harukat | Status | feedback => assigned |
| 2015-12-25 17:03 | t-ishii | Note Added: 0000625 | |
| 2015-12-25 18:00 | t-ishii | Note Added: 0000626 | |
| 2016-01-17 22:28 | t-ishii | Status | assigned => resolved |