OSGI Disable org.apache.http.wire log - osgi

I am using osgi httpcore;version=4.4.1 . I need to stop the debug logging of "org.apache.http.wire"
Is there any runtime config to disable this logging?
I have tried log4j.logger.org.apache.http.wire=ERROR in run time with no effect.
[Thread-522] DEBUG org.apache.http.wire - << " <volumeSize>6</volumeSize>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <deleteOnTermination>true</deleteOnTermination>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <volumeType>standard</volumeType>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <encrypted>false</encrypted>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " </ebs>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " </item>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " </blockDeviceMapping>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <virtualizationType>paravirtual</virtualizationType>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <hypervisor>xen</hypervisor>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " </item>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <item>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <imageId>ami-30697651</imageId>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <imageLocation>057448758665/CentOS 7.2 x86_64 with cloud-init (PV)</imageLocation>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <imageState>available</imageState>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <imageOwnerId>057448758665</imageOwnerId>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <creationDate>2015-12-15T16:22:38.000Z</creationDate>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <isPublic>true</isPublic>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <architecture>x86_64</architecture>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <imageType>machine</imageType>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <kernelId>aki-fc8f11cc</kernelId>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <name>CentOS 7.2 x86_64 with cloud-init (PV)</name>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <description>Base CentOS 7.2.1511 with cloud-init ( use user ec2-user ), paravirtual and EBS backed. This image has been created with ComodIT. See how to build yours at http://www.comodit.com/2012/07/12/how-to-build-your-custom-centos-image-on-ec2</description>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <rootDeviceType>ebs</rootDeviceType>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <rootDeviceName>/dev/sda</rootDeviceName>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <blockDeviceMapping>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <item>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <deviceName>/dev/sda</deviceName>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <ebs>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <snapshotId>snap-955a440c</snapshotId>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <volumeSize>6</volumeSize>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <deleteOnTermination>true</deleteOnTermination>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <volumeType>gp2</volumeType>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <encrypted>false</encrypted>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " </ebs>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " </item>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " </blockDeviceMapping>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <virtualizationType>paravirtual</virtualizationType>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <hypervisor>xen</hypervisor>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " </item>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <item>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <imageId>ami-3181cf01</imageId>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <imageLocation>057448758665/comodit-bootstrap-hvm</imageLocation>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <imageState>available</imageState>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <imageOwnerId>057448758665</imageOwnerId>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <creationDate>2014-10-24T11:01:30.000Z</creationDate>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <isPublic>true</isPublic>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <architecture>x86_64</architecture>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <imageType>machine</imageType>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <name>comodit-bootstrap-hvm</name>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <description>comodit-bootstrap-hvm</description>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <rootDeviceType>ebs</rootDeviceType>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <rootDeviceName>/dev/sda1</rootDeviceName>[\n]"
[Thread-522] DEBUG org.apache.http.wire - << " <blockDeviceMapping>[\n]"

Related

Websockets and Adafruit Feather OpCode 11

