Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pleroma pleroma
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 646
    • Issues 646
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 88
    • Merge requests 88
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PleromaPleroma
  • pleromapleroma
  • Issues
  • #212
Closed
Open
Issue created Jun 13, 2018 by ken restivo@kenrestivo

webfinger calls cause 500 error and stacktrace

OK....

curl -i https://hub.spaz.org/.well-known/nodeinfo
HTTP/1.1 200 OK
Server: nginx/1.14.0 (Ubuntu)
Date: Wed, 13 Jun 2018 05:58:06 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 117
Connection: keep-alive
Vary: Accept-Encoding
cache-control: max-age=0, private, must-revalidate
x-request-id: 2krq5ck2jb5dvlp7180001ih
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, PUT, DELETE, GET, PATCH, OPTIONS
Access-Control-Allow-Headers: Authorization, Content-Type, Idempotency-Key
Access-Control-Expose-Headers: Link, X-RateLimit-Reset, X-RateLimit-Limit, X-RateLimit-Remaining, X-Request-Id
X-XSS-Protection: 1; mode=block
X-Permitted-Cross-Domain-Policies: none
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin
X-Download-Options: noopen
{"links":[{"href":"https://hub.spaz.org/nodeinfo/2.0.json","rel":"http://nodeinfo.diaspora.software/ns/schema/2.0"}]}

OK...

curl -i https://hub.spaz.org/nodeinfo/2.0.json
HTTP/1.1 200 OK
Server: nginx/1.14.0 (Ubuntu)
Date: Wed, 13 Jun 2018 06:04:11 GMT
Content-Type: application/json; profile=http://nodeinfo.diaspora.software/ns/schema/2.0#; charset=utf-8
Content-Length: 297
Connection: keep-alive
cache-control: max-age=0, private, must-revalidate
x-request-id: 2krq61tble3o88tc9c0002bh
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, PUT, DELETE, GET, PATCH, OPTIONS
Access-Control-Allow-Headers: Authorization, Content-Type, Idempotency-Key
Access-Control-Expose-Headers: Link, X-RateLimit-Reset, X-RateLimit-Limit, X-RateLimit-Remaining, X-Request-Id
X-XSS-Protection: 1; mode=block
X-Permitted-Cross-Domain-Policies: none
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin
X-Download-Options: noopen
{"metadata":{"nodeName":"spazloma"},"openRegistrations":true,"protocols":["ostatus","activitypub"],"services":{"inbound":[],"outbound":[]},"software":{"name":"pleroma","version":"Pleroma 0.9.0 ddc654d587eb74922f4c097088872edd9f337aa0"},"usage":{"localPosts":7,"users":{"total":2}},"version":"2.0"}

OK...

curl -i https://hub.spaz.org/.well-known/host-meta
HTTP/1.1 200 OK
Server: nginx/1.14.0 (Ubuntu)
Date: Wed, 13 Jun 2018 05:45:34 GMT
Content-Type: application/xrd+xml; charset=utf-8
Content-Length: 214
Connection: keep-alive
cache-control: max-age=0, private, must-revalidate
x-request-id: 2krq40rt721rtpl1jo005pkh
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, PUT, DELETE, GET, PATCH, OPTIONS
Access-Control-Allow-Headers: Authorization, Content-Type, Idempotency-Key
Access-Control-Expose-Headers: Link, X-RateLimit-Reset, X-RateLimit-Limit, X-RateLimit-Remaining, X-Request-Id
X-XSS-Protection: 1; mode=block
X-Permitted-Cross-Domain-Policies: none
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin
X-Download-Options: noopen
<?xml version="1.0" encoding="UTF-8"?><XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0"><Link rel="lrdd" template="https://hub.spaz.org/.well-known/webfinger?resource={uri}" type="application/xrd+xml" /></XRD>

KABOOM!

HTTP/1.1 500 Internal Server Error
Server: nginx/1.14.0 (Ubuntu)
Date: Wed, 13 Jun 2018 05:42:45 GMT
Content-Length: 0
Connection: keep-alive
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, PUT, DELETE, GET, PATCH, OPTIONS
Access-Control-Allow-Headers: Authorization, Content-Type, Idempotency-Key
Access-Control-Expose-Headers: Link, X-RateLimit-Reset, X-RateLimit-Limit, X-RateLimit-Remaining, X-Request-Id

Example stacktrace logs here:

Jun 13 05:43:57 spazlab mix[20016]: Server: hub.spaz.org:80 (http)
Jun 13 05:43:57 spazlab mix[20016]: Request: GET /.well-known/webfinger?resource=acct%3Amutantfest%40hub.spaz.org
Jun 13 05:43:57 spazlab mix[20016]: ** (exit) an exception was raised:
Jun 13 05:43:57 spazlab mix[20016]:     ** (FunctionClauseError) no function clause matching in Plug.Conn.resp/3       Jun 13 05:43:57 spazlab mix[20016]:         (plug) lib/plug/conn.ex:546: Plug.Conn.resp(%Plug.Conn{adapter: {Plug.Adapters.Cowboy.Conn, :...}, assigns: %{kind: :error, layout: false, reason: %UndefinedFunctionError{arity: 0, exports: nil, function: :info, module: nil, reason: nil}, stack: [{nil, :info, [], []}, {Pleroma.Web.WebFinger, :ensure_keys_present, 1, [file: 'lib/pleroma/web/web_finger/web_finger.ex', line: 134]}, {Pleroma.Web.WebFinger, :represent_user, 2, [file: 'lib/pleroma/web/web_finger/web_finger.ex', line: 103]}, {Pleroma.Web.WebFinger, :webfinger, 2, [file: 'lib/pleroma/web/web_finger/web_finger.ex', line: 52]}, {Pleroma.Web.WebFinger.WebFingerController, :webfinger, 2, [file: 'lib/pleroma/web/web_finger/web_finger_controller.ex', line: 17]}, {Pleroma.Web.WebFinger.WebFingerController, :action, 2, [file: 'lib/pleroma/web/web_finger/web_finger_controller.ex', line: 1]}, {Pleroma.Web.WebFinger.WebFingerController, :phoenix_controller_pipeline, 2, [file: 'lib/pleroma/web/web_finger/web_finger_controller.ex', line: 1]}, {Pleroma.Web.Endpoint, :instrument, 4, [file: 'lib/pleroma/web/endpoint.ex', line: 1]}]}, before_send: [#Function<1.25128794/1 in Plug.Logger.call/2>], body_params: %{}, cookies: %Plug.Conn.Unfetched{aspect: :cookies}, halted: false, host: "hub.spaz.org", method: "GET", owner: #PID<0.11625.1>, params: %{"resource" => "acct:mutantfest@hub.spaz.org"}, path_info: [".well-known", "webfinger"], path_params: %{}, peer: {{127, 0, 0, 1}, 39567}, port: 80, private: %{Pleroma.Web.Router => {[], %{}}, :phoenix_action => :webfinger, :phoenix_controller => Pleroma.Web.WebFinger.WebFingerController, :phoenix_endpoint => Pleroma.Web.Endpoint, :phoenix_format => "xrd+xml", :phoenix_layout => false, :phoenix_pipelines => [:well_known], :phoenix_router => Pleroma.Web.Router, :phoenix_template => "500.xrd+xml", :phoenix_view => Pleroma.Web.ErrorView, :plug_session_fetch => #Function<1.45862765/1 in Plug.Session.fetch_session/1>}, query_params: %{"resource" => "acct:mutantfest@hub.spaz.org"}, query_string: "resource=acct%3Amutantfest%40hub.spaz.org", remote_ip: {127, 0, 0, 1}, req_cookies: %Plug.Conn.Unfetched{aspect: :cookies}, req_headers: [{"connection", "upgrade"}, {"host", "hub.spaz.org"}, {"user-agent", "Friendica 'The Tazmans Flax-lily' 3.6-1256; https://friendica.tttproject.de"}, {"accept-encoding", "deflate, gzip"}, {"accept", "application/xrd+xml"}], request_path: "/.well-known/webfinger", resp_body: nil, resp_cookies: %{}, resp_headers: [{"content-type", "application/xrd+xml; charset=utf-8"}, {"cache-control", "max-age=0, private, must-revalidate"}, {"x-request-id", "2krq3r6t5ru5hcrrao005ovh"}], scheme: :http, script_name: [], secret_key_base: "vOqgRWGYHH6srsQYEsj4Iu7/B0Ex+20U9Y36WiuO/y7S0+NCC8LR3xm9BRH9VG9e", state: :unset, status: 500}, 500, %{errors: %{detail: "Internal server error"}})
Jun 13 05:43:57 spazlab mix[20016]:         (plug) lib/plug/conn.ex:536: Plug.Conn.send_resp/3
Jun 13 05:43:57 spazlab mix[20016]:         (phoenix) lib/phoenix/endpoint/render_errors.ex:60: Phoenix.Endpoint.RenderErrors.__catch__/5
Jun 13 05:43:57 spazlab mix[20016]:         (plug) lib/plug/adapters/cowboy/handler.ex:16: Plug.Adapters.Cowboy.Handler.upgrade/4
Jun 13 05:43:57 spazlab mix[20016]:         (cowboy) /home/pleroma/pleroma/deps/cowboy/src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4



5:54:21.576 request_id=2krq4vhs8i3kg0f44o00029h [info] GET /.well-known/webfinger
05:54:21.591 [error] #PID<0.530.0> running Pleroma.Web.Endpoint (cowboy_protocol) terminated
Server: hub.spaz.org:80 (http)
Request: GET /.well-known/webfinger?resource=acct%3Amanicshamanic%40hub.spaz.org
** (exit) an exception was raised:
    ** (FunctionClauseError) no function clause matching in Plug.Conn.resp/3
        (plug) lib/plug/conn.ex:546: Plug.Conn.resp(%Plug.Conn{adapter: {Plug.Adapters.Cowboy.Conn, :...}, assigns: %{kind: :error, layout: false, reason: %UndefinedFunctionError{arity: 0, exports: nil, function: :info, module: nil, reason: nil}, stack: [{nil, :info, [], []}, {Pleroma.Web.WebFinger, :ensure_keys_present, 1, [file: 'lib/pleroma/web/web_finger/web_finger.ex', line: 134]}, {Pleroma.Web.WebFinger, :represent_user, 2, [file: 'lib/pleroma/web/web_finger/web_finger.ex', line: 103]}, {Pleroma.Web.WebFinger, :webfinger, 2, [file: 'lib/pleroma/web/web_finger/web_finger.ex', line: 52]}, {Pleroma.Web.WebFinger.WebFingerController, :webfinger, 2, [file: 'lib/pleroma/web/web_finger/web_finger_controller.ex', line: 17]}, {Pleroma.Web.WebFinger.WebFingerController, :action, 2, [file: 'lib/pleroma/web/web_finger/web_finger_controller.ex', line: 1]}, {Pleroma.Web.WebFinger.WebFingerController, :phoenix_controller_pipeline, 2, [file: 'lib/pleroma/web/web_finger/web_finger_controller.ex', line: 1]}, {Pleroma.Web.Endpoint, :instrument, 4, [file: 'lib/pleroma/web/endpoint.ex', line: 1]}]}, before_send: [#Function<1.25128794/1 in Plug.Logger.call/2>], body_params: %{}, cookies: %Plug.Conn.Unfetched{aspect: :cookies}, halted: false, host: "hub.spaz.org", method: "GET", owner: #PID<0.530.0>, params: %{"resource" => "acct:manicshamanic@hub.spaz.org"}, path_info: [".well-known", "webfinger"], path_params: %{}, peer: {{127, 0, 0, 1}, 39707}, port: 80, private: %{Pleroma.Web.Router => {[], %{}}, :phoenix_action => :webfinger, :phoenix_controller => Pleroma.Web.WebFinger.WebFingerController, :phoenix_endpoint => Pleroma.Web.Endpoint, :phoenix_format => "xrd+xml", :phoenix_layout => false, :phoenix_pipelines => [:well_known], :phoenix_router => Pleroma.Web.Router, :phoenix_template => "500.xrd+xml", :phoenix_view => Pleroma.Web.ErrorView, :plug_session_fetch => #Function<1.45862765/1 in Plug.Session.fetch_session/1>}, query_params: %{"resource" => "acct:manicshamanic@hub.spaz.org"}, query_string: "resource=acct%3Amanicshamanic%40hub.spaz.org", remote_ip: {127, 0, 0, 1}, req_cookies: %Plug.Conn.Unfetched{aspect: :cookies}, req_headers: [{"connection", "upgrade"}, {"host", "hub.spaz.org"}, {"user-agent", "Friendica 'The Tazmans Flax-lily' 3.6-1256; https://friendica.tttproject.de"}, {"accept-encoding", "deflate, gzip"}, {"accept", "application/xrd+xml"}], request_path: "/.well-known/webfinger", resp_body: nil, resp_cookies: %{}, resp_headers: [{"content-type", "application/xrd+xml; charset=utf-8"}, {"cache-control", "max-age=0, private, must-revalidate"}, {"x-request-id", "2krq4vhs8i3kg0f44o00029h"}], scheme: :http, script_name: [], secret_key_base: "vOqgRWGYHH6srsQYEsj4Iu7/B0Ex+20U9Y36WiuO/y7S0+NCC8LR3xm9BRH9VG9e", state: :unset, status: 500}, 500, %{errors: %{detail: "Internal server error"}})
        (plug) lib/plug/conn.ex:536: Plug.Conn.send_resp/3
        (phoenix) lib/phoenix/endpoint/render_errors.ex:60: Phoenix.Endpoint.RenderErrors.__catch__/5
        (plug) lib/plug/adapters/cowboy/handler.ex:16: Plug.Adapters.Cowboy.Handler.upgrade/4
        (cowboy) /home/pleroma/pleroma/deps/cowboy/src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4

This running latest develop branch code.

Assignee
Assign to
Time tracking