JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Use Agile By Default
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile Access more options (Alt+g)
  • Create Issue
  • Mule
  • MULE-2728

Add remote client address to message properties

  • Agile Board
  • More Actions
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.4.4
  • Fix Version/s: 1.4.4
  • Component/s: Transport: HTTP(S) / Jetty, Transport: TCP / UDP / SSL / Multicast
  • Labels:
    None
  • Environment:

    All.

  • User impact:
    Low
  • Similar Issues:
    None

Description

Currently, when an exception is raised when processing a message from an http client, information accompanying the exception stacktrace does not include the address of the client. This complicates troubleshooting. A patch similar to that mentioned at http://mule.mulesource.org/display/MULE/mail/5571095 should solve this problem. The mail concerned talks about patching the tcp implementation in Mule.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. File
    HttpMessageReceiver.java.diff
    26/Nov/07 12:56 AM
    2 kB
    Hann Wei Toh

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Transitions
  • Commits
  • Source
  • Builds
Hide
Permalink
Hann Wei Toh added a comment - 26/Nov/07 12:56 AM

A patch for org.mule.providers.http.HttpMessageReceiver is attached. It adds the instance variable remoteClientAddress. The value comes from socket.getRemoteSocketAddress ().toString (). After a MuleMessage is instantiated, and before routeMessage() is invoked, the remote client address is stored as the property named MULE_REMOTE_CLIENT_ADDRESS of the MuleMessage.

This allows us to see the http client address in an exception stacktrace, for example:

jvm 1 | at org.mule.providers.http.HttpMessageReceiver$HttpWorker.processRequest(HttpMessageReceiver.java:187)
jvm 1 | at org.mule.providers.http.HttpMessageReceiver$HttpWorker.run(HttpMessageReceiver.java:155)
jvm 1 | at org.mule.impl.work.WorkerContext.run(WorkerContext.java:310)
jvm 1 | at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:9
87)
jvm 1 | at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:
528)
jvm 1 | at java.lang.Thread.run(Unknown Source)
jvm 1 |
jvm 1 | ********************************************************************************
jvm 1 |
jvm 1 | 14:18:30,587 ERROR oadExceptionStrategy [eiver.2]: Message being processed is: org.mule.providers.http.HttpMe
ssageAdapter/org.mule.providers.http.HttpMessageAdapter@6a435f{id=685f29ed-9be7-11dc-b791-95c48a029aff, payload=[B, corr
elationId=null, correlationGroup=-1, correlationSeq=-1, encoding=UTF-8, exceptionPayload=null, properties={
jvm 1 | MULE_REMOTE_SYNC=true
jvm 1 | http.version=HTTP/1.1
jvm 1 | Authorization=Basic YW5vbjphbm9ucGFzc3dk
jvm 1 | User-Agent=curl/7.16.3 (i686-pc-cygwin) libcurl/7.16.3 OpenSSL/0.9.8e zlib/1.2.3 libssh2/0.15-CVS
jvm 1 | MULE_REMOTE_CLIENT_ADDRESS=/127.0.0.1:4459
jvm 1 | Accept=/
jvm 1 | MULE_ORIGINATING_ENDPOINT=OperationTypeCheckerSyncEndpoint
jvm 1 | Content-Length=38
jvm 1 | Content-Type=application/x-www-form-urlencoded
jvm 1 | http.method=POST
jvm 1 | http.request=/OperationTypeChecker
jvm 1 | Host=localhost:7000
jvm 1 | }}

Show
Hann Wei Toh added a comment - 26/Nov/07 12:56 AM A patch for org.mule.providers.http.HttpMessageReceiver is attached. It adds the instance variable remoteClientAddress. The value comes from socket.getRemoteSocketAddress ().toString (). After a MuleMessage is instantiated, and before routeMessage() is invoked, the remote client address is stored as the property named MULE_REMOTE_CLIENT_ADDRESS of the MuleMessage. This allows us to see the http client address in an exception stacktrace, for example: jvm 1 | at org.mule.providers.http.HttpMessageReceiver$HttpWorker.processRequest(HttpMessageReceiver.java:187) jvm 1 | at org.mule.providers.http.HttpMessageReceiver$HttpWorker.run(HttpMessageReceiver.java:155) jvm 1 | at org.mule.impl.work.WorkerContext.run(WorkerContext.java:310) jvm 1 | at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:9 87) jvm 1 | at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java: 528) jvm 1 | at java.lang.Thread.run(Unknown Source) jvm 1 | jvm 1 | ******************************************************************************** jvm 1 | jvm 1 | 14:18:30,587 ERROR oadExceptionStrategy [eiver.2]: Message being processed is: org.mule.providers.http.HttpMe ssageAdapter/org.mule.providers.http.HttpMessageAdapter@6a435f{id=685f29ed-9be7-11dc-b791-95c48a029aff, payload=[B, corr elationId=null, correlationGroup=-1, correlationSeq=-1, encoding=UTF-8, exceptionPayload=null, properties={ jvm 1 | MULE_REMOTE_SYNC=true jvm 1 | http.version=HTTP/1.1 jvm 1 | Authorization=Basic YW5vbjphbm9ucGFzc3dk jvm 1 | User-Agent=curl/7.16.3 (i686-pc-cygwin) libcurl/7.16.3 OpenSSL/0.9.8e zlib/1.2.3 libssh2/0.15-CVS jvm 1 | MULE_REMOTE_CLIENT_ADDRESS=/127.0.0.1:4459 jvm 1 | Accept=/ jvm 1 | MULE_ORIGINATING_ENDPOINT=OperationTypeCheckerSyncEndpoint jvm 1 | Content-Length=38 jvm 1 | Content-Type=application/x-www-form-urlencoded jvm 1 | http.method=POST jvm 1 | http.request=/OperationTypeChecker jvm 1 | Host=localhost:7000 jvm 1 | }}
Hann Wei Toh made changes - 26/Nov/07 12:56 AM
Field Original Value New Value
Attachment HttpMessageReceiver.java.diff [ 11215 ]
Andrew Perepelytsya made changes - 28/Nov/07 12:59 PM
Summary Add remote http client address to message properties Add remote client address to message properties
Fix Version/s 1.4.4 [ 10330 ]
Priority To be reviewed [ 6 ] Minor [ 4 ]
Assignee Andrew Perepelytsya [ andrew ]
Labels
Component/s Transport: TCP / UDP / SSL / Multicast [ 10061 ]
Hide
Permalink
Andrew Perepelytsya added a comment - 28/Nov/07 01:10 PM

http://fisheye.codehaus.org/changelog/mule/?cs=9936
http://fisheye.codehaus.org/changelog/mule/?cs=9937

Thanks for the patch. I've reworked it to better fit the existing API, as well as applied it to TCP/SSL/HTTPS/Multicast transports.

Show
Andrew Perepelytsya added a comment - 28/Nov/07 01:10 PM http://fisheye.codehaus.org/changelog/mule/?cs=9936 http://fisheye.codehaus.org/changelog/mule/?cs=9937 Thanks for the patch. I've reworked it to better fit the existing API, as well as applied it to TCP/SSL/HTTPS/Multicast transports.
Andrew Perepelytsya made changes - 28/Nov/07 01:10 PM
Status Open [ 1 ] Closed [ 6 ]
Labels
Resolution Fixed [ 1 ]
aperepel@gmail.com
30/Nov/07 01:45 PM
View full commit
Merged revisions 9711-9712,9715-9716,9719-9725,9727,9730-9733,9735-9761,9763-9772,9774-9775,9778-9784,9787-9788,9790,9792-9798,9800-9808,9810-9812,9814-9817,9819-9821,9824-9885,9887-9903,9905-9915,9917-9949 via svnmerge from https://svn.codehaus.org/mule/trunk/mule ........ r9711 | aperepel | 2007-11-13 15:21:03 -0500 (Tue, 13 Nov 2007) | 1 line Change the toString() to output <n/a> to better differentiate from a case when the whole UMO transaction is null. Helps debugging readability. ........ r9917 | aperepel | 2007-11-27 19:05:51 -0500 (Tue, 27 Nov 2007) | 1 line MULE-2750 FileMessageReceiver shouldn't process directories ........ r9936 | aperepel | 2007-11-28 14:05:33 -0500 (Wed, 28 Nov 2007) | 1 line MULE-2728 Add remote client address to message properties ........ r9937 | aperepel | 2007-11-28 14:10:16 -0500 (Wed, 28 Nov 2007) | 1 line MULE-2728 Add remote client address to message properties ........ r9949 | aperepel | 2007-11-29 16:56:42 -0500 (Thu, 29 Nov 2007) | 1 line Fix a warning about Null property value for UDP ........ git-svn-id: https://svn.codehaus.org/mule/branches/mule-2.x@9956 bf997673-6b11-0410-b953-e057580c5b09
mule-2.2.x
+1
-
core/src/main/java/org/mule/config/MuleProperties.java
+1
-1
core/src/main/java/org/mule/transaction/XaTransaction.java
+5
-1
transports/file/src/main/java/org/mule/providers/file/FileMessageReceiver.java
+23
-19
transports/http/src/main/java/org/mule/providers/http/HttpMessageReceiver.java
+2
-
transports/http/src/main/java/org/mule/providers/http/HttpsMessageReceiver.java
... 3 more files not shown
Andrew Perepelytsya made changes - 06/May/08 11:11 AM
Workflow Copy of Main Mule Workflow [ 37610 ] Fixed Main Mule Workflow (after JIRA upgrade) [ 62140 ]
Andrew Perepelytsya made changes - 15/May/08 10:18 AM
Workflow Fixed Main Mule Workflow (after JIRA upgrade) [ 62140 ] Copy of Main Mule Workflow [ 65922 ]
Andrew Perepelytsya made changes - 15/May/08 10:54 AM
Workflow Copy of Main Mule Workflow [ 65922 ] Fixed Main Mule Workflow (after JIRA upgrade) [ 69601 ]
Transition Time In Source Status Execution Times Last Executer Last Execution Date
Open Open Closed Closed
2d 12h 25m 1 Andrew Perepelytsya 28/Nov/07 01:10 PM
This list may be incomplete, as errors occurred whilst retrieving source from linked applications:
  • Repository mule on http://foo.bar/ failed: Error in remote call to 'FishEye 0 (http://foo.bar/)' (http://foo.bar) [AbstractRestCommand{path='/rest-service-fe/changeset-v1/listChangesets/', params={expand=changesets[-21:-1].revisions[0:29], comment=MULE-2728, p4JobFixed=MULE-2728, rep=mule}, methodType=GET}] : java.net.UnknownHostException: foo.bar

People

  • Assignee:
    Andrew Perepelytsya
    Reporter:
    Hann Wei Toh
Vote (0)
Watch (1)

Dates

  • Created:
    26/Nov/07 12:45 AM
    Updated:
    28/Nov/07 01:10 PM
    Resolved:
    28/Nov/07 01:10 PM

Time Tracking

Estimated:
1d
Original Estimate - 1 day
Remaining:
1d
Remaining Estimate - 1 day
Logged:
Not Specified
Time Spent - Not Specified

Agile

  • View on Board
  • Atlassian JIRA (v5.0.7#734-sha1:8ad78a6)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for MuleForge. Try JIRA - bug tracking software for your team.