Uploaded image for project: 'Project FiFo'
  1. FIFO-638

Add dataset from IMGAPI Server failed with 500 Error

    Details

    • Type: Bug
    • Status: Closed (View workflow)
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 0.6.1
    • Fix Version/s: 0.7.0
    • Component/s: None
    • Labels:
    • Environment:

      Description

      If I add one dataset from one of my IMGAPI servers the API return 500 Internal Server Error. The IMGAPI Server is the official server developed by Joyent.

      Using curl with the following command:

      curl -v -X POST -d '{"url": "https://imgapi.smartos.skylime.net/images/a4103f7d-118e-4830-ba69-66ab6a040de3"}' https://example.com/api/0.1.0/datasets -H 'X-Snarl-Token:XXXX' -H 'Content-Type: application/json' -H 'Accept: application/json'
      

      Header / Return:

      > POST /api/0.1.0/datasets HTTP/1.1
      > User-Agent: curl/7.41.0
      > Host: example.com
      > X-Snarl-Token:XXXX
      > Content-Type: application/json
      > Accept: application/json
      > Content-Length: 89
      > 
      * upload completely sent off: 89 out of 89 bytes
      * SSLv2, Unknown (23):
      < HTTP/1.1 500 Internal Server Error
      < Server: nginx/1.6.0
      < Date: Tue, 30 Jun 2015 06:17:27 GMT
      < Content-Type: application/json
      < Content-Length: 0
      < Connection: keep-alive
      < x-snarl-token: XXXX
      < access-control-allow-origin: *
      < access-control-allow-headers: Authorization, content-type, x-snarl-token, x-full-list, x-full-list-fields
      < access-control-expose-headers: x-snarl-token, x-full-list, x-full-list-fields
      < access-control-allow-credentials: true
      < vary: accept
      

      The following information shows the crash.log from wiggle:

      2015-06-30 07:29:20 =ERROR REPORT====
      Error in process <0.23983.3> on node 'wiggle@10.0.42.253' with exit value: {[{reason,{badmatch,{error,{{badmatch,undefined},[{sniffle_dataset_download_fsm,get_manifest,2,[{file,"src/sniffle_dataset_download_fsm.erl"},{line,117}]},{gen_fsm,handle_msg,7,[{file,"gen_fsm.erl"},{line,505}]},{proc_lib... 
      
      2015-06-30 07:29:20 =ERROR REPORT====
      Ranch listener http had connection process started with cowboy_protocol:start_link/4 at <0.23983.3> exit with reason: {[{reason,{badmatch,{error,{{badmatch,undefined},[{sniffle_dataset_download_fsm,get_manifest,2,[{file,"src/sniffle_dataset_download_fsm.erl"},{line,117}]},{gen_fsm,handle_msg,7,[{file,"gen_fsm.erl"},{line,505}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}}}},{mfa,{wiggle_rest_handler,write,2}},{stacktrace,[{wiggle_dataset_handler,create,3,[{file,"src/wiggle_dataset_handler.erl"},{line,197}]},{wiggle_rest_handler,write,2,[{file,"src/wiggle_rest_handler.erl"},{line,233}]},{cowboy_rest,call,3,[{file,"src/cowboy_rest.erl"},{line,972}]},{cowboy_rest,process_content_type,3,[{file,"src/cowboy_rest.erl"},{line,773}]},{cowboy_protocol,execute,4,[{file,"src/cowboy_protocol.erl"},{line,435}]}]},{req,[{socket,#Port<0.27520>},{transport,ranch_tcp},{connection,keepalive},{pid,<0.23983.3>},{method,<<"POST">>},{version,'HTTP/1.1'},{peer,{{127,0,0,1},47650}},{host,<<"api">>},{host_info,undefined},{port,80},{path,<<"/api/0.1.0/datasets">>},{path_info,[]},{qs,<<>>},{qs_vals,undefined},{bindings,[{version,<<"0.1.0">>}]},{headers,[{<<"host">>,<<"api">>},{<<"content-length">>,<<"89">>},{<<"user-agent">>,<<"curl/7.41.0">>},{<<"x-snarl-token">>,<<"XXXXX">>},{<<"content-type">>,<<"application/json">>},{<<"accept">>,<<"application/json">>}]},{p_headers,[{<<"content-type">>,{<<"application">>,<<"json">>,[]}},{<<"if-modified-since">>,undefined},{<<"if-none-match">>,undefined},{<<"if-unmodified-since">>,undefined},{<<"if-match">>,undefined},{<<"accept">>,[{{<<"application">>,<<"json">>,[]},1000,[]}]}]},{cookies,undefined},{meta,[{media_type,{<<"application">>,<<"json">>,[]}},{charset,undefined}]},{body_state,waiting},{buffer,<<"{\"url\": \"https://imgapi.smartos.skylime.net/images/a4103f7d-118e-4830-ba69-66ab6a040de3\"}">>},{multipart,undefined},{resp_compress,true},{resp_state,waiting},{resp_headers,[{<<"vary">>,[<<"accept">>]},{<<"content-type">>,[<<"application">>,<<"/">>,<<"json">>,<<>>]},{<<"access-control-allow-credentials">>,<<"true">>},{<<"access-control-expose-headers">>,<<"x-snarl-token, x-full-list, x-full-list-fields">>},{<<"access-control-allow-headers">>,<<"Authorization, content-type, x-snarl-token, x-full-list, x-full-list-fields">>},{<<"access-control-allow-origin">>,<<"*">>},{<<"x-snarl-token">>,<<"XXXXX">>}]},{resp_body,<<>>},{onresponse,undefined}]},{state,{state,wiggle_dataset_handler,[],<<"POST">>,<<"0.1.0">>,{token,<<"XXXXX">>},undefined,undefined,undefined,undefined,{1435,649360,61916},<<"/api/0.1.0/datasets">>,undefined,false,[]}}],[{cowboy_rest,process_content_type,3,[{file,"src/cowboy_rest.erl"},{line,773}]},{cowboy_protocol,execute,4,[{file,"src/cowboy_protocol.erl"},{line,435}]}]}
      

        Attachments

          Activity

            People

            • Assignee:
              heinz Heinz N. Gies
              Reporter:
              drscream Thomas
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: