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

WebSocket is closed before the connection is established. #213

Closed
shinebayar-g opened this issue May 7, 2019 · 13 comments
Closed

WebSocket is closed before the connection is established. #213

shinebayar-g opened this issue May 7, 2019 · 13 comments
Milestone

Comments

@shinebayar-g
Copy link
Collaborator

I've edited conf.json file to add new member. I know I have to restart script-server after editing conf.json. After script-server restart I cannot see Execute button and I'm getting this websocket error. I've updated to latest release 0.14.0 and still seeing the same error..

image

@bugy
Copy link
Owner

bugy commented May 7, 2019

Hi @shinebayar-g, do you see anything in server log?
Are you using proxy? Do you see proper requests in the proxy log?

@bugy bugy added the bug label May 7, 2019
@shinebayar-g
Copy link
Collaborator Author

I'm using nginx reverse proxy as explained here.

After a while I'm getting this error.

image

Here is the logs from server.log file.

2019-05-07 16:45:39,808 [tornado.access.INFO] 200 GET /favicon.ico (127.0.0.1) 2.12ms
2019-05-07 16:45:39,822 [tornado.access.INFO] 200 GET /images/titleBackground.jpg (127.0.0.1) 8.08ms
2019-05-07 16:45:39,849 [tornado.access.INFO] 200 GET /index-deps.css.map (127.0.0.1) 2.85ms
2019-05-07 16:45:39,852 [tornado.access.INFO] 200 GET /index.js.map (127.0.0.1) 12.61ms
2019-05-07 16:45:41,477 [tornado.access.INFO] 200 GET /conf (127.0.0.1) 0.74ms
2019-05-07 16:45:41,480 [script_server.audit_utils.WARNING] Could not get hostname for XXX.XX.XXX.XXX
2019-05-07 16:45:41,485 [tornado.access.INFO] 200 GET /scripts (127.0.0.1) 7.15ms
2019-05-07 16:45:41,624 [tornado.access.INFO] 200 GET /executions/active (127.0.0.1) 0.71ms
2019-05-07 16:45:41,626 [tornado.access.INFO] 200 GET /auth/info (127.0.0.1) 0.54ms
2019-05-07 16:45:41,642 [tornado.access.INFO] 200 GET /favicon.ico (127.0.0.1) 2.20ms
2019-05-07 16:45:41,757 [tornado.access.INFO] 200 GET /fonts/MaterialIcons-Regular.woff2 (127.0.0.1) 3.63ms
2019-05-07 16:45:41,757 [tornado.access.INFO] 200 GET /images/logout.png (127.0.0.1) 2.24ms
2019-05-07 16:46:43,171 [tornado.access.INFO] 200 GET /index.html (127.0.0.1) 2.57ms
2019-05-07 16:46:43,316 [tornado.access.INFO] 200 GET /css/index.css (127.0.0.1) 2.19ms
2019-05-07 16:46:43,416 [tornado.access.INFO] 200 GET /css/bash_styles.css (127.0.0.1) 2.19ms
2019-05-07 16:46:43,518 [tornado.access.INFO] 200 GET /index-deps.css (127.0.0.1) 2.37ms
2019-05-07 16:46:43,582 [tornado.access.INFO] 200 GET /index.js (127.0.0.1) 3.16ms
2019-05-07 16:46:43,603 [tornado.access.INFO] 200 GET /images/github.png (127.0.0.1) 2.56ms
2019-05-07 16:46:43,604 [tornado.access.INFO] 200 GET /images/search.png (127.0.0.1) 1.98ms
2019-05-07 16:46:43,707 [tornado.access.INFO] 200 GET /images/logout.png (127.0.0.1) 1.67ms
2019-05-07 16:46:43,715 [tornado.access.INFO] 200 GET /images/console.png (127.0.0.1) 1.72ms
2019-05-07 16:46:44,130 [tornado.access.INFO] 200 GET /favicon.ico (127.0.0.1) 2.00ms
2019-05-07 16:46:44,138 [tornado.access.INFO] 200 GET /images/titleBackground.jpg (127.0.0.1) 2.30ms
2019-05-07 16:46:44,162 [tornado.access.INFO] 200 GET /index-deps.css.map (127.0.0.1) 2.81ms
2019-05-07 16:46:44,166 [tornado.access.INFO] 200 GET /index.js.map (127.0.0.1) 4.99ms
2019-05-07 16:46:46,514 [script_server.audit_utils.WARNING] Could not get hostname for XXX.XX.XXX.XXX
2019-05-07 16:46:46,522 [tornado.access.INFO] 200 GET /scripts (127.0.0.1) 9.78ms
2019-05-07 16:46:46,524 [tornado.access.INFO] 200 GET /conf (127.0.0.1) 0.58ms
2019-05-07 16:46:46,663 [tornado.access.INFO] 200 GET /executions/active (127.0.0.1) 0.99ms
2019-05-07 16:46:46,665 [tornado.access.INFO] 200 GET /auth/info (127.0.0.1) 0.83ms
2019-05-07 16:46:46,687 [tornado.access.INFO] 200 GET /favicon.ico (127.0.0.1) 1.53ms
2019-05-07 16:46:46,774 [tornado.access.INFO] 200 GET /fonts/MaterialIcons-Regular.woff2 (127.0.0.1) 3.59ms
2019-05-07 16:46:46,774 [tornado.access.INFO] 200 GET /images/logout.png (127.0.0.1) 2.20ms

Here is nginx error log

2019/05/07 16:36:58 [warn] 19185#19185: *265 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/0/03/0000000030 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/index.js.map HTTP/1.1", upstream: "http://127.0.0.1:5000/index.js.map", host: "mydomain.com"
2019/05/07 16:37:36 [warn] 19185#19185: *303 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/1/03/0000000031 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/images/titleBackground.jpg HTTP/1.1", upstream: "http://127.0.0.1:5000/images/titleBackground.jpg", host: "mydomain.com", referrer: "https://mydomain.com/script-server/css/index.css"
2019/05/07 16:37:36 [warn] 19185#19185: *302 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/2/03/0000000032 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/index.js.map HTTP/1.1", upstream: "http://127.0.0.1:5000/index.js.map", host: "mydomain.com"
2019/05/07 16:37:42 [error] 19185#19185: *302 "/etc/nginx/html/index.html" is not found (2: No such file or directory), client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET / HTTP/1.1", host: "mydomain.com"
2019/05/07 16:37:43 [error] 19185#19185: *302 open() "/etc/nginx/html/favicon.ico" failed (2: No such file or directory), client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /favicon.ico HTTP/1.1", host: "mydomain.com", referrer: "https://mydomain.com/"
2019/05/07 16:37:48 [warn] 19185#19185: *300 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/3/03/0000000033 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/images/titleBackground.jpg HTTP/1.1", upstream: "http://127.0.0.1:5000/images/titleBackground.jpg", host: "mydomain.com", referrer: "https://mydomain.com/script-server/css/index.css"
2019/05/07 16:37:48 [warn] 19185#19185: *302 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/4/03/0000000034 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/index.js.map HTTP/1.1", upstream: "http://127.0.0.1:5000/index.js.map", host: "mydomain.com"
2019/05/07 16:40:05 [warn] 19185#19185: *355 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/5/03/0000000035 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/images/titleBackground.jpg HTTP/1.1", upstream: "http://127.0.0.1:5000/images/titleBackground.jpg", host: "mydomain.com", referrer: "https://mydomain.com/script-server/css/index.css"
2019/05/07 16:40:43 [warn] 19185#19185: *370 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/6/03/0000000036 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/images/titleBackground.jpg HTTP/1.1", upstream: "http://127.0.0.1:5000/images/titleBackground.jpg", host: "mydomain.com", referrer: "https://mydomain.com/script-server/css/index.css"
2019/05/07 16:40:44 [warn] 19185#19185: *371 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/7/03/0000000037 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/images/titleBackground.jpg HTTP/1.1", upstream: "http://127.0.0.1:5000/images/titleBackground.jpg", host: "mydomain.com", referrer: "https://mydomain.com/script-server/css/index.css"
2019/05/07 16:40:44 [warn] 19185#19185: *370 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/8/03/0000000038 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/index.js.map HTTP/1.1", upstream: "http://127.0.0.1:5000/index.js.map", host: "mydomain.com"
2019/05/07 16:43:10 [warn] 19185#19185: *418 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/9/03/0000000039 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/images/titleBackground.jpg HTTP/1.1", upstream: "http://127.0.0.1:5000/images/titleBackground.jpg", host: "mydomain.com", referrer: "https://mydomain.com/script-server/css/index.css"
2019/05/07 16:43:10 [warn] 19185#19185: *417 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/0/04/0000000040 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/index.js.map HTTP/1.1", upstream: "http://127.0.0.1:5000/index.js.map", host: "mydomain.com"
2019/05/07 16:45:39 [warn] 19185#19185: *451 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/1/04/0000000041 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/images/titleBackground.jpg HTTP/1.1", upstream: "http://127.0.0.1:5000/images/titleBackground.jpg", host: "mydomain.com", referrer: "https://mydomain.com/script-server/css/index.css"
2019/05/07 16:45:39 [warn] 19185#19185: *450 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/2/04/0000000042 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/index.js.map HTTP/1.1", upstream: "http://127.0.0.1:5000/index.js.map", host: "mydomain.com"
2019/05/07 16:46:44 [warn] 19185#19185: *476 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/3/04/0000000043 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/images/titleBackground.jpg HTTP/1.1", upstream: "http://127.0.0.1:5000/images/titleBackground.jpg", host: "mydomain.com", referrer: "https://mydomain.com/script-server/css/index.css"
2019/05/07 16:46:44 [warn] 19185#19185: *477 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/4/04/0000000044 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/index.js.map HTTP/1.1", upstream: "http://127.0.0.1:5000/index.js.map", host: "mydomain.com"
2019/05/07 16:56:25 [warn] 19185#19185: *508 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/5/04/0000000045 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/images/titleBackground.jpg HTTP/1.1", upstream: "http://127.0.0.1:5000/images/titleBackground.jpg", host: "mydomain.com", referrer: "https://mydomain.com/script-server/css/index.css"
2019/05/07 16:56:25 [warn] 19185#19185: *509 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/6/04/0000000046 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/index.js.map HTTP/1.1", upstream: "http://127.0.0.1:5000/index.js.map", host: "mydomain.com"
2019/05/07 16:56:53 [warn] 19185#19185: *541 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/7/04/0000000047 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/images/titleBackground.jpg HTTP/1.1", upstream: "http://127.0.0.1:5000/images/titleBackground.jpg", host: "mydomain.com", referrer: "https://mydomain.com/script-server/css/index.css"
2019/05/07 16:56:53 [warn] 19186#19186: *542 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/8/04/0000000048 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/index.js.map HTTP/1.1", upstream: "http://127.0.0.1:5000/index.js.map", host: "mydomain.com"
2019/05/07 16:56:59 [warn] 19185#19185: *541 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/9/04/0000000049 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/admin.js.map HTTP/1.1", upstream: "http://127.0.0.1:5000/admin.js.map", host: "mydomain.com"
2019/05/07 16:56:59 [error] 19185#19185: *536 open() "/etc/nginx/html/favicon.ico" failed (2: No such file or directory), client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /favicon.ico HTTP/1.1", host: "mydomain.com", referrer: "https://mydomain.com/script-server/admin.html"
2019/05/07 16:57:55 [warn] 19185#19185: *584 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/0/05/0000000050 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/images/titleBackground.jpg HTTP/1.1", upstream: "http://127.0.0.1:5000/images/titleBackground.jpg", host: "mydomain.com", referrer: "https://mydomain.com/script-server/css/index.css"
2019/05/07 16:57:55 [warn] 19185#19185: *577 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/1/05/0000000051 while reading upstream, client: XXX.XX.XXX.XXX, server: mydomain.com, request: "GET /script-server/index.js.map HTTP/1.1", upstream: "http://127.0.0.1:5000/index.js.map", host: "mydomain.com"

