Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-6804

FIWARE.Question.Tech.Security.PEP-Proxy.Wilma (FIWARE PEP Proxy) not working

    Details

      Description

      Created question in FIWARE Q/A platform on 20-06-2016 at 11:06
      Please, ANSWER this question AT http://stackoverflow.com/questions/37919366/wilma-fiware-pep-proxy-not-working

      Question:
      Wilma (FIWARE PEP Proxy) not working

      Description:
      I'm using Wilma (FIWARE PEP Proxy) in order to protect a Http-based service (for more details, WebHDFS, the REST API from Hadoop); among the operations available in this service there is an operation for uploading and creating a file.

      Until now, I was working with an outdated version of the proxy, and everything was OK except for the uploading of binary files: the size of the uploaded file became duplicated, and it became not readable at all. This issue was something similar to this other one.

      Thus, I decided to upgrade to the latest. Now, nothing seems to be working:

      $ curl -v -L -X PUT -T myjar.jar "http://myhost:myport/webhdfs/v1/user/myuser/myjar.jar?op=CREATE&user.name=myuser" -H "X-Auth-Token: mytoken" -H "Content-Type: application/octet-stream"

      • Trying x.x.x.x...
      • Connected to myhost (x.x.x.x) port myport (#0)
        > PUT /webhdfs/v1/user/myuser/myjar.jar?op=CREATE&user.name=myuser HTTP/1.1
        > Host: myhost:myport
        > User-Agent: curl/7.43.0
        > Accept: /
        > X-Auth-Token: mytoken
        > Content-Type: application/octet-stream
        > Content-Length: 2566043
        > Expect: 100-continue
        >
        < HTTP/1.1 100 Continue
      • We are completely uploaded and fine
        < HTTP/1.1 500 Internal Server Error
        < X-Powered-By: Express
        < Access-Control-Allow-Origin: *
        < Access-Control-Allow-Methods: HEAD, POST, PUT, GET, OPTIONS, DELETE
        < Access-Control-Allow-Headers: origin, content-type, X-Auth-Token, Tenant-ID, Authorization
        < Content-Type: text/html; charset=utf-8
        < Content-Length: 136
        < ETag: W/"88-CqbD7g/NZPRqVjwFn9UJrA"
        < Date: Mon, 20 Jun 2016 07:43:14 GMT
        < Connection: keep-alive
        <
        {"RemoteException":
        Unknown macro: {"message"}

        }

      • Connection #0 to host myhost left intact

      I've added log traces to the code, and it sees the problem is in lib/HTTPClient.js, at the moment of running the code within xhr.onreadystatechange:

      2016-06-20 09:42:54.543 - ERROR: HTTP-Client - Sending PUT to: http://0.0.0.0:myredirectedport/webhdfs/v1/user/myuser/myjar.jar?op=CREATE&amp;user.name=myuser
      2016-06-20 09:42:54.543 - ERROR: HTTP-Client - Headers: { host: 'myhost:myport',
      'user-agent': 'curl/7.43.0',
      accept: '/',
      'x-auth-token': 'mytoken',
      'content-type': 'application/octet-stream',
      'content-length': '2566043',
      expect: '100-continue',
      'X-Nick-Name': 'myuser',
      'X-Display-Name': 'myuser',
      'X-Roles': '[

      {"name":"provider","id":"000"}

      ]',
      'X-Organizations': '[]',
      'x-forwarded-for': 'y.y.y.y' }
      2016-06-20 09:42:54.543 - ERROR: HTTP-Client - Body: <Buffer 50 4b 03 04 0a 00 08 08 08 00 5c 81 ce 48 b5 cd e3 30 5a 00 00 00 66 00 00 00 14 00 00 00 4d 45 54 41 2d 49 4e 46 2f 4d 41 4e 49 46 45 53 54 2e 4d 46 f3 ...>
      2016-06-20 09:42:54.543 - ERROR: HTTP-Client - Sendind data
      2016-06-20 09:43:14.702 - ERROR: HTTP-Client - Callback error
      2016-06-20 09:43:14.702 - ERROR: HTTP-Client - Error: 500 {"RemoteException":{"message":"Read timed out","exception":"SocketTimeoutException","javaClassName":"java.net.SocketTimeoutException"}}

      Any hints? Thanks!

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2016-06-20 12:05|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2016-06-20 12:05|CREATED monitor | # answers= 0, accepted answer= False

          People

          • Assignee:
            aalonsog Alvaro Alonso
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: