fukamachi / caveman

Lightweight web application framework for Common Lisp.
http://8arrow.org/caveman/
784 stars 63 forks source link

caveman2/clack/hunchentoot/SBCL SSL CLOSED-STREAM-ERROR #86

Open slyrus opened 8 years ago

slyrus commented 8 years ago

I'm trying to get my toy caveman2 running over HTTPS with hunchentoot and things seem to go OK at first, but then I get an SLDB error telling me that the FD-STREAM for the HTTPS socket is closed:

<SB-SYS:FD-STREAM for "socket 172.18.0.3:8443, peer: 172.18.0.1:53342" {100631CD13}> is closed

[Condition of type SB-INT:CLOSED-STREAM-ERROR]

Restarts: 0: [ABORT] abort thread (#<THREAD "hunchentoot-worker-172.18.0.1:53342" RUNNING {10066AC713}>)

Backtrace: 0: (SB-KERNEL:CLOSED-FLAME #<SB-SYS:FD-STREAM for "socket 172.18.0.3:8443, peer: 172.18.0.1:53342" {100631CD13}>) 1: (FINISH-OUTPUT #<SB-SYS:FD-STREAM for "socket 172.18.0.3:8443, peer: 172.18.0.1:53342" {100631CD13}>) 2: ((FLET HUNCHENTOOT::CLOSE-STREAM :IN HUNCHENTOOT:PROCESS-CONNECTION) #<SB-SYS:FD-STREAM for "socket 172.18.0.3:8443, peer: 172.18.0.1:53342" {100631CD13}>) 3: ((FLET #:CLEANUP-FUN-353 :IN HUNCHENTOOT:PROCESS-CONNECTION)) [cleanup] 4: ((:METHOD HUNCHENTOOT:PROCESS-CONNECTION (HUNCHENTOOT:ACCEPTOR T)) #<CLACK.HANDLER.HUNCHENTOOT::CLACK-SSL-ACCEPTOR (host , port 8443)> #<USOCKET:STREAM-USOCKET {10063D6823}>) [fast-method] 5: ((:METHOD HUNCHENTOOT:PROCESS-CONNECTION :AROUND (HUNCHENTOOT:ACCEPTOR T)) #<CLACK.HANDLER.HUNCHENTOOT::CLACK-SSL-ACCEPTOR (host , port 8443)> #<USOCKET:STREAM-USOCKET {10063D6823}>) [fast-method] 6: ((FLET HUNCHENTOOT::PROCESS-CONNECTION% :IN HUNCHENTOOT::HANDLE-INCOMING-CONNECTION%) #<CLACK.HANDLER.HUNCHENTOOT::CLACK-SSL-ACCEPTOR (host *, port 8443)> #<USOCKET:STREAM-USOCKET {10063D6823}>) 7: ((LAMBDA NIL :IN BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS)) 8: ((FLET #:WITHOUT-INTERRUPTS-BODY-1150 :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE)) 9: ((FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE)) 10: ((FLET #:WITHOUT-INTERRUPTS-BODY-359 :IN SB-THREAD::CALL-WITH-MUTEX)) 11: (SB-THREAD::CALL-WITH-MUTEX #<CLOSURE (FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE) {7FEDCCDBED6B}> #<SB-THREAD:MUTEX "thread result lock" owner: #<SB-THREAD:THR.. 12: (SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE #<SB-THREAD:THREAD "hunchentoot-worker-172.18.0.1:53342" RUNNING {10066AC713}> NIL #<CLOSURE (LAMBDA NIL :IN BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS) .. 13: ("foreign function: call_into_lisp") 14: ("foreign function: new_thread_trampoline")

Any ideas?

thanks,

Cyrus

aarvid commented 8 years ago

Last year, I opened a similar issue in clack https://github.com/fukamachi/clack/issues/127

In the end I used an nginx frontend to handle https.