Closed liweijian closed 3 years ago
Let me try it out, also I probably need a better way for you to send me crash logs
Screenshotbot works basically started success on docker, got the sign up error as above.
But it even failed to start in CentOS, with logs follows: start.log
Okay, the first issue is that on the OSS repo, it was supposed to show you a crash report on browser. Let me fix that in a second, and I can debug once we have the crash report
I pushed this commit: https://github.com/screenshotbot/screenshotbot-oss/commit/82c709bda6c2a82a033c13f9dc95cdff00186c9e
Try the signup again, and this time it should show you a stacktrace.
As for the CentOS start issue: Can you show me what ls -l /data/space64/lwj/hobits/screenshotbot-oss/build/asdf-cache/ccl-1.12-f98-linux-x64/src/java/main/java.main-classes/com/atlassian/oauth/client/example/
.? The error happened while building, and it failed to delete this directory, so I'm trying to see why that may be.
(also, I wasn't able to repro the signup error on a clean docker instance, so the stacktrace would be helpful for me to figure out what went wrong)
Weird, root
I believe it's my bad that I started the service in root a few days ago.
After deleted the build folder in root, it works again:)
I pushed this commit: 82c709b
Try the signup again, and this time it should show you a stacktrace.
As for the CentOS start issue: Can you show me what
ls -l /data/space64/lwj/hobits/screenshotbot-oss/build/asdf-cache/ccl-1.12-f98-linux-x64/src/java/main/java.main-classes/com/atlassian/oauth/client/example/
.? The error happened while building, and it failed to delete this directory, so I'm trying to see why that may be.
For the stacktrace of sign up:
Internal Server Error
An error occurred while processing your /n/794231197262221979953883963052270689 request.
Error Message
Incorrect session, got #<USER-SESSION-TRANSIENT #x30200726D48D>, expected #<USER-SESSION-TRANSIENT #x302007315C6D>
Backtrace
(7F4A21E802E8) : 0 (PRINT-CALL-HISTORY :CONTEXT NIL :PROCESS NIL :ORIGIN NIL :DETAILED-P NIL :COUNT 1152921504606846975 :START-FRAME-NUMBER 0 :STREAM #<STRING-OUTPUT-STREAM #x302007314BED> :PRINT-LEVEL 2 :PRINT-LENGTH 5 :PRINT-STRING-LENGTH :DEFAULT :SHOW-INTERNAL-FRAMES NIL :FORMAT :TRADITIONAL) 965
(7F4A21E80480) : 1 (PRINT-BACKTRACE-TO-STREAM #<STRING-OUTPUT-STREAM #x302007314BED>) 85
(7F4A21E804B0) : 2 (GET-BACKTRACE) 397
(7F4A21E80518) : 3 (FUNCALL #'#<(:INTERNAL (HUNCHENTOOT:HANDLE-REQUEST (HUNCHENTOOT:ACCEPTOR HUNCHENTOOT:REQUEST)))> #<SIMPLE-ERROR #x302007314C1D>) 117
(7F4A21E80548) : 4 (SIGNAL #<SIMPLE-ERROR #x302007314C1D>) 1037
(7F4A21E80598) : 5 (%ERROR #<SIMPLE-ERROR #x302007314C1D> (#<AUTH::USER-SESSION-TRANSIENT #x30200726D48D> #<AUTH::USER-SESSION-TRANSIENT #x302007315C6D>) 17494546645176) 117
(7F4A21E805C0) : 6 (FUNCALL #'#<(:INTERNAL (NIBBLE:RENDER-NIBBLE (NIBBLE:NIBBLE-PLUGIN T)))>) 1261
(7F4A21E805F8) : 7 (FUNCALL #'#<(:INTERNAL SCREENSHOTBOT/SERVER:%HANDLER-WRAP)>) 341
(7F4A21E80638) : 8 (%WITH-SESSIONS #<COMPILED-LEXICAL-CLOSURE (:INTERNAL SCREENSHOTBOT/SERVER:%HANDLER-WRAP) #x302007315D3F>) 341
(7F4A21E80670) : 9 (%HANDLER-WRAP #<COMPILED-LEXICAL-CLOSURE (:INTERNAL #) #x302007315D7F>) 597
(7F4A21E806D0) : 10 (FUNCALL #'#<#<STANDARD-METHOD HUNCHENTOOT-EXTENSIONS::DISPATCH-PLUGIN-REQUEST (HUNCHENTOOT-EXTENSIONS:ACCEPTOR-PLUGIN T T)>> #<NIBBLE:NIBBLE-PLUGIN #x302006A1663D> #<HUNCHENTOOT:REQUEST #x30200731653D> "/794231197262221979953883963052270689") 509
(7F4A21E80740) : 11 (FUNCALL #'#<#<STANDARD-METHOD HUNCHENTOOT:ACCEPTOR-DISPATCH-REQUEST (HUNCHENTOOT-EXTENSIONS:ACCEPTOR-WITH-PLUGINS T)>> #<ACCEPTOR (host *, port 3015)> #<HUNCHENTOOT:REQUEST #x30200731653D>) 477
(7F4A21E80780) : 12 (%CALL-NEXT-METHOD (NIL (#<#> #<#>) . 17494546645266)) 1069
(7F4A21E807F8) : 13 (FUNCALL #'#<#<STANDARD-METHOD HUNCHENTOOT:ACCEPTOR-DISPATCH-REQUEST (SCREENSHOTBOT/SERVER:ACCEPTOR T)>> #<ACCEPTOR (host *, port 3015)> #<HUNCHENTOOT:REQUEST #x30200731653D>) 485
(7F4A21E80830) : 14 (%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD HUNCHENTOOT:ACCEPTOR-DISPATCH-REQUEST #> #<STANDARD-METHOD HUNCHENTOOT:ACCEPTOR-DISPATCH-REQUEST #> #<STANDARD-METHOD HUNCHENTOOT:ACCEPTOR-DISPATCH-REQUEST #> #<STANDARD-METHOD HUNCHENTOOT:ACCEPTOR-DISPATCH-REQUEST #>) 17494546645266) 773
(7F4A21E808A8) : 15 (FUNCALL #'#<#<STANDARD-METHOD HUNCHENTOOT:HANDLE-REQUEST (HUNCHENTOOT:ACCEPTOR HUNCHENTOOT:REQUEST)>> #<ACCEPTOR (host *, port 3015)> #<HUNCHENTOOT:REQUEST #x30200731653D>) 573
(7F4A21E80940) : 16 (FUNCALL #'#<#<STANDARD-METHOD HUNCHENTOOT:PROCESS-REQUEST (T)>> #<HUNCHENTOOT:REQUEST #x30200731653D>) 1493
(7F4A21E80A18) : 17 (FUNCALL #'#<(:INTERNAL HUNCHENTOOT-MULTI-ACCEPTOR::DISPATCH-ACCEPTOR (HUNCHENTOOT:PROCESS-REQUEST (HUNCHENTOOT-MULTI-ACCEPTOR::MULTI-REQUEST)))> #<ACCEPTOR (host *, port 3015)>) 221
(7F4A21E80A80) : 18 (FUNCALL #'#<#<STANDARD-METHOD HUNCHENTOOT:PROCESS-REQUEST (HUNCHENTOOT-MULTI-ACCEPTOR::MULTI-REQUEST)>> #<HUNCHENTOOT-MULTI-ACCEPTOR::MULTI-REQUEST #x302007316C0D>) 565
(7F4A21E80AB8) : 19 (DO-WITH-ACCEPTOR-REQUEST-COUNT-INCREMENTED #<MY-ACCEPTOR (host *, port 4091)> #<COMPILED-LEXICAL-CLOSURE (:INTERNAL #) #x302007316CCF>) 1253
(7F4A21E80B28) : 20 (FUNCALL #'#<#<STANDARD-METHOD HUNCHENTOOT:PROCESS-CONNECTION (HUNCHENTOOT:ACCEPTOR T)>> #<MY-ACCEPTOR (host *, port 4091)> #<USOCKET:STREAM-USOCKET #x30200726857D>) 1933
(7F4A21E80C58) : 21 (%CALL-NEXT-METHOD (NIL #<STANDARD-METHOD HUNCHENTOOT:PROCESS-CONNECTION #> . 17494546645433)) 1069
(7F4A21E80CD0) : 22 (FUNCALL #'#<#<STANDARD-METHOD HUNCHENTOOT:PROCESS-CONNECTION :AROUND (HUNCHENTOOT:ACCEPTOR T)>> #<MY-ACCEPTOR (host *, port 4091)> #<USOCKET:STREAM-USOCKET #x30200726857D>) 701
(7F4A21E80D68) : 23 (%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD HUNCHENTOOT:PROCESS-CONNECTION :AROUND #> #<STANDARD-METHOD HUNCHENTOOT:PROCESS-CONNECTION #>) 17494546645433) 773
(7F4A21E80DE0) : 24 (FUNCALL #'#<(:INTERNAL HUNCHENTOOT::PROCESS-CONNECTION% (HUNCHENTOOT::HANDLE-INCOMING-CONNECTION% (HUNCHENTOOT:ONE-THREAD-PER-CONNECTION-TASKMASTER T)))> #<MY-ACCEPTOR (host *, port 4091)> #<USOCKET:STREAM-USOCKET #x30200726857D>) 181
(7F4A21E80E40) : 25 (FUNCALL #'#<(:INTERNAL BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS)>) 845
(7F4A21E80E68) : 26 (RUN-PROCESS-INITIAL-FORM #<PROCESS hunchentoot-worker-9.45.201.124:24855(6) [Active] #x302007267CDD> (#<COMPILED-LEXICAL-CLOSURE # #x302007267A6F>)) 717
(7F4A21E80EF0) : 27 (FUNCALL #'#<(:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL (PROCESS)))> #<PROCESS hunchentoot-worker-9.45.201.124:24855(6) [Active] #x302007267CDD> (#<COMPILED-LEXICAL-CLOSURE # #x302007267A6F>)) 581
(7F4A21E80F98) : 28 (FUNCALL #'#<(:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION)>) 277
Have you disabled cookies or are you using Private browsing/incognito?
If not, it could be something else that's preventing cookies from working. Are you running behind an nginx/apache server? What does the URL that you're using in the browser look like?
I've disable the ADGuard for this site, and I am access it directly like:
http://xx.xx.xx.188:4091/signin
hmm, let me think through this for a second. Just for context the /n/xxxxxxxxxxxxxxxx
links are generated at runtime and tied to your browser session. So if you copy-paste this to another browser for example you would get this message. But that's not what is happening here, so let me improve the logging to help figure this out. In the meantime can you try another browser and let me know if it's failing on that too?
Oh I found the issue, let me fix it
I got the same error in safari.
One more thing, just wondering what's the best practice to config nginx? I did:
location ~ /ssbot/(.*)$ {
proxy_pass http://127.0.0.1:4091/$1$is_args$args;
}
It doesn't work
There's a bug in cookie configuration code, so that's definitely my fault, but I'll fix it in the next hour.
As for nginx, ideally you'll need a domain (so ssbot.xyz.com as opposed to xyz.com/ssbot). But xyz.com/ssbot might work with the right configuration with the right proxy_redirect
argument, but there may be other things that'll break when you do that.
@liweijian I have a fix in https://github.com/screenshotbot/screenshotbot-oss/commit/185a375cf37ebd71bd6632e3d4956abe354df193
Can you git pull and restart the service? The sign up should work this time
DA DA~
I found that sign up works well in IP address, but fails on the Nginx domain config
Nginx config:
server {
listen 80;
server_name ssbot.com;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
proxy_pass http://127.0.0.1:4091;
#root /home/qspace/epchantweb/dist/;
#try_files $uri $uri/ @router;
}
Just not sure the Set-Cookie
in Domain 127.0.0.1
I'm sure I'm using the latest repo, is there anything that I had missed?
It did works with direct IP:
I forgot, you need this config in your nginx too:
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
There was another bug I fixed here: https://github.com/screenshotbot/screenshotbot-oss/commit/b9b31e645f2c4fe269e4cc0c163f879e949c5076
Essentially nginx proxy without https would've failed. This is now fixed.
I'm also writing a separate wiki page with the nginx configuration (work in progress): https://github.com/screenshotbot/screenshotbot-oss/wiki/Configuring-Nginx
One more bug fix while I was testing out my new wiki page: https://github.com/screenshotbot/screenshotbot-oss/commit/c71d9d004537c8627993165c7ffa119f8d92fdca
Just pull the newly updated code from Github, ran it in docker, and tried to register an account: