Getting Timeout from wso2 to endpoint going through http proxy - timeout
I am getting an HTTP Timeout (101504) on an Endpoint, but only going through the ESB. This is a Soap1.1 HTTP/1.0 Endpoint. The connection to the esb and the endpoint are both secured and are both via ssl. In addition I am connecting via a proxy host and am also behind a virtual private network.
I have configured the axis.xml to utilize the proxy host and it works for other Proxies that I have set up.
I am able to hit the endpoint directly from SoapUI with no issues it returns in about 180ms. I can also curl from the esb host command line going thru the http proxy host and it works perfectly. So I know the proxy server isn't preventing the request from passing through.
Originally I was using the HttpPassthruSender and was getting a Connect Cancel 101507 error. I thought that may be an issue so I switched it to the NIO Sender/Receiver. Then it started producing a 101504 HTTP Transport Error.
I have quadruple checked the endpoint address and even copy/pasted it into soapUI and ran it successfully to make sure it was correct
I have included below my proxy configuration and my endpoint configuration. Note that I have included the HTTP_FORCE_1.0 and POST_TO_URI Properties. I am also certain that my credentials for the endpoint are correct, because I have purposely changed them and get the expected result when authentication fails.
Proxy Configuration
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="TestRemedy"
transports="https"
statistics="disable"
trace="enable"
startOnLoad="true">
<target faultSequence="fault" endpoint="RemedyQueryIncidents">
<inSequence>
<call-template target="SetTriadBasicAuthHeader">
<with-param name="username" value="mouser"/>
<with-param name="password" value="my password"/>
</call-template>
<property name="POST_TO_URI" value="true" scope="axis2" type="STRING"/>
<property name="FORCE_HTTP_1.0" value="true" scope="axis2" type="STRING"/>
</inSequence>
<outSequence>
<send/>
</outSequence>
</target>
<description/>
</proxy>
Endpoint Configuration
<endpoint xmlns="http://ws.apache.org/ns/synapse" name="RemedyQueryIncidents">
<address uri="https://myendpoint.com/IncidentQueryList" format="soap11">
<suspendOnFailure>
<progressionFactor>1.0</progressionFactor>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
<retryDelay>0</retryDelay>
</markForSuspension>
</address>
</endpoint>
Log (With Log Level TRACE) To remain within the 30K Character limit this is not complete. I can send the complete log if necessary. I attempted to keep it to the relevant parts.
...
[2013-11-19 21:54:45,125] DEBUG - SoapAction is (urn:IncidentQueryList/Incident_QueryList_Service) {org.apache.axis2.context.MessageContext}
[2013-11-19 21:54:45,125] DEBUG - I/O session http-outgoing-37-91 myesbhost.com:50695<->myproxyhostipaddr:3128[ACTIVE][r:w][ACTIVE][NOT_HANDSHAKING][0][0][0][0]: Set attribute ENDPOINT_PREFIX {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:54:45,125] DEBUG - I/O session http-outgoing-37-91 myesbhost.com:50695<->myproxyhostipaddr:3128[ACTIVE][r:w][ACTIVE][NOT_HANDSHAKING][0][0][0][0]: Set attribute HTTP_REQ_METHOD {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:54:45,125] DEBUG - I/O session http-outgoing-37-91 myesbhost.com:50695<->myproxyhostipaddr:3128[ACTIVE][r:w][ACTIVE][NOT_HANDSHAKING][0][0][0][0]: Set attribute http.request {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:54:45,125] DEBUG - I/O session http-incoming-53-89 myesbhost.com:8243<->myesbhost.com:34746[ACTIVE][r:r][ACTIVE][NOT_HANDSHAKING][0][0][0][0]: Set attribute REQ_DEPARTURE_TIME {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:54:45,127] DEBUG - http-outgoing-37: POST https://myendpoint.com/IncidentQueryList HTTP/1.0 {org.apache.synapse.transport.http.conn.LoggingNHttpClientConnection}
[2013-11-19 21:54:45,127] DEBUG - http-outgoing-37 >> POST https://myendpoint.com/IncidentQueryList HTTP/1.0 {org.apache.synapse.transport.http.headers}
[2013-11-19 21:54:45,127] DEBUG - http-outgoing-37 >> Content-Type: text/xml; charset=UTF-8 {org.apache.synapse.transport.http.headers}
[2013-11-19 21:54:45,127] DEBUG - http-outgoing-37 >> Accept-Encoding: gzip,deflate {org.apache.synapse.transport.http.headers}
[2013-11-19 21:54:45,127] DEBUG - http-outgoing-37 >> Authorization: Basic UldfVFJJQUQuZ2VuOmszcW5OUn5QR3Axdw== {org.apache.synapse.transport.http.headers}
[2013-11-19 21:54:45,127] DEBUG - http-outgoing-37 >> X-Forwarded-For: myvpnhost.com {org.apache.synapse.transport.http.headers}
[2013-11-19 21:54:45,127] DEBUG - http-outgoing-37 >> X-Forwarded-Host: myesbhost.com {org.apache.synapse.transport.http.headers}
[2013-11-19 21:54:45,127] DEBUG - http-outgoing-37 >> X-Forwarded-Server: myesbhost.com {org.apache.synapse.transport.http.headers}
[2013-11-19 21:54:45,127] DEBUG - http-outgoing-37 >> SOAPAction: "urn:IncidentQueryList/Incident_QueryList_Service" {org.apache.synapse.transport.http.headers}
[2013-11-19 21:54:45,127] DEBUG - http-outgoing-37 >> Content-Length: 422 {org.apache.synapse.transport.http.headers}
[2013-11-19 21:54:45,127] DEBUG - http-outgoing-37 >> Host: myendpoint.com:443 {org.apache.synapse.transport.http.headers}
[2013-11-19 21:54:45,127] DEBUG - http-outgoing-37 >> Connection: Keep-Alive {org.apache.synapse.transport.http.headers}
[2013-11-19 21:54:45,127] DEBUG - http-outgoing-37 >> User-Agent: Synapse-HttpComponents-NIO {org.apache.synapse.transport.http.headers}
[2013-11-19 21:54:45,127] DEBUG - I/O session http-outgoing-37-91 myesbhost.com:50695<->myproxyhostipaddr:3128[ACTIVE][r:w][ACTIVE][NOT_HANDSHAKING][0][0][0][0]: Set event [w] {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:54:45,128] DEBUG - I/O session http-outgoing-37-91 myesbhost.com:50695<->myproxyhostipaddr:3128[ACTIVE][rw:w][ACTIVE][NOT_HANDSHAKING][0][0][0][0]: Set event [w] {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:54:45,128] DEBUG - http-outgoing-37: Produce output {org.apache.synapse.transport.http.conn.LoggingNHttpClientConnection}
[2013-11-19 21:54:45,128] DEBUG - I/O session http-outgoing-37-91 myesbhost.com:50695<->myproxyhostipaddr:3128[ACTIVE][rw:w][ACTIVE][NOT_HANDSHAKING][0][0][576][0]: 555 bytes written {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:54:45,128] DEBUG - << "POST myendpoint.com/IncidentQueryList HTTP/1.0[\r][\n]" {org.apache.synapse.transport.http.wire}
[2013-11-19 21:54:45,128] DEBUG - << "Content-Type: text/xml; charset=UTF-8[\r][\n]" {org.apache.synapse.transport.http.wire}
[2013-11-19 21:54:45,128] DEBUG - << "Accept-Encoding: gzip,deflate[\r][\n]" {org.apache.synapse.transport.http.wire}
[2013-11-19 21:54:45,128] DEBUG - << "Authorization: Basic myBlahBlahBlahBase64endodedPassword==[\r][\n]" {org.apache.synapse.transport.http.wire}
[2013-11-19 21:54:45,128] DEBUG - << "X-Forwarded-For: myvpnhost.com[\r][\n]" {org.apache.synapse.transport.http.wire}
[2013-11-19 21:54:45,129] DEBUG - << "X-Forwarded-Host: myesbhost.com[\r][\n]" {org.apache.synapse.transport.http.wire}
[2013-11-19 21:54:45,129] DEBUG - << "X-Forwarded-Server: myesbhost.com[\r][\n]" {org.apache.synapse.transport.http.wire}
[2013-11-19 21:54:45,129] DEBUG - << "SOAPAction: "urn:IncidentQueryList/Incident_QueryList_Service"[\r][\n]" {org.apache.synapse.transport.http.wire}
[2013-11-19 21:54:45,129] DEBUG - << "Content-Length: 422[\r][\n]" {org.apache.synapse.transport.http.wire}
[2013-11-19 21:54:45,129] DEBUG - << "Host: myendpoint.com:443[\r][\n]" {org.apache.synapse.transport.http.wire}
[2013-11-19 21:54:45,129] DEBUG - << "Connection: Keep-Alive[\r][\n]" {org.apache.synapse.transport.http.wire}
[2013-11-19 21:54:45,129] DEBUG - << "User-Agent: Synapse-HttpComponents-NIO[\r][\n]" {org.apache.synapse.transport.http.wire}
[2013-11-19 21:54:45,129] DEBUG - << "[\r][\n]" {org.apache.synapse.transport.http.wire}
[2013-11-19 21:54:45,129] DEBUG - I/O session http-outgoing-37-91 myesbhost.com:50695<->myproxyhostipaddr:3128[ACTIVE][rw:w][ACTIVE][NOT_HANDSHAKING][0][0][576][0]: 0 bytes written {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:54:45,129] DEBUG - http-outgoing-37: Produce output {org.apache.synapse.transport.http.conn.LoggingNHttpClientConnection}
[2013-11-19 21:54:45,129] DEBUG - I/O session http-outgoing-37-91 myesbhost.com:50695<->myproxyhostipaddr:3128[ACTIVE][rw:w][ACTIVE][NOT_HANDSHAKING][0][0][443][0]: 422 bytes written {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:54:45,129] DEBUG - << "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:IncidentQueryList"><soapenv:Body><urn:Incident_QueryList_Service><urn:Qualification>'Status'="Assigned" And 'Assigned Group'="MYGROUP-IT"</urn:Qualification><urn:startRecord>1</urn:startRecord><urn:maxLimit>1</urn:maxLimit></urn:Incident_QueryList_Service></soapenv:Body></soapenv:Envelope>" {org.apache.synapse.transport.http.wire}
[2013-11-19 21:54:45,129] DEBUG - I/O session http-outgoing-37-91 myesbhost.com:50695<->myproxyhostipaddr:3128[ACTIVE][rw:w][ACTIVE][NOT_HANDSHAKING][0][0][443][0]: Clear event [w] {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:54:45,129] DEBUG - I/O session http-outgoing-37-91 myesbhost.com:50695<->myproxyhostipaddr:3128[ACTIVE][rw:w][ACTIVE][NOT_HANDSHAKING][0][0][443][0]: Remove attribute synapse.axis2-attachment {org.apache.http.nio.reactor.ssl.SSLIOSession}
...
[2013-11-19 21:55:09,047] DEBUG - myesbhost.com:8243 - - - "POST /services/TestRemedy HTTP/1.1" - - "-" "Apache-HttpClient/4.1.1 (java 1.5)" {org.apache.synapse.transport.nhttp.access}
[2013-11-19 21:55:09,047] DEBUG - - - - "- - " 200 - "-" "-" {org.apache.synapse.transport.nhttp.access}
[2013-11-19 21:55:09,048] DEBUG - - - - - "CONNECT myendpoint.com:443 HTTP/1.1" - - "-" "-" {org.apache.synapse.transport.nhttp.access}
[2013-11-19 21:55:09,048] DEBUG - myendpoint.com:443 - - - "POST myendpoint.com/IncidentQueryList HTTP/1.0" - - "-" "Synapse-HttpComponents-NIO" {org.apache.synapse.transport.nhttp.access}
[2013-11-19 21:55:20,776] DEBUG - Running deployment synchronizer update... tenant : carbon.super {org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask}
[2013-11-19 21:55:20,778] DEBUG - Running deployment synchronizer commit... tenant : carbon.super {org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask}
[2013-11-19 21:55:20,778] TRACE - Retrieving user manager components from the realm. {org.wso2.carbon.registry.core.jdbc.realm.RegistryRealm}
[2013-11-19 21:55:20,778] TRACE - Setting the session for registry operation, chroot: /_system/local, username: wso2.system.user, tenantId: -1234, callerTenantId: -1234. {org.wso2.carbon.registry.core.session.UserRegistry}
[2013-11-19 21:55:20,778] TRACE - Saving managed registry connection to map. {org.wso2.carbon.registry.core.jdbc.utils.Transaction}
[2013-11-19 21:55:20,779] TRACE - Checking the existence of the root collection of the Registry. {org.wso2.carbon.registry.core.session.UserRegistry}
[2013-11-19 21:55:20,779] TRACE - Committed all transactions. {org.wso2.carbon.registry.core.jdbc.utils.Transaction}
[2013-11-19 21:55:20,779] TRACE - Closed all transactions. {org.wso2.carbon.registry.core.jdbc.utils.Transaction}
[2013-11-19 21:55:20,779] TRACE - adding system collections. {org.wso2.carbon.registry.core.session.UserRegistry}
[2013-11-19 21:55:20,779] TRACE - Setting the session for registry operation, chroot: /_system/local, username: wso2.system.user, tenantId: -1234, callerTenantId: -1234. {org.wso2.carbon.registry.core.session.UserRegistry}
[2013-11-19 21:55:20,779] TRACE - Checking the existence of '/_system' collection of the Registry. {org.wso2.carbon.registry.core.utils.RegistryUtils}
[2013-11-19 21:55:20,780] TRACE - Clearing the session for registry operation, chroot: /_system/local, username: wso2.system.user, tenantId: -1234. {org.wso2.carbon.registry.core.session.UserRegistry}
[2013-11-19 21:55:20,780] TRACE - Clearing the session for registry operation, chroot: /_system/local, username: wso2.system.user, tenantId: -1234. {org.wso2.carbon.registry.core.session.UserRegistry}
[2013-11-19 21:55:20,780] TRACE - Preparing operation resource exists, path: repository/components/org.wso2.carbon.deployment.synchronizer/CarbonRepository. {org.wso2.carbon.registry.core.session.UserRegistry}
[2013-11-19 21:55:20,780] TRACE - Setting the session for registry operation, chroot: /_system/local, username: wso2.system.user, tenantId: -1234, callerTenantId: -1234. {org.wso2.carbon.registry.core.session.UserRegistry}
[2013-11-19 21:55:20,780] TRACE - Deriving the absolute path, chroot-base: /_system/local, path: repository/components/org.wso2.carbon.deployment.synchronizer/CarbonRepository. {org.wso2.carbon.registry.core.session.UserRegistry}
[2013-11-19 21:55:20,780] TRACE - Saving managed registry connection to map. {org.wso2.carbon.registry.core.jdbc.utils.Transaction}
[2013-11-19 21:55:20,780] TRACE - REG_PATH_CACHECache: REG_PATH_CACHEMemoryStore miss for org.wso2.carbon.caching.core.registry.RegistryCacheKey#b20989ce {net.sf.ehcache.store.MemoryStore}
[2013-11-19 21:55:20,780] TRACE - REG_PATH_CACHE cache - Miss {net.sf.ehcache.Cache}
[2013-11-19 21:55:20,781] TRACE - REG_PATH_CACHECache: REG_PATH_CACHEMemoryStore miss for org.wso2.carbon.caching.core.registry.RegistryCacheKey#3b52efd6 {net.sf.ehcache.store.MemoryStore}
[2013-11-19 21:55:20,781] TRACE - REG_PATH_CACHE cache - Miss {net.sf.ehcache.Cache}
[2013-11-19 21:55:20,781] TRACE - Committed all transactions. {org.wso2.carbon.registry.core.jdbc.utils.Transaction}
[2013-11-19 21:55:20,781] TRACE - Closed all transactions. {org.wso2.carbon.registry.core.jdbc.utils.Transaction}
[2013-11-19 21:55:20,781] TRACE - Clearing the session for registry operation, chroot: /_system/local, username: wso2.system.user, tenantId: -1234. {org.wso2.carbon.registry.core.session.UserRegistry}
[2013-11-19 21:55:35,781] DEBUG - Running deployment synchronizer update... tenant : carbon.super {org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask}
[2013-11-19 21:55:35,783] DEBUG - Running deployment synchronizer commit... tenant : carbon.super {org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask}
[2013-11-19 21:55:35,784] TRACE - Retrieving user manager components from the realm. {org.wso2.carbon.registry.core.jdbc.realm.RegistryRealm}
[2013-11-19 21:55:35,784] TRACE - Setting the session for registry operation, chroot: /_system/local, username: wso2.system.user, tenantId: -1234, callerTenantId: -1234. {org.wso2.carbon.registry.core.session.UserRegistry}
[2013-11-19 21:55:35,784] TRACE - Saving managed registry connection to map. {org.wso2.carbon.registry.core.jdbc.utils.Transaction}
[2013-11-19 21:55:35,784] TRACE - Checking the existence of the root collection of the Registry. {org.wso2.carbon.registry.core.session.UserRegistry}
[2013-11-19 21:55:35,785] TRACE - Committed all transactions. {org.wso2.carbon.registry.core.jdbc.utils.Transaction}
[2013-11-19 21:55:35,785] TRACE - Closed all transactions. {org.wso2.carbon.registry.core.jdbc.utils.Transaction}
[2013-11-19 21:55:35,785] TRACE - adding system collections. {org.wso2.carbon.registry.core.session.UserRegistry}
[2013-11-19 21:55:35,785] TRACE - Setting the session for registry operation, chroot: /_system/local, username: wso2.system.user, tenantId: -1234, callerTenantId: -1234. {org.wso2.carbon.registry.core.session.UserRegistry}
[2013-11-19 21:55:35,785] TRACE - Checking the existence of '/_system' collection of the Registry. {org.wso2.carbon.registry.core.utils.RegistryUtils}
[2013-11-19 21:55:35,785] TRACE - Clearing the session for registry operation, chroot: /_system/local, username: wso2.system.user, tenantId: -1234. {org.wso2.carbon.registry.core.session.UserRegistry}
[2013-11-19 21:55:35,786] TRACE - Clearing the session for registry operation, chroot: /_system/local, username: wso2.system.user, tenantId: -1234. {org.wso2.carbon.registry.core.session.UserRegistry}
[2013-11-19 21:55:35,786] TRACE - Preparing operation resource exists, path: repository/components/org.wso2.carbon.deployment.synchronizer/CarbonRepository. {org.wso2.carbon.registry.core.session.UserRegistry}
[2013-11-19 21:55:35,786] TRACE - Setting the session for registry operation, chroot: /_system/local, username: wso2.system.user, tenantId: -1234, callerTenantId: -1234. {org.wso2.carbon.registry.core.session.UserRegistry}
[2013-11-19 21:55:35,786] TRACE - Deriving the absolute path, chroot-base: /_system/local, path: repository/components/org.wso2.carbon.deployment.synchronizer/CarbonRepository. {org.wso2.carbon.registry.core.session.UserRegistry}
[2013-11-19 21:55:35,786] TRACE - Saving managed registry connection to map. {org.wso2.carbon.registry.core.jdbc.utils.Transaction}
[2013-11-19 21:55:35,786] TRACE - REG_PATH_CACHECache: REG_PATH_CACHEMemoryStore miss for org.wso2.carbon.caching.core.registry.RegistryCacheKey#b20989ce {net.sf.ehcache.store.MemoryStore}
[2013-11-19 21:55:35,786] TRACE - REG_PATH_CACHE cache - Miss {net.sf.ehcache.Cache}
[2013-11-19 21:55:35,787] TRACE - REG_PATH_CACHECache: REG_PATH_CACHEMemoryStore miss for org.wso2.carbon.caching.core.registry.RegistryCacheKey#3b52efd6 {net.sf.ehcache.store.MemoryStore}
[2013-11-19 21:55:35,787] TRACE - REG_PATH_CACHE cache - Miss {net.sf.ehcache.Cache}
[2013-11-19 21:55:35,787] TRACE - Committed all transactions. {org.wso2.carbon.registry.core.jdbc.utils.Transaction}
[2013-11-19 21:55:35,787] TRACE - Closed all transactions. {org.wso2.carbon.registry.core.jdbc.utils.Transaction}
[2013-11-19 21:55:35,787] TRACE - Clearing the session for registry operation, chroot: /_system/local, username: wso2.system.user, tenantId: -1234. {org.wso2.carbon.registry.core.session.UserRegistry}
[2013-11-19 21:55:45,115] DEBUG - http-incoming-53: Consume input {org.apache.synapse.transport.http.conn.LoggingNHttpServerConnection}
[2013-11-19 21:55:45,115] DEBUG - I/O session http-incoming-53-89 myesbhost.com:8243<->myesbhost.com:34746[ACTIVE][r:r][ACTIVE][NOT_HANDSHAKING][EOF][][0][0][0][0]: -1 bytes read {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:55:45,115] DEBUG - http-incoming-53: Close connection {org.apache.synapse.transport.http.conn.LoggingNHttpServerConnection}
[2013-11-19 21:55:45,115] DEBUG - I/O session http-incoming-53-89 myesbhost.com:8243<->myesbhost.com:34746[ACTIVE][r:r][ACTIVE][NOT_HANDSHAKING][EOF][][0][0][0][0]: Close {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:55:45,115] DEBUG - http-incoming-53: Removing the connection : http-incoming-53 from pool of size : 0 {org.apache.synapse.transport.nhttp.ServerHandler}
[2013-11-19 21:55:45,115] DEBUG - http-incoming-53: Shutdown connection {org.apache.synapse.transport.http.conn.LoggingNHttpServerConnection}
[2013-11-19 21:55:45,115] DEBUG - I/O session http-incoming-53-89 0.0.0.0:8243<->myesbhost.com:34746[CLOSED][][CLOSED][NEED_UNWRAP][EOF][][0][0][29][0]: Shutdown {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:55:45,115] DEBUG - I/O session http-incoming-53-89 0.0.0.0:8243<->myesbhost.com:34746[CLOSED][][CLOSED][NEED_UNWRAP][EOF][][0][0][29][0]: Remove attribute synapse.request-sink-buffer {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:55:45,115] DEBUG - I/O session http-incoming-53-89 0.0.0.0:8243<->myesbhost.com:34746[CLOSED][][CLOSED][NEED_UNWRAP][EOF][][0][0][29][0]: Remove attribute synapse.response-source-buffer {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:55:45,115] DEBUG - I/O session http-incoming-53-89 0.0.0.0:8243<->myesbhost.com:34746[CLOSED][][CLOSED][NEED_UNWRAP][EOF][][0][0][29][0]: Remove attribute synapse.connectionCreationTime {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:55:45,115] DEBUG - I/O session http-incoming-53-89 0.0.0.0:8243<->myesbhost.com:34746[CLOSED][][CLOSED][NEED_UNWRAP][EOF][][0][0][29][0]: Remove attribute synapse.server-connection-debug {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:55:45,115] TRACE - http-incoming-53: Connection closed {org.apache.synapse.transport.nhttp.ServerHandler}
[2013-11-19 21:55:45,195] DEBUG - http-outgoing-37: Connection timeout For : myproxyhostipaddr:3128 For Request : Axis2Request [Message ID : urn:uuid:ed377766-eb0a-4be7-92d9-f2b752289687] [Status Completed : false] [Status SendingCompleted : true] {org.apache.synapse.transport.nhttp.ClientHandler}
[2013-11-19 21:55:45,195] DEBUG - http-outgoing-37: Connection to remote address : myproxyhost.com/myproxyhostipaddr:3128 from local address : /myesbhost.com:50695 is closed! {org.apache.synapse.transport.nhttp.ClientHandler}
[2013-11-19 21:55:45,195] DEBUG - http-outgoing-37: Shutdown connection {org.apache.synapse.transport.http.conn.LoggingNHttpClientConnection}
[2013-11-19 21:55:45,195] DEBUG - getAction (null) from org.apache.axis2.client.Options#30e41c7e {org.apache.axis2.client.Options}
[2013-11-19 21:55:45,195] DEBUG - Old WSAAction is (null) {org.apache.axis2.context.MessageContext}
[2013-11-19 21:55:45,195] DEBUG - New WSAAction is (http://www.w3.org/2005/08/addressing/soap/fault) {org.apache.axis2.context.MessageContext}
[2013-11-19 21:55:45,195] DEBUG - setAction Old action is (null) {org.apache.axis2.client.Options}
[2013-11-19 21:55:45,195] DEBUG - setAction New action is (http://www.w3.org/2005/08/addressing/soap/fault) {org.apache.axis2.client.Options}
[2013-11-19 21:55:45,195] DEBUG - I/O session http-outgoing-37-91 myesbhost.com:50695<->myproxyhostipaddr:3128[ACTIVE][r:w][ACTIVE][NOT_HANDSHAKING][0][0][0][0]: Shutdown {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:55:45,195] TRACE - hasAnonymousAddress: http://www.w3.org/2005/08/addressing/anonymous is Anonymous: true {org.apache.axis2.addressing.EndpointReference}
[2013-11-19 21:55:45,195] DEBUG - I/O session http-outgoing-37-91 0.0.0.0:50695<->myproxyhostipaddr:3128[CLOSED][][CLOSED][NOT_HANDSHAKING][0][0][0][0]: Remove attribute synapse.response-sink-buffer {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:55:45,195] DEBUG - Unsetting USE_ASYNC_OPERATIONS and DISABLE_RESPONSE_ACK for unreliable message {org.apache.sandesha2.SandeshaModule}
[2013-11-19 21:55:45,196] DEBUG - Entry: SandeshaModule::resolveTarget {org.apache.sandesha2.SandeshaModule}
[2013-11-19 21:55:45,196] DEBUG - Entry: SandeshaUtil::isMessageUnreliable {org.apache.sandesha2.util.SandeshaUtil}
[2013-11-19 21:55:45,196] DEBUG - I/O session http-outgoing-37-91 0.0.0.0:50695<->myproxyhostipaddr:3128[CLOSED][][CLOSED][NOT_HANDSHAKING][0][0][0][0]: Remove attribute synapse.request-source-buffer {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:55:45,196] DEBUG - Exit: SandeshaUtil::isMessageUnreliable, false {org.apache.sandesha2.util.SandeshaUtil}
[2013-11-19 21:55:45,196] DEBUG - Exit: SandeshaModule::resolveTarget {org.apache.sandesha2.SandeshaModule}
[2013-11-19 21:55:45,196] DEBUG - start createFaultEnvelope() {org.apache.axis2.util.MessageContextBuilder}
[2013-11-19 21:55:45,196] DEBUG - I/O session http-outgoing-37-91 0.0.0.0:50695<->myproxyhostipaddr:3128[CLOSED][][CLOSED][NOT_HANDSHAKING][0][0][0][0]: Remove attribute synapse.client-connection-debug {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:55:45,196] DEBUG - axisFault != null {org.apache.axis2.util.MessageContextBuilder}
[2013-11-19 21:55:45,196] DEBUG - faultCode == null {org.apache.axis2.util.MessageContextBuilder}
[2013-11-19 21:55:45,196] DEBUG - context.isSOAP11() = true {org.apache.axis2.util.MessageContextBuilder}
[2013-11-19 21:55:45,196] DEBUG - I/O session http-outgoing-37-91 0.0.0.0:50695<->myproxyhostipaddr:3128[CLOSED][][CLOSED][NOT_HANDSHAKING][0][0][0][0]: Remove attribute synapse.connectionCreationTime {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:55:45,196] DEBUG - I/O session http-outgoing-37-91 0.0.0.0:50695<->myproxyhostipaddr:3128[CLOSED][][CLOSED][NOT_HANDSHAKING][0][0][0][0]: Remove attribute synapse.response-sink-buffer {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:55:45,196] DEBUG - End createFaultEnvelope() {org.apache.axis2.util.MessageContextBuilder}
[2013-11-19 21:55:45,196] DEBUG - I/O session http-outgoing-37-91 0.0.0.0:50695<->myproxyhostipaddr:3128[CLOSED][][CLOSED][NOT_HANDSHAKING][0][0][0][0]: Remove attribute synapse.request-source-buffer {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:55:45,196] DEBUG - Sending Fault for Request with Message ID : urn:uuid:ed377766-eb0a-4be7-92d9-f2b752289687 {org.apache.synapse.transport.nhttp.ClientHandler}
[2013-11-19 21:55:45,196] TRACE - http-outgoing-37: Connection close For : myproxyhostipaddr:3128 For Request : Axis2Request [Message ID : urn:uuid:ed377766-eb0a-4be7-92d9-f2b752289687] [Status Completed : true] [Status SendingCompleted : true] {org.apache.synapse.transport.nhttp.ClientHandler}
[2013-11-19 21:55:45,196] DEBUG - Callback removed for request message id : urn:uuid:ed377766-eb0a-4be7-92d9-f2b752289687. Pending callbacks count : 0 {org.apache.synapse.core.axis2.SynapseCallbackReceiver}
[2013-11-19 21:55:45,197] DEBUG - http-outgoing-37: Keep-alive connection closed For : myproxyhostipaddr:3128 For Request : Axis2Request [Message ID : urn:uuid:ed377766-eb0a-4be7-92d9-f2b752289687] [Status Completed : true] [Status SendingCompleted : true] {org.apache.synapse.transport.nhttp.ClientHandler}
[2013-11-19 21:55:45,197] DEBUG - Created a Error Log : ErrorLog{errorCode='101504'} {org.apache.synapse.aspects.statistics.ErrorLogFactory}
[2013-11-19 21:55:45,197] DEBUG - http-outgoing-37: Connection to remote address : myproxyhost.com/myproxyhostipaddr:3128 from local address : 0.0.0.0/0.0.0.0:50695 is closed! {org.apache.synapse.transport.nhttp.ClientHandler}
[2013-11-19 21:55:45,198] DEBUG - [Failed Request Message ID : urn:uuid:ed377766-eb0a-4be7-92d9-f2b752289687] [New to be Retried Request Message ID : urn:uuid:97a91179-1350-47c4-af2c-3d746ecc57b9] {org.apache.synapse.core.axis2.SynapseCallbackReceiver}
[2013-11-19 21:55:45,198] DEBUG - http-outgoing-37: Shutdown connection {org.apache.synapse.transport.http.conn.LoggingNHttpClientConnection}
[2013-11-19 21:55:45,198] WARN - ERROR_CODE : 101504 {org.apache.synapse.FaultHandler}
[2013-11-19 21:55:45,198] WARN - ERROR_MESSAGE : Connection timeout For : myproxyhostipaddr:3128 For Request : Axis2Request [Message ID : urn:uuid:ed377766-eb0a-4be7-92d9-f2b752289687] [Status Completed : false] [Status SendingCompleted : true] {org.apache.synapse.FaultHandler}
[2013-11-19 21:55:45,198] WARN - ERROR_DETAIL : Connection timeout For : myproxyhostipaddr:3128 For Request : Axis2Request [Message ID : urn:uuid:ed377766-eb0a-4be7-92d9-f2b752289687] [Status Completed : false] [Status SendingCompleted : true] {org.apache.synapse.FaultHandler}
[2013-11-19 21:55:45,198] WARN - ERROR_EXCEPTION : null {org.apache.synapse.FaultHandler}
[2013-11-19 21:55:45,198] DEBUG - I/O session http-outgoing-37-91 0.0.0.0:50695<->myproxyhostipaddr:3128[CLOSED][][CLOSED][NOT_HANDSHAKING][0][0][0][0]: Shutdown {org.apache.http.nio.reactor.ssl.SSLIOSession}
[2013-11-19 21:55:45,198] WARN - FaultHandler : Endpoint [RemedyQueryIncidents] {org.apache.synapse.FaultHandler}
[2013-11-19 21:55:45,198] DEBUG - Encountered a default HTTP connection timeout error : 101504 {org.apache.synapse.endpoints.AddressEndpoint}
[2013-11-19 21:55:45,198] DEBUG - Endpoint : RemedyQueryIncidents will be marked for SUSPENSION due to the occurrence of one of the configured errors {org.apache.synapse.endpoints.EndpointContext}
[2013-11-19 21:55:45,198] DEBUG - I/O session http-outgoing-37-91 0.0.0.0:50695<->myproxyhostipaddr:3128[CLOSED][][CLOSED][NOT_HANDSHAKING][0][0][0][0]: Remove attribute synapse.response-sink-buffer {org.apache.http.nio.reactor.ssl.SSLIOSession}
Related
HEAD / and GET / in spring data ES 4.4.1
ES cloud is hosted in Azure. It works in spring data ES 4.1.5(ES client 7.9.3). But spring data ES 4.4.1 (ES client 7.17.4) requires cluster:monitor/main permission. My admin doesn't want to grant such permission. "root_cause":[{"type":"security_exception","reason":"action [cluster:monitor/main] is unauthorized for user [xxxx] with roles I first asked question in this post. Val pointed out / end point cluster level API requires this permission. why does it need cluster:monitor/main permission I did some debug and found out more details. Spring data ES is sending HEAD / and GET / during SimpleElasticsearchRepository initialization. Sorry I can't get the format working. So I attach screenshot here There is error during SimpleElasticsearchRepository initialization. SimpleElasticsearchRepository -> RestIndexTemplate -> RestHighLevelClient During SimpleElasticsearchRepository initialization, indices are empty. So the normal HEAD request on actual index becomes HEAD /. This user account doesn't have permission on sending HEAD / Since the purpose is to check if index exists, is it possible to skip checking with server if indices are empty? Because it turns into request to check cluster level info. And below requests require total different permission. HEAD / HEAD /actual_index I also find this error in the log. I couldn't find out how it was being sent out in spring data ES. This use can't run GET / neither. It works in spring data ES 4.1.5 Why didn't Spring data ES 4.1.5 send out above HEAD / and GET / requests? Updated to include my original post.
I found out my details about the issues. HEAD / During SimpleElasticsearchRepository initialization, it does below. My index has createIndex = true. So it goes to check exists(). But the index is empty here, so HEAD / my_index becomes HEAD /. I don't know why index is empty here. But I set createIndex = false to skip it. if (this.shouldCreateIndexAndMapping() && !this.indexOperations.exists()) { this.indexOperations.createWithMapping(); } GET / Based on my testing, GET / is being sent out once per session. It acts like network connectivity testing. If there is any error, it will be ignored. //MainClientExec - [exchange: 1] start execution -- GET / HTTP/1.1[\r][\n] -- once per session 11:58:46.648 [main] DEBUG org.apache.http.impl.nio.client.MainClientExec - [exchange: 1] start execution 11:58:46.967 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> GET / HTTP/1.1 11:58:46.967 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> X-Elastic-Client-Meta: es=7.17.4p,jv=1.8,t=7.17.4p,hc=4.1.4,kt=1.6,gy=2.4 11:58:46.967 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> Content-Length: 0 11:58:46.967 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> Host: xxx.azure.elastic-cloud.com:9243 11:58:46.967 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> Connection: Keep-Alive 11:58:46.967 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> User-Agent: elasticsearch-java/7.17.4-SNAPSHOT (Java/1.8.0_331) 11:58:46.967 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> Authorization: Basic xxx 11:58:47.105 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "HTTP/1.1 403 Forbidden[\r][\n]" 11:58:47.105 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "Content-Length: 4157[\r][\n]" 11:58:47.105 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "Content-Type: application/json; charset=UTF-8[\r][\n]" 11:58:47.105 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "X-Cloud-Request-Id: 3TA-1pHlTXuLbAoue0rKZw[\r][\n]" 11:58:47.105 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "X-Elastic-Product: Elasticsearch[\r][\n]" 11:58:47.105 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "X-Found-Handling-Cluster: aaf9bff719c349bbad7a015615a994f7[\r][\n]" 11:58:47.105 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "X-Found-Handling-Instance: instance-0000000001[\r][\n]" 11:58:47.105 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "Date: Fri, 22 Jul 2022 16:58:46 GMT[\r][\n]" 11:58:47.105 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "[\r][\n]" 11:58:47.105 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 << "{"error":{"root_cause":[{"type":"security_exception","reason":"action [cluster:monitor/main] is unauthorized for user 11:58:47.115 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 << HTTP/1.1 403 Forbidden 11:58:47.115 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.MainClientExec - [exchange: 1] Response received HTTP/1.1 403 Forbidden 11:58:47.126 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.InternalIODispatch - http-outgoing-0 [ACTIVE(4157)] Input ready 11:58:47.126 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.MainClientExec - [exchange: 1] Consume content 11:58:47.131 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.InternalHttpAsyncClient - [exchange: 1] Connection can be kept alive indefinitely 11:58:47.131 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.MainClientExec - [exchange: 1] Response processed 11:58:47.131 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.InternalHttpAsyncClient - [exchange: 1] releasing connection 11:58:47.131 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl - http-outgoing-0 11:58:47.131 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager - Releasing connection: [id: http-outgoing-0][route: {s}->https:// 11:58:47.131 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager - Connection [id: http-outgoing-0][route: {s}->https:// 11:58:47.132 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl - http-outgoing-0 10.2 11:58:47.133 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager - Connection released: [id: http-outgoing-0][ After above, the real query is sent. //MainClientExec - [exchange: 2] start execution - GET /my_index/_doc/asdf HTTP/1.1 11:58:47.137 [main] DEBUG org.apache.http.impl.nio.client.MainClientExec - [exchange: 2] start execution 11:58:47.147 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> GET /my_index/_doc/asdf HTTP/1.1 11:58:47.147 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> X-Elastic-Client-Meta: es=7.17.4p,jv=1.8,t=7.17.4p,hc=4.1.4,kt=1.6,gy=2.4 11:58:47.147 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> Content-Length: 0 11:58:47.147 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> Host: xxx.azure.elastic-cloud.com:9243 11:58:47.147 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> Connection: Keep-Alive 11:58:47.147 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> User-Agent: elasticsearch-java/7.17.4-SNAPSHOT (Java/1.8.0_331) 11:58:47.147 [I/O dispatcher 1] DEBUG org.apache.http.headers - http-outgoing-0 >> Authorization: Basic xx== 11:58:47.148 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl - http-outgoing-0 10.24.15.131:58069<->52.158.162.229:9243[ACTIVE][rw:w][ACTIVE][rw][NOT_HANDSHAKING][0][0][0]: Event set [w] 11:58:47.148 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.client.MainClientExec - [exchange: 2] Request completed 11:58:47.148 [I/O dispatcher 1] DEBUG org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl - http-outgoing-0 10.24.15.131:58069<->52.158.162.229:9243[ACTIVE][rw:w][ACTIVE][rw][NOT_HANDSHAKING][0][0][372]: 343 bytes written 11:58:47.148 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 >> "GET /my_index/_doc/asdf HTTP/1.1[\r][\n]" 11:58:47.148 [I/O dispatcher 1] DEBUG org.apache.http.wire - http-outgoing-0 >> "X-Elastic-Client-Meta: es=7.17.4p,jv=1.8,t=7.17.4p,hc=4.1.4,kt=1.6,gy=2.4[\r][\n]"
Redirect to /error instead of /oauth2/authorize with new spring-security-oauth2-autorization-server
I am using react client and new spring-security-oauth2-autorization-server. And I've configured public-client as was suggested in this video . At my local machine after entering login and password everything is ok auth server redirects me to /oauth2/authorize and then back to react app with code. But at testing environment (in my case it is Kubernetes with two containers) auth server redirects on /error?client_id=public-client&redirect_uri=.... I enabled TRACE all application but logs don't answer me where is the problem. Here is part of the log. 20220513 14:26:58 DEBUG o.s.s.a.d.DaoAuthenticationProvider:199 - Authenticated user 20220513 14:26:58 TRACE o.s.b.f.s.DefaultListableBeanFactory:264 - Returning cached instance of singleton bean 'delegatingApplicationListener' 20220513 14:26:58 TRACE o.s.s.w.a.s.CompositeSessionAuthenticationStrategy:79 - Preparing session with ChangeSessionIdAuthenticationStrategy (1/2) 20220513 14:26:58 DEBUG o.s.s.w.a.s.ChangeSessionIdAuthenticationStrategy:99 - Changed session id from F2238B1D17F13C607CC13DD00AD262DF 20220513 14:26:58 TRACE o.s.b.f.s.DefaultListableBeanFactory:264 - Returning cached instance of singleton bean 'delegatingApplicationListener' 20220513 14:26:58 TRACE o.s.s.w.a.s.CompositeSessionAuthenticationStrategy:79 - Preparing session with CsrfAuthenticationStrategy (2/2) 20220513 14:26:58 DEBUG o.s.s.w.c.CsrfAuthenticationStrategy:63 - Replaced CSRF Token 20220513 14:26:58 DEBUG o.s.s.w.a.UsernamePasswordAuthenticationFilter:318 - Set SecurityContextHolder to UsernamePasswordAuthenticationToken [Principal=org.springframework.security.core.userdetails.User [Username=Surkov, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, credentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[message_v, user_c]], Credentials=[PROTECTED], Authenticated=true, Details=WebAuthenticationDetails [RemoteIpAddress=192.168.11.254, SessionId=F2238B1D17F13C607CC13DD00AD262DF], Granted Authorities=[message_v, user_c]] 20220513 14:26:58 TRACE o.s.b.f.s.DefaultListableBeanFactory:264 - Returning cached instance of singleton bean 'delegatingApplicationListener' 20220513 14:26:58 DEBUG o.s.s.web.DefaultRedirectStrategy:57 - Redirecting to https://192.168.25.55/auth/error?client_id=public-client&redirect_uri=https%3A%2F%2F192.168.25.55&response_type=code&scope=openid&state=0df5af37f09c46a7ae2f7cedca3991b4&code_challenge=LDBXhJi-uyu8rWgbneAqN19RQf7f5LJSwgJU3SCnrqg&code_challenge_method=S256&response_mode=query 20220513 14:26:58 DEBUG o.s.s.w.c.HttpSessionSecurityContextRepository:361 - Stored SecurityContextImpl [Authentication=UsernamePasswordAuthenticationToken [Principal=org.springframework.security.core.userdetails.User [Username=Surkov, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, credentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[message_v, user_c]], Credentials=[PROTECTED], Authenticated=true, Details=WebAuthenticationDetails [RemoteIpAddress=192.168.11.254, SessionId=F2238B1D17F13C607CC13DD00AD262DF], Granted Authorities=[message_v, user_c]]] to HttpSession [org.apache.catalina.session.StandardSessionFacade#27cd0b2e] Here we can see that Set SecurityContextHolder to UsernamePasswordAuthenticationToken with Authenticated=true but than it redirects to /error without any additional information about error. BTW i use SameSate=None cookie and https at testing env. JSESSIONID=4E559F0CCBE6258B590DD4809ECB3D3F; Path=/auth; HttpOnly; SameSite=None; Secure
Twitter + spring social , Authentication Eror
I tried to build an application to connect to Twitter and post tweets. I created twitter template using spring social. pom.xml <dependency> <groupId>org.springframework.social</groupId> <artifactId>spring-social-twitter</artifactId> <version>1.1.0.RELEASE</version> </dependency> twitter template return new TwitterTemplate(consumerKey, consumerSecret, accessToken, accessTokenSecret); But I am getting the following error. Caused by: org.springframework.social.MissingAuthorizationException: Authorization is required for the operation, but the API binding was created without authorization. I added Read and Write permissions under app settings in the developer portal as well. logs, of HTTPS calls, made to Twitter 12:19:49.750 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "POST /1.1/statuses/update.json HTTP/1.1[\r][\n]" 12:19:49.751 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "Accept: application/json, application/*+json[\r][\n]" 12:19:49.751 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "Content-Type: application/x-www-form-urlencoded;charset=UTF-8[\r][\n]" 12:19:49.751 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "Authorization: OAuth oauth_nonce="2562115169", oauth_token="my_token", oauth_consumer_key="my_key", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1632466188", oauth_version="1.0", oauth_signature="iwmB09dBm2R7SJ07w8CAlN4EiT8%3D"[\r][\n]" 12:19:49.752 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "Content-Length: 27[\r][\n]" 12:19:49.752 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "Host: api.twitter.com[\r][\n]" 12:19:49.752 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]" 12:19:49.752 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "User-Agent: Apache-HttpClient/4.5.10 (Java/1.8.0_231)[\r][\n]" 12:19:49.752 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "Accept-Encoding: gzip,deflate[\r][\n]" 12:19:49.752 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "[\r][\n]" 12:19:49.753 [main] DEBUG org.apache.http.wire - http-outgoing-0 >> "status=Test+eng+model+tweet" 12:19:50.257 [main] DEBUG org.apache.http.wire - http-outgoing-0 << "HTTP/1.1 401 Unauthorized[\r][\n]" What am I missing, any help is appreciated. Thanks in advance
MyBatis log4j2 logging level not changing
I have an inverse wish from most other posts regarding log4j2 logging of MyBatis. I am getting the MyBatis SQL logged, but I want to reduce it. Below is my log4j2.properties file. At present, I have the rootLogger.level=ALL in effect. This is nicely displaying all log messages, including the MyBatis Prepare SQL and parameters list. When I change it to rootLogger.level=FATAL all MyBatis messages stop appearing in console and log file, as do other messages. So this is working well. But I would like to have MyBatis logging at level=ERROR (or higher) for normal circumstances and the rest staying at ALL. When I change the # MyBatis logging configuration... com.wert.bus.mappers=TRACE to any other Level, it does not take effect. I prefixed "log4j", "log4j2", "log4j.logger", "log4j2.logger" before "com.wert" but it had no effect. The mappers have namespace com.wert.bus.mappers The output on the first session: [DEBUG] 2018-07-21 01:56:35.648 [main] LogFactory - Logging initialized using 'class org.apache.ibatis.logging.log4j2.Log4j2Impl' adapter. [DEBUG] 2018-07-21 01:56:43.201 [main] PooledDataSource - PooledDataSource forcefully closed/removed all connections. [DEBUG] 2018-07-21 01:56:43.207 [main] PooledDataSource - PooledDataSource forcefully closed/removed all connections. [DEBUG] 2018-07-21 01:56:43.213 [main] PooledDataSource - PooledDataSource forcefully closed/removed all connections. [DEBUG] 2018-07-21 01:56:43.219 [main] PooledDataSource - PooledDataSource forcefully closed/removed all connections. [DEBUG] 2018-07-21 01:56:43.225 [main] PooledDataSource - PooledDataSource forcefully closed/removed all connections. [DEBUG] 2018-07-21 01:56:43.231 [main] PooledDataSource - PooledDataSource forcefully closed/removed all connections. [DEBUG] 2018-07-21 01:56:43.237 [main] PooledDataSource - PooledDataSource forcefully closed/removed all connections. The output on a query: [DEBUG] 2018-07-21 02:00:10.047 [main] JdbcTransaction - Opening JDBC Connection [DEBUG] 2018-07-21 02:00:19.739 [main] PooledDataSource - Created connection 105321150. [DEBUG] 2018-07-21 02:00:19.823 [main] insertJobStatus - ==> Preparing: insert bus_loc ( loc_date, loc_name, status, start_time, end_time) values ( ?, ?, ?, ?, ?) [DEBUG] 2018-07-21 02:00:24.512 [main] insertJobStatus - ==> Parameters: 2018-07-21 01:56:26.978(String), Boston(String), Prep(String), 2018-07-21 01:59:41(String), null [DEBUG] 2018-07-21 02:00:25.034 [main] insertJobStatus - <== Updates: 1 What have I missed? Thanks in advance for your help. log4j2.properties #status = trace for log4j2 startup issues #status other values: trace, debug, info, warn, error, fatal status = error dest = err #Time interval to check for changes to file in seconds monitorInterval = 300 name=BusLoggingConfig property.filename=logs appenders=console,rolling # MyBatis logging configuration... com.wert.bus.mappers=TRACE appender.console.type=Console appender.console.name=STDOUT appender.console.layout.type=PatternLayout appender.console.layout.pattern=[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %m%n #appender.console.layout.pattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n appender.rolling.type = RollingFile appender.rolling.name = RollingFile appender.rolling.fileName = ${filename}/Bus.log appender.rolling.filePattern = logs/Bus-%d{yyyyMMdd-HHmmss}-%i.log appender.rolling.layout.type = PatternLayout appender.rolling.layout.pattern = [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %m%n appender.rolling.policies.type = Policies appender.rolling.policies.time.type = TimeBasedTriggeringPolicy appender.rolling.policies.time.interval = 1 appender.rolling.policies.time.modulate = true appender.rolling.policies.size.type = SizeBasedTriggeringPolicy appender.rolling.policies.size.size=10MB appender.rolling.strategy.type = DefaultRolloverStrategy appender.rolling.strategy.max = 20 loggers=rolling logger.rolling.name=com.wert.bus #logger.rolling.level=debug logger.rolling.additivity=true logger.rolling.appenderRef.rolling.ref=RollingFile rootLogger.level=ALL rootLogger.appenderRefs=stdout rootLogger.appenderRef.stdout.ref=STDOUT
One of the problems is using additivity for child logger: logger.rolling.additivity=true This settings means that every logging event will be processed twice. First time using appenders and levels for logger com.wert.bus and then by parent (in your case root) logger.
Grails 3.3.2 Spring Security Code & CAS
I am getting the following exception after entering my user name and pw into my CAS login form, Grails 3.3.2 app. Configuring Spring Security Core ... ... finished configuring Spring Security Core Configuring Spring Security CAS ... ... finished configuring Spring Security CAS Grails application running at http://localhost:8089 in environment: development 2018-05-22 13:59:47.395 DEBUG --- [nio-8089-exec-2] o.j.c.c.session.SingleSignOutHandler : Recording session for token ST-1553-4NR7XWRPXGioiJXs9oLd-cas-01.mydomain.com 2018-05-22 13:59:47.395 DEBUG --- [nio-8089-exec-2] o.j.c.c.session.SingleSignOutHandler : Recording session for token ST-1553-4NR7XWRPXGioiJXs9oLd-cas-01.mydomain.com 2018-05-22 13:59:47.425 DEBUG --- [nio-8089-exec-2] c.c.s.HashMapBackedSessionMappingStorage : Attempting to remove Session=[7CBCC94E9BF728A044B05C07ABFAB894] 2018-05-22 13:59:47.425 DEBUG --- [nio-8089-exec-2] c.c.s.HashMapBackedSessionMappingStorage : Attempting to remove Session=[7CBCC94E9BF728A044B05C07ABFAB894] 2018-05-22 13:59:47.425 DEBUG --- [nio-8089-exec-2] c.c.s.HashMapBackedSessionMappingStorage : No mapping for session found. Ignoring. 2018-05-22 13:59:47.425 DEBUG --- [nio-8089-exec-2] c.c.s.HashMapBackedSessionMappingStorage : No mapping for session found. Ignoring. 2018-05-22 13:59:47.440 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Placing URL parameters in map. 2018-05-22 13:59:47.440 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Placing URL parameters in map. 2018-05-22 13:59:47.441 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Calling template URL attribute map. 2018-05-22 13:59:47.441 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Calling template URL attribute map. 2018-05-22 13:59:47.441 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Loading custom parameters from configuration. 2018-05-22 13:59:47.441 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Loading custom parameters from configuration. 2018-05-22 13:59:47.442 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Constructing validation url: https://cas.mydomain.com/cas/serviceValidate?pgtUrl=http%3A%2F%2Flocalhost%3A8089%2Fsecure%2Freceptor&ticket=ST-1553-4NR7XWRPXGioiJXs9oLd-cas-01.mydomain.com&service=http%3A%2F%2Flocalhost%3A8089%2Flogin%2Fcas 2018-05-22 13:59:47.442 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Constructing validation url: https://cas.mydomain.com/cas/serviceValidate?pgtUrl=http%3A%2F%2Flocalhost%3A8089%2Fsecure%2Freceptor&ticket=ST-1553-4NR7XWRPXGioiJXs9oLd-cas-01.mydomain.com&service=http%3A%2F%2Flocalhost%3A8089%2Flogin%2Fcas 2018-05-22 13:59:47.442 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Retrieving response from server. 2018-05-22 13:59:47.442 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Retrieving response from server. 2018-05-22 13:59:48.864 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Server response: 2018-05-22 13:59:48.864 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Server response: 2018-05-22 13:59:49.334 ERROR --- [nio-8089-exec-2] org.jasig.cas.client.util.XmlUtils : Premature end of file. org.xml.sax.SAXParseException: Premature end of file. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.jasig.cas.client.util.XmlUtils.getTextForElement(XmlUtils.java:192) serverUrlPrefix = 'http://cas.mydomain.com/cas' Any ideas or suggestions would be appreciated!!! Below is the output from my Grails 2.5.1 version of the same app and CAS server. 2018-05-18 10:42:26,755 DEBUG AbstractUrlBasedTicketValidator - Placing URL parameters in map. 2018-05-18 10:42:26,755 DEBUG AbstractUrlBasedTicketValidator - Calling template URL attribute map. 2018-05-18 10:42:26,756 DEBUG AbstractUrlBasedTicketValidator - Loading custom parameters from configuration. 2018-05-18 10:42:26,756 DEBUG AbstractUrlBasedTicketValidator - Constructing validation url: https://cas.mydomin.com/serviceValidate?ticket=ST-1485-7X6VirHikiEKadmDnt0Y-cas-01.mydomin.com&service=http%3A%2F%2Flocalhost%3A8089%2Fj_spring_cas_security_check 2018-05-18 10:42:26,756 DEBUG AbstractUrlBasedTicketValidator - Retrieving response from server. 2018-05-18 10:42:27,204 DEBUG AbstractUrlBasedTicketValidator - Server response: <cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'> <cas:authenticationSuccess> <cas:user>first.lastname</cas:user> </cas:authenticationSuccess> </cas:serviceResponse>