My goal is to connect an Adafruit Feather (WiFi) to a Websocket Server running on my computer.
Server: EventMachine Simple Server Example
Clients: ArduinoHttpClient > SimpleWebsocketExample
My issues is that when I reset my Feather, I sometimes cannot reconnect. I have to wait a couple of minutes, a couple of extra resets, before I can reconnect. Turning on the debug flag on the server code, I see two patterns:
Successful connect
[[:initialize]]
[[:receive_data, "GET /"]]
[[:receive_data, " HTTP/1.1"]]
[[:receive_data, "\r\n"]]
[[:receive_data, "Host: "]]
[[:receive_data, "XXX:XXX:XX:XX"]] # masked for security, but the IP of my server
[[:receive_data, "443\r\n"]]
[[:receive_data, "User-Agent"]]
[[:receive_data, ": "]]
[[:receive_data, "Arduino/2.2.0"]]
[[:receive_data, "\r\n"]]
[[:receive_data, "Upgrade"]]
[[:receive_data, ": "]]
[[:receive_data, "websocket"]]
[[:receive_data, "\r\n"]]
[[:receive_data, "Connection"]]
[[:receive_data, ": "]]
[[:receive_data, "Upgrade"]]
[[:receive_data, "\r\n"]]
[[:receive_data, "Sec-WebSocket-Key"]]
[[:receive_data, ": "]]
[[:receive_data, "eGHyXdbEMgiCiR0cZEBRTQ=="]]
[[:receive_data, "\r\nSec-WebSocket-Version"]]
[[:receive_data, ": "]]
[[:receive_data, "13"]]
[[:receive_data, "\r\n\r\n"]]
[[:accepting_ws_version, 13]]
[[:upgrade_response,
"HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: rUUq6+3qildLwg2c5CpgHfxTO1I=\r\n\r\n"]]
[[:sending_frame,
:text,
"{\"sender\":\"socket-server\",\"event\":\"connection_opened\",\"data\":{\"sid\":3,\"ip\":\"129.XXX.XXX.30\"}}"]]
# DEVICE CONNECTION ESTABLISHED
# FIRST MESSAGE FROM FEATHER
[[:receive_data, "\x81"]]
[[:receive_data, "\xB6"]]
[[:buffer_incomplete, "\x81\xB6"]]
[[:receive_data,
"\xFC\xDE\xEB\xF1\x87\xFC\x85\x90\x91\xBB\xC9\xCB\xDE\xB0\x8E\x9E\x8C\xB7\x93\x94\x90\xFC\xC7\xD3\x8A\xBB\x99\x82\x95\xB1\x85\xD3\xC6\xFC\xDA\xDF\xCC\xFC\xC7\xD3\x99\xA8\x8E\x9F\x88\xFC\xD1\xD3\x9B\xAC\x8E\x94\x88\xB7\x85\x96\xDE\xA3"]]
[[:message_received,
:text,
"{\"name\":\"neopixel\",\"version\":\"1.0\",\"event\":\"greeting\"}"]]
# Works great, no issues unless it gets disconnected...
FAILED RECONNECTION
# HIT RESET BUTTON HERE
[[:sending_frame,
:text,
"{\"sender\":\"socket-server\",\"event\":\"connection_closed\",\"data\":{\"sid\":10,\"ip\":\"129.107.106.30\"}}"]]
# ATTEMPTING TO REOPEN
[[:initialize]]
[[:receive_data, "GET"]]
[[:receive_data, " "]]
[[:receive_data, "/"]]
[[:receive_data, " HTTP/1.1"]]
[[:receive_data, "\r\n"]]
[[:receive_data, "Host: "]]
[[:receive_data, "XXX.XX.XX.XX"]]
[[:receive_data, ":"]]
[[:receive_data, "443"]]
[[:receive_data, "\r\n"]]
[[:receive_data, "User-Agent"]]
[[:receive_data, ": "]]
[[:receive_data, "Arduino/2.2.0"]]
[[:receive_data, "\r\n"]]
[[:receive_data, "Upgrade"]]
[[:receive_data, ": websocket"]]
[[:receive_data, "\r\n"]]
[[:receive_data, "Connection"]]
[[:receive_data, ": "]]
[[:receive_data, "Upgrade"]]
[[:receive_data, "\r\n"]]
[[:receive_data, "Sec-WebSocket-Key"]]
[[:receive_data, ": "]]
[[:receive_data, "0rubjGOZYAJM0YZ/cSboWw=="]]
[[:receive_data, "\r\n"]]
[[:receive_data, "Sec-WebSocket-Version"]]
[[:receive_data, ": "]]
[[:receive_data, "13"]]
[[:receive_data, "\r\n"]]
[[:receive_data, "\r\n"]]
[[:accepting_ws_version, 13]]
[[:upgrade_response,
"HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: QP0lJhfU9wlSy4ZFesYTIVyj/ww=\r\n\r\n"]]
[[:sending_frame,
:text,
"{\"sender\":\"socket-server\",\"event\":\"connection_opened\",\"data\":{\"sid\":12,\"ip\":\"129.XXX.XXX.30\"}}"]]
[[:receive_data, "{"]]
[[:receive_data, "\"n"]]
[[:buffer_incomplete, "{\"n"]]
[[:receive_data, "a"]]
[[:buffer_incomplete, "{\"na"]]
[[:receive_data, "m"]]
[[:buffer_incomplete, "{\"nam"]]
[[:receive_data, "e"]]
[[:buffer_incomplete, "{\"name"]]
[[:receive_data, "\""]]
[[:buffer_incomplete, "{\"name\""]]
[[:receive_data, ":"]]
[[:buffer_incomplete, "{\"name\":"]]
[[:receive_data, "\""]]
[[:buffer_incomplete, "{\"name\":\""]]
[[:receive_data, "n"]]
[[:buffer_incomplete, "{\"name\":\"n"]]
[[:receive_data, "e"]]
[[:buffer_incomplete, "{\"name\":\"ne"]]
[[:receive_data, "o"]]
[[:buffer_incomplete, "{\"name\":\"neo"]]
[[:receive_data, "p"]]
[[:buffer_incomplete, "{\"name\":\"neop"]]
[[:receive_data, "i"]]
[[:buffer_incomplete, "{\"name\":\"neopi"]]
[[:receive_data, "x"]]
[[:buffer_incomplete, "{\"name\":\"neopix"]]
[[:receive_data, "e"]]
[[:buffer_incomplete, "{\"name\":\"neopixe"]]
[[:receive_data, "l\""]]
[[:buffer_incomplete, "{\"name\":\"neopixel\""]]
[[:receive_data, ","]]
[[:buffer_incomplete, "{\"name\":\"neopixel\","]]
[[:receive_data, "\""]]
[[:buffer_incomplete, "{\"name\":\"neopixel\",\""]]
[[:receive_data, "v"]]
[[:buffer_incomplete, "{\"name\":\"neopixel\",\"v"]]
[[:receive_data, "e"]]
[[:buffer_incomplete, "{\"name\":\"neopixel\",\"ve"]]
[[:receive_data, "r"]]
[[:buffer_incomplete, "{\"name\":\"neopixel\",\"ver"]]
[[:receive_data, "s"]]
[[:buffer_incomplete, "{\"name\":\"neopixel\",\"vers"]]
[[:receive_data, "i"]]
[[:buffer_incomplete, "{\"name\":\"neopixel\",\"versi"]]
[[:receive_data, "o"]]
[[:buffer_incomplete, "{\"name\":\"neopixel\",\"versio"]]
[[:receive_data, "n"]]
[[:buffer_incomplete, "{\"name\":\"neopixel\",\"version"]]
[[:receive_data, "\""]]
[[:buffer_incomplete, "{\"name\":\"neopixel\",\"version\""]]
[[:receive_data, ":"]]
[[:buffer_incomplete, "{\"name\":\"neopixel\",\"version\":"]]
[[:receive_data, "\""]]
[[:buffer_incomplete, "{\"name\":\"neopixel\",\"version\":\""]]
[[:receive_data, "1"]]
[[:buffer_incomplete, "{\"name\":\"neopixel\",\"version\":\"1"]]
[[:receive_data, "."]]
[[:buffer_incomplete, "{\"name\":\"neopixel\",\"version\":\"1."]]
[[:receive_data, "0"]]
[[:buffer_incomplete, "{\"name\":\"neopixel\",\"version\":\"1.0"]]
[[:receive_data, "\""]]
[[:buffer_incomplete, "{\"name\":\"neopixel\",\"version\":\"1.0\""]]
[[:receive_data, ","]]
[[:buffer_incomplete, "{\"name\":\"neopixel\",\"version\":\"1.0\","]]
[[:receive_data, "\""]]
[[:error, #<EventMachine::WebSocket::WSProtocolError: Unknown opcode 11>]]
[[:sending_frame, :close, "\x03\xEAUnknown opcode 11"]]
[[:receive_data, "e"]]
[[:unbind, :connection]]
# :(
I have the Feather attempt reconnection in a while loop. I thought my issue might be something associated with timeout/throttling the data from very quick reconnection attempts, but alas it looks like this is not the case.
Thoughts on how to diagnose the issue? I'm eyeing that opcode as the potential culprit, but unsure as to whether to try and suppress it in the server side or figure out why its being placed there on the client side.

Http Read timeouts on query calls to Elastic Search cluster

I'm troubleshooting an issue with our application hosted in K8s pod, which tries to query ES cluster through ES Jest Client. Most of the queries were successful, but randomly a call fails with read timeout. Any help will be appreciated.
Jest Client version:6.3.1
ES cluster is hosted in AWS
Below i'm providing apache http debug logs.
o.a.h.c.protocol.RequestAuthCache - Auth cache not set in the context
o.a.h.i.c.BasicHttpClientConnectionManager - Get connection for route
{}->http://dev-app-elasticsearch-lb.xyz.com:9200
o.a.h.impl.execchain.MainClientExec - Executing request POST
/_search?search_type=dfs_query_then_fetch&preference=_primary_first
HTTP/1.1 o.a.h.impl.execchain.MainClientExec - Target auth state:
UNCHALLENGED o.a.h.impl.execchain.MainClientExec - Proxy auth state:
UNCHALLENGED org.apache.http.headers - http-outgoing-16 >> POST
/_search?search_type=dfs_query_then_fetch&preference=_primary_first
HTTP/1.1 org.apache.http.headers - http-outgoing-16 >>
Content-Length: 2531 org.apache.http.headers - http-outgoing-16 >>
Content-Type: application/json; charset=UTF-8
org.apache.http.headers - http-outgoing-16 >> Host:
dev-app-elasticsearch-lb.xyz.com:9200 org.apache.http.headers -
http-outgoing-16 >> Connection: Keep-Alive org.apache.http.headers -
http-outgoing-16 >> User-Agent: Apache-HttpClient/4.5 (Java/1.8.0_181)
org.apache.http.headers - http-outgoing-16 >> Accept-Encoding:
gzip,deflate org.apache.http.wire - http-outgoing-16 >> "POST
/_search?search_type=dfs_query_then_fetch&preference=_primary_first
HTTP/1.1[\r][\n]" org.apache.http.wire - http-outgoing-16 >>
"Content-Length: 2531[\r][\n]" org.apache.http.wire -
http-outgoing-16 >> "Content-Type: application/json;
charset=UTF-8[\r][\n]" org.apache.http.wire - http-outgoing-16 >>
"Host: dev-app-elasticsearch-lb.xyz.com:9200[\r][\n]"
org.apache.http.wire - http-outgoing-16 >> "Connection:
Keep-Alive[\r][\n]" org.apache.http.wire - http-outgoing-16 >>
"User-Agent: Apache-HttpClient/4.5 (Java/1.8.0_181)[\r][\n]"
org.apache.http.wire - http-outgoing-16 >> "Accept-Encoding:
gzip,deflate[\r][\n]" org.apache.http.wire - http-outgoing-16 >>
"[\r][\n]" org.apache.http.wire - http-outgoing-16 >> "{[\n]"
....<<outgoing query details>>
o.a.h.i.c.PoolingHttpClientConnectionManager - Closing connections
idle longer than 60000 MILLISECONDS
o.a.h.i.c.PoolingHttpClientConnectionManager - Closing connections
idle longer than 60000 MILLISECONDS
o.a.h.i.c.PoolingHttpClientConnectionManager - Closing connections
idle longer than 60000 MILLISECONDS
o.a.h.i.c.PoolingHttpClientConnectionManager - Closing connections
idle longer than 60000 MILLISECONDS
c.t.c.util.concurrent.DatabaseLock - Cleaning up expired locks from DS
0 o.a.h.i.c.BasicHttpClientConnectionManager - Closing connection
o.a.h.i.c.DefaultManagedHttpClientConnection - http-outgoing-6: Close
connection o.a.h.i.n.c.PoolingNHttpClientConnectionManager - Closing
connections idle longer than 15 MINUTES
o.a.h.i.n.c.PoolingNHttpClientConnectionManager - Closing connections
idle longer than 15 MINUTES
o.a.h.i.n.c.PoolingNHttpClientConnectionManager - Closing connections
idle longer than 15 MINUTES```
Any help would be greatly appreciated.
Thanks
Naresh

How to detect if there's any certificates renewed by `certbot renew`?

I want to automatically renew SSL certificates provided by let's encrypt.
Here's my plan:
Use crontab to execute certbot renew everyday.
If there's any certificate renewed by certbot renew, use AWS CLI to upload the certificate to a load balancer. (AWS China doesn't have Certificate Manager yet, that's why I use let's encrypt.)
My problem is that I don't know how to detect if there's any certificate renewed by certbot renew command.
This command returns something like the following:
*** renew ***
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/ooo.com-0001.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert not yet due for renewal
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/xxx.com-0002.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert not yet due for renewal
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The following certs are not due for renewal yet:
/etc/letsencrypt/live/ooo.com-0001/fullchain.pem expires on 2019-12-25 (skipped)
/etc/letsencrypt/live/xxx.com-0002/fullchain.pem expires on 2019-12-25 (skipped)
No renewals were attempted.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
same
I think it would be difficult to parse the string to decide if there's any renewed certificates.

Spring cloud AWS SQS Listener constant sending request

I have Implement annotation-driven-queue-listener using spring cloud AWS API.
<aws-messaging:annotation-driven-queue-listener max-number-of-messages="10" task-executor="messagingTaskExecutor" wait-time-out="20"
visibility-timeout="100" amazon-sqs="sqsClient" region="us-west-1" />
In a Below log file I can see request constantly send to us-east-1 region Though I have provided region us-west-1. Request send Interval is 3 request per second which is too much
amz-sdk-invocation-id:4865f324-322f-53f2-9f4d-f989e106e96c
amz-sdk-retry:0/0/500
**host:sqs.us-east-1.amazonaws.com**
user-agent:aws-sdk-java/1.11.18 Mac_OS_X/10.11.6 Java_HotSpot(TM)_64-Bit_Server_VM/25.111-b14/1.8.0_111 AmazonSQSBufferedAsyncClient/1.11.18
x-amz-date:20170210T030639Z
amz-sdk-invocation-id;amz-sdk-retry;host;user-agent;x-amz-date
937d63370e14d7439a711514a14d0d371c3f6fc73208e1a9d54bd99f194e42a7"
2017-02-10 08:36:39 DEBUG AWS4Signer:33 - AWS4 String to Sign: '"AWS4-HMAC-SHA256
20170210T030639Z
20170210/us-east-1/sqs/aws4_request
07187f106ed69b4b3ad36be48ba53811adc903a39388c5b0a1677ad2af93f38b"
2017-02-10 08:36:39 DEBUG RequestAddCookies:122 - CookieSpec selected: default
2017-02-10 08:36:39 DEBUG RequestAuthCache:76 - Auth cache not set in the context
2017-02-10 08:36:39 DEBUG PoolingHttpClientConnectionManager:249 - Connection request: [route: {s}->https://sqs.us-east-1.amazonaws.com:443][total kept alive: 1; route allocated: 1 of 50; total allocated: 1 of 50]
2017-02-10 08:36:39 DEBUG PoolingHttpClientConnectionManager:282 - Connection leased: [id: 23][route: {s}->https://sqs.us-east-1.amazonaws.com:443][total kept alive: 0; route allocated: 1 of 50; total allocated: 1 of 50]
2017-02-10 08:36:39 DEBUG MainClientExec:207 - Stale connection check
2017-02-10 08:36:39 DEBUG wire:86 - http-outgoing-23 << "[read] I/O error: Read timed out"
2017-02-10 08:36:39 DEBUG DefaultManagedHttpClientConnection:90 - http-outgoing-23: set socket timeout to 50000
2017-02-10 08:36:39 DEBUG MainClientExec:255 - Executing request POST /189178718836/CMR HTTP/1.1
2017-02-10 08:36:39 DEBUG MainClientExec:266 - Proxy auth state: UNCHALLENGED
2017-02-10 08:36:39 DEBUG headers:135 - http-outgoing-23 >> POST /189178718836/CMR HTTP/1.1
2017-02-10 08:36:39 DEBUG headers:138 - http-outgoing-23 >> Host: sqs.us-east-1.amazonaws.com
2017-02-10 08:36:39 DEBUG headers:138 - http-outgoing-23 >> Authorization: AWS4-HMAC-SHA256 Credential=something/20170210/us-east-1/sqs/aws4_request, SignedHeaders=amz-sdk-invocation-id;amz-sdk-retry;host;user-agent;x-amz-date, Signature=0d110d904500fd10a5262c5beea63df72eff28627801d0c00f74d499d4750092
2017-02-10 08:36:39 DEBUG headers:138 - http-outgoing-23 >> X-Amz-Date: 20170210T030639Z
2017-02-10 08:36:39 DEBUG headers:138 - http-outgoing-23 >> User-Agent: aws-sdk-java/1.11.18 Mac_OS_X/10.11.6 Java_HotSpot(TM)_64-Bit_Server_VM/25.111-b14/1.8.0_111 AmazonSQSBufferedAsyncClient/1.11.18
2017-02-10 08:36:39 DEBUG headers:138 - http-outgoing-23 >> amz-sdk-invocation-id: 4865f324-322f-53f2-9f4d-f989e106e96c
2017-02-10 08:36:39 DEBUG headers:138 - http-outgoing-23 >> amz-sdk-retry: 0/0/500
2017-02-10 08:36:39 DEBUG headers:138 - http-outgoing-23 >> Content-Type: application/x-www-form-urlencoded; charset=utf-8
2017-02-10 08:36:39 DEBUG headers:138 - http-outgoing-23 >> Content-Length: 110
2017-02-10 08:36:39 DEBUG headers:138 - http-outgoing-23 >> Connection: Keep-Alive
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "POST /189178718836/CMR HTTP/1.1[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "Host: sqs.us-east-1.amazonaws.com[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "Authorization: AWS4-HMAC-SHA256 Credential=AKIAJRLXVVM5WJ5X7CFA/20170210/us-east-1/sqs/aws4_request, SignedHeaders=amz-sdk-invocation-id;amz-sdk-retry;host;user-agent;x-amz-date, Signature=0d110d904500fd10a5262c5beea63df72eff28627801d0c00f74d499d4750092[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "X-Amz-Date: 20170210T030639Z[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "User-Agent: aws-sdk-java/1.11.18 Mac_OS_X/10.11.6 Java_HotSpot(TM)_64-Bit_Server_VM/25.111-b14/1.8.0_111 AmazonSQSBufferedAsyncClient/1.11.18[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "amz-sdk-invocation-id: 4865f324-322f-53f2-9f4d-f989e106e96c[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "amz-sdk-retry: 0/0/500[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "Content-Type: application/x-www-form-urlencoded; charset=utf-8[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "Content-Length: 110[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "Connection: Keep-Alive[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:86 - http-outgoing-23 >> "Action=ReceiveMessage&Version=2012-11-05&AttributeName.1=All&MessageAttributeName.1=All&MaxNumberOfMessages=10"
can anybody tell me why spring cloud aws api itself constantly sending this request to us-east-1 region?

Parsing of XML fails under Grizzly using JAX-RS on a chunked POST

I have encountered a problem when using Apache HttpClient 4.3.6 to POST XML to Grizzly under Jersey 2.15. I switched to use the Apache HttpClient last night so I could introduce support for chunked POST operations and support for 100-Continue (for reasons I will not get into). The message flow seems to be correct, but when it comes to JAX-RS annotated servlet to be invoked I get the "Content is not allowed in prolog." error on entry. Here is the method signature:
#POST
#Path("/callback")
#Produces({ MediaType.APPLICATION_XML, NsiConstants.NSI_DDS_V1_XML })
#Consumes({ MediaType.APPLICATION_XML, NsiConstants.NSI_DDS_V1_XML })
public Response notification(NotificationListType notify) {
…
}
Before introducing the Apache HttpClient with the chunked POST and 100-continue this worked fine. I changed the input parameter to be of type String and discovered the start of the data stream contains "800\r\n" followed by the complete XML. The "800\r\n" happens to be the first chunk length. There are multiple chunks but only the first chunk length is in the stream. If I manually remove this I can parse the XML without issue, but would rather not have to do this. Can anyone provide guidance?
Here is a debug trace of the initial interaction:
2015-01-27 13:00:51,879 DEBUG (org.apache.http.impl.conn.LoggingManagedHttpClientConnection:124) - http-outgoing-3 >> POST /dds/callback HTTP/1.1
2015-01-27 13:00:51,879 DEBUG (org.apache.http.impl.conn.LoggingManagedHttpClientConnection:127) - http-outgoing-3 >> Accept: application/xml
2015-01-27 13:00:51,879 DEBUG (org.apache.http.impl.conn.LoggingManagedHttpClientConnection:127) - http-outgoing-3 >> Content-Type: application/xml
2015-01-27 13:00:51,879 DEBUG (org.apache.http.impl.conn.LoggingManagedHttpClientConnection:127) - http-outgoing-3 >> User-Agent: Jersey/2.15 (Apache HttpClient 4.3.6)
2015-01-27 13:00:51,880 DEBUG (org.apache.http.impl.conn.LoggingManagedHttpClientConnection:127) - http-outgoing-3 >> Transfer-Encoding: chunked
2015-01-27 13:00:51,880 DEBUG (org.apache.http.impl.conn.LoggingManagedHttpClientConnection:127) - http-outgoing-3 >> Host: localhost:8402
2015-01-27 13:00:51,880 DEBUG (org.apache.http.impl.conn.LoggingManagedHttpClientConnection:127) - http-outgoing-3 >> Connection: Keep-Alive
2015-01-27 13:00:51,880 DEBUG (org.apache.http.impl.conn.LoggingManagedHttpClientConnection:127) - http-outgoing-3 >> Expect: 100-continue
2015-01-27 13:00:51,881 DEBUG (org.apache.http.impl.conn.LoggingManagedHttpClientConnection:127) - http-outgoing-3 >> Accept-Encoding: gzip,deflate
2015-01-27 13:00:51,881 DEBUG (org.apache.http.impl.conn.Wire:72) - http-outgoing-3 >> "POST /dds/callback HTTP/1.1[\r][\n]"
2015-01-27 13:00:51,881 DEBUG (org.apache.http.impl.conn.Wire:72) - http-outgoing-3 >> "Accept: application/xml[\r][\n]"
2015-01-27 13:00:51,881 DEBUG (org.apache.http.impl.conn.Wire:72) - http-outgoing-3 >> "Content-Type: application/xml[\r][\n]"
2015-01-27 13:00:51,882 DEBUG (org.apache.http.impl.conn.Wire:72) - http-outgoing-3 >> "User-Agent: Jersey/2.15 (Apache HttpClient 4.3.6)[\r][\n]"
2015-01-27 13:00:51,882 DEBUG (org.apache.http.impl.conn.Wire:72) - http-outgoing-3 >> "Transfer-Encoding: chunked[\r][\n]"
2015-01-27 13:00:51,882 DEBUG (org.apache.http.impl.conn.Wire:72) - http-outgoing-3 >> "Host: localhost:8402[\r][\n]"
2015-01-27 13:00:51,882 DEBUG (org.apache.http.impl.conn.Wire:72) - http-outgoing-3 >> "Connection: Keep-Alive[\r][\n]"
2015-01-27 13:00:51,883 DEBUG (org.apache.http.impl.conn.Wire:72) - http-outgoing-3 >> "Expect: 100-continue[\r][\n]"
2015-01-27 13:00:51,883 DEBUG (org.apache.http.impl.conn.Wire:72) - http-outgoing-3 >> "Accept-Encoding: gzip,deflate[\r][\n]"
2015-01-27 13:00:51,883 DEBUG (org.apache.http.impl.conn.Wire:72) - http-outgoing-3 >> "[\r][\n]"
2015-01-27 13:00:51,884 DEBUG (org.apache.http.impl.conn.Wire:72) - http-outgoing-3 << "HTTP/1.1 100 Continue[\r][\n]"
2015-01-27 13:00:51,885 DEBUG (org.apache.http.impl.conn.Wire:72) - http-outgoing-3 << "[\r][\n]"
2015-01-27 13:00:51,886 DEBUG (org.apache.http.impl.conn.LoggingManagedHttpClientConnection:113) - http-outgoing-3 << HTTP/1.1 100 Continue
2015-01-27 13:00:51,945 DEBUG (org.apache.http.impl.conn.Wire:72) - http-outgoing-3 >> "800[\r][\n]"
2015-01-27 13:00:51,945 DEBUG (org.apache.http.impl.conn.Wire:72) - http-outgoing-3 >> "<?xml version="1.0" encoding="UTF-8"?>[\n]"
…
2015-01-27 13:00:51,968 DEBUG (org.apache.http.impl.conn.Wire:72) - http-outgoing-3 >> "0[\r][\n]"
2015-01-27 13:00:51,968 DEBUG (org.apache.http.impl.conn.Wire:72) - http-outgoing-3 >> "[\r][\n]"

Resources