@shinebayar-g
Copy link
Collaborator Author

After googling about nginx error log I've tried

proxy_buffers 16 16k;
proxy_buffer_size 16k;

or

proxy_buffering off;

Both didn't work.

@bugy
Copy link
Owner

bugy commented May 7, 2019

In the server log I don't see the websocket connections reaching the server (they should be starting with 101 GET)

For the nginx I meant smth like access.log (which connections and redirections are performed). Is there anything like this there?

@shinebayar-g
Copy link
Collaborator Author

shinebayar-g commented May 7, 2019

I have disabled access_log, let me turn on them.
Edit: Getting this logs when I click around scripts. @bugy

XXX.XX.XXX.XX - - [07/May/2019:17:17:43 +0800] "GET //script-server/scripts/admin-cm HTTP/1.1" 401 590 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - - [07/May/2019:17:17:51 +0800] "GET //script-server/scripts/admin-cm HTTP/1.1" 401 590 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - mydomain [07/May/2019:17:18:47 +0800] "GET /script-server/index.html HTTP/1.1" 200 899 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - mydomain [07/May/2019:17:18:47 +0800] "GET /script-server/css/index.css HTTP/1.1" 200 3049 "https://mydomain.com/script-server/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - mydomain [07/May/2019:17:18:47 +0800] "GET /script-server/index-deps.css HTTP/1.1" 200 30491 "https://mydomain.com/script-server/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - mydomain [07/May/2019:17:18:47 +0800] "GET /script-server/images/search.png HTTP/1.1" 200 439 "https://mydomain.com/script-server/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - mydomain [07/May/2019:17:18:47 +0800] "GET /script-server/images/github.png HTTP/1.1" 200 1353 "https://mydomain.com/script-server/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - mydomain [07/May/2019:17:18:47 +0800] "GET /script-server/index.js HTTP/1.1" 200 151351 "https://mydomain.com/script-server/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - mydomain [07/May/2019:17:18:47 +0800] "GET /script-server/css/bash_styles.css HTTP/1.1" 200 530 "https://mydomain.com/script-server/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - mydomain [07/May/2019:17:18:48 +0800] "GET /script-server/images/console.png HTTP/1.1" 200 670 "https://mydomain.com/script-server/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - mydomain [07/May/2019:17:18:48 +0800] "GET /script-server/images/logout.png HTTP/1.1" 200 483 "https://mydomain.com/script-server/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - mydomain [07/May/2019:17:18:48 +0800] "GET /script-server/favicon.ico HTTP/1.1" 200 9662 "https://mydomain.com/script-server/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - mydomain [07/May/2019:17:18:48 +0800] "GET /script-server/index-deps.css.map HTTP/1.1" 200 242023 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - mydomain [07/May/2019:17:18:50 +0800] "GET /script-server/images/titleBackground.jpg HTTP/1.1" 200 567915 "https://mydomain.com/script-server/css/index.css" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - mydomain [07/May/2019:17:18:51 +0800] "GET /script-server/scripts HTTP/1.1" 200 419 "https://mydomain.com/script-server/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - mydomain [07/May/2019:17:18:51 +0800] "GET /script-server/conf HTTP/1.1" 200 69 "https://mydomain.com/script-server/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - mydomain [07/May/2019:17:18:51 +0800] "GET /script-server/executions/active HTTP/1.1" 200 2 "https://mydomain.com/script-server/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - mydomain [07/May/2019:17:18:51 +0800] "GET /script-server/auth/info HTTP/1.1" 200 65 "https://mydomain.com/script-server/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - mydomain [07/May/2019:17:18:51 +0800] "GET /script-server/favicon.ico HTTP/1.1" 200 9662 "https://mydomain.com/script-server/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - mydomain [07/May/2019:17:18:51 +0800] "GET /script-server/fonts/MaterialIcons-Regular.woff2 HTTP/1.1" 200 44300 "https://mydomain.com/script-server/index-deps.css" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - mydomain [07/May/2019:17:18:51 +0800] "GET /script-server/images/logout.png HTTP/1.1" 200 483 "https://mydomain.com/script-server/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - - [07/May/2019:17:18:51 +0800] "GET //script-server/scripts/admin-cm HTTP/1.1" 401 590 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
XXX.XX.XXX.XX - mydomain [07/May/2019:17:18:53 +0800] "GET /script-server/index.js.map HTTP/1.1" 200 1991886 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"

I think this line looks suspicious XXX.XX.XXX.XX - - [07/May/2019:17:17:43 +0800] "GET //script-server/scripts/admin-cm HTTP/1.1" 401 590 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"

@bugy
Copy link
Owner

bugy commented May 7, 2019

Hi @shinebayar-g, thanks for the info. So, there is 401 error, however, there are no logs in script server for it.
What confuses me is double slash, at the beginning of the path, could it be, that nginx redirects it to a wrong location?

Unfortunately, I won't be able to try to reproduce it locally today (no access to the machine with similar setup)

PS please write updates in a separate message. I don't get notifications for message edits :)

@shinebayar-g
Copy link
Collaborator Author

Yea I'm wondering about that too. That double slash doesn't look good, I don't know why it's happening after months of running. I didn't change anything at nginx setup.

@bugy
Copy link
Owner

bugy commented May 7, 2019

May be I changed the way, how I build the websocket URL, I have to check

@bugy
Copy link
Owner

bugy commented May 7, 2019

Hi @shinebayar-g, I managed to reproduce the issue with basic auth enabled in nginx. And for me, only Chrome was failing (firefox was fine).

The problem, as I see it, is that an authentication header is not passed with websocket connection. There is no way to control this header from the code. The browser should send it automatically. But probably I understand it wrong, will investigate further.

@bugy
Copy link
Owner

bugy commented May 7, 2019

Anyway, after fixing double-slash issue, it started working for. @shinebayar-g, could you check please, if dev version works for you? If yes, I'll move this fix to stable release

@bugy bugy added the resolved label May 7, 2019
@shinebayar-g
Copy link
Collaborator Author

Okay, @bugy
I've enabled nginx basic auth with Google OAuth. I should've note that I'm not using trusted_ips setting on script-server. Only using Google OAuth

This is screenshot from Safari browser. I'm getting this error instantly. (On google chrome this error appeared after a while)
image

Let me update to dev release and see if it's working.

@shinebayar-g
Copy link
Collaborator Author

It's working, confirmed fixed.

@bugy bugy added this to the 1.14 milestone May 8, 2019
@bugy
Copy link
Owner

bugy commented May 8, 2019

Updated latest release (still version 1.14.0)

@bugy bugy closed this as completed May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants