Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example code, produces Internal Server Error on OSX #3

Open
svetlyak40wt opened this issue Apr 6, 2019 · 2 comments
Open

Example code, produces Internal Server Error on OSX #3

svetlyak40wt opened this issue Apr 6, 2019 · 2 comments

Comments

@svetlyak40wt
Copy link
Contributor

When I started the server like this: (prometheus.example:run :exposer-host "localhost")

I receive following error:

curl localhost:9101/metrics
<html><head><title>500 Internal Server Error</title></head><body><h1>Internal Server Error</h1>An error has occurred<p><hr><address><a href='http://weitz.de/hunchentoot/'>Hunchentoot 1.2.38</a> <a href='http://www.sbcl.org/'>(SBCL 1.4.16)</a> at localhost:9101</address></p></body></html>
@svetlyak40wt
Copy link
Contributor Author

I found that most probably, the 500 error is caused by this error:

Error opening #P"/proc/self/limits": No such file or directory
   [Condition of type SB-EXT:FILE-DOES-NOT-EXIST]

Restarts:
 0: [CREATE] Reopen with :if-does-not-exist :create
 1: [CONTINUE] Retry opening.
 2: [USE-VALUE] Try opening a different file.
 3: [RETRY] Retry SLY mREPL evaluation request.
 4: [*ABORT] Return to SLY's top level.
 5: [ABORT] abort thread (#<THREAD "sly-channel-1-mrepl-remote-1" RUNNING {1003D34643}>)

Backtrace:
 0: ((FLET SB-IMPL::VANILLA-OPEN-ERROR :IN OPEN) SB-EXT:FILE-DOES-NOT-EXIST)
 1: (OPEN "/proc/self/limits" :DIRECTION :INPUT :ELEMENT-TYPE BASE-CHAR :IF-EXISTS NIL :IF-DOES-NOT-EXIST NIL :EXTERNAL-FORMAT :DEFAULT :CLASS SB-SYS:FD-STREAM)
 2: (PROMETHEUS.PROCESS::GET-MAX-FDS-COUNT)
 3: ((:METHOD PROMETHEUS:COLLECT (PROMETHEUS.PROCESS::PROCESS-COLLECTOR T)) #<PROMETHEUS.PROCESS::PROCESS-COLLECTOR {1005E60093}> #<CLOSURE (LAMBDA (PROMETHEUS.FORMATS.TEXT::MF) :IN PROMETHEUS.FORMATS.TEX..
 4: ((:METHOD PROMETHEUS:COLLECT (PROMETHEUS:REGISTRY T)) #<Prometheus registry. Registered 5 collectables {1005E891E3}> #<CLOSURE (LAMBDA (PROMETHEUS.FORMATS.TEXT::MF) :IN PROMETHEUS.FORMATS.TEXT::MARSHA..
 5: ((:METHOD PROMETHEUS.FORMATS.TEXT::MARSHAL% (PROMETHEUS:REGISTRY)) #<Prometheus registry. Registered 5 collectables {1005E891E3}>) [fast-method]
 6: (SB-INT:SIMPLE-EVAL-IN-LEXENV (PROMETHEUS.FORMATS.TEXT:MARSHAL PROMETHEUS.EXAMPLE::*EXAMPLE-REGISTRY*) #<NULL-LEXENV>)
 7: (EVAL (PROMETHEUS.FORMATS.TEXT:MARSHAL PROMETHEUS.EXAMPLE::*EXAMPLE-REGISTRY*))
 8: ((LAMBDA NIL :IN SLYNK-MREPL::MREPL-EVAL-1))

I'm trying it under OSX. Probably it works under the Linux.

@svetlyak40wt
Copy link
Contributor Author

The way to reproduce is:

CL-USER> (ql:quickload :prometheus.examples)
To load "prometheus.examples":
  Load 1 ASDF system:
    prometheus.examples
; Loading "prometheus.examples"
.....
(:PROMETHEUS.EXAMPLES)
CL-USER> (prometheus.example:run :exposer-host "localhost")
#<PROMETHEUS.EXAMPLE::APPLICATION (host localhost, port 8700)>
CL-USER> (prom.text:marshal  prometheus.example::*example-registry*)
; Debugger entered on #<FILE-DOES-NOT-EXIST "~@<~?~@[: ~2I~_~A~]~:>" {1002E63873}>
[1] CL-USER>

@svetlyak40wt svetlyak40wt changed the title Example code, respond with Internal Server Error Example code, produces Internal Server Error on OSX Sep 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant