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

Uploading errors #15

Closed
3nk0d3r opened this issue Dec 18, 2019 · 7 comments
Closed

Uploading errors #15

3nk0d3r opened this issue Dec 18, 2019 · 7 comments
Assignees
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@3nk0d3r
Copy link

3nk0d3r commented Dec 18, 2019

I'have some problems during the upload step of samples.

I have installed Snake on Ubuntu Server 18.04.

snake and snake-pit services are working correctly.
pit
snake

When i try to upload a sample:
Cattura

On NGINX error log:
2019/12/18 13:48:42 [error] 1394#1394: *4 open() "/var/www/snake-skin/api/store" failed (2: No such file or directory), client: XXX.XXX.XXX.XXX, server: _, request: "GET /api/store?file_type=file&limit=10&sort=timestamp HTTP/1.1", host: "XXX.XXX.XXX.XXX:8000", referrer: "http://XXX.XXX.XXX.XXX:8000/" 2019/12/18 13:48:42 [error] 1393#1393: *1 open() "/var/www/snake-skin/api/store" failed (2: No such file or directory), client: XXX.XXX.XXX.XXX, server: _, request: "GET /api/store?file_type=memory&limit=10&sort=timestamp HTTP/1.1", host: "XXX.XXX.XXX.XXX:8000", referrer: "http://XXX.XXX.XXX.XXX:8000/" 2019/12/18 13:48:44 [error] 1393#1393: *6 open() "/var/www/snake-skin/api/scales" failed (2: No such file or directory), client: XXX.XXX.XXX.XXX, server: _, request: "GET /api/scales?file_type=file HTTP/1.1", host: "XXX.XXX.XXX.XXX:8000", referrer: "http://XXX.XXX.XXX.XXXm:8000/" 2019/12/18 13:48:58 [error] 1393#1393: *6 client intended to send too large body: 2409045 bytes, client: XXX.XXX.XXX.XXX, server: _, request: "POST /api/upload/file HTTP/1.1", host: "XXX.XXX.XXX.XXX:8000", referrer: "http://XXX.XXX.XXX.XXX:8000/"

@alexkornitzer
Copy link
Contributor

Ignoring the odd 2: No such file or directory error is looks like it may just be the file size as your upload is failing due to nginx limiting the upload size: client intended to send too large body: 2409045 bytes. I believe this can be fixed with the following: client_max_body_size 500M;

These sorts of issues should be addressed when we get the new UI live (but its still in the dev branch) which removes the need for nginx, it is also much nicer to use.

@3nk0d3r
Copy link
Author

3nk0d3r commented Dec 18, 2019

Thanks Alex.
I've insert client_max_body_size but don't fix the problem.

The samples that i try to upload are not so large. I have the same issue with .exe or .xls files.

On NGINX:

2019/12/18 14:24:26 [error] 2512#2512: *5 open() "/var/www/snake-skin/api/store" failed (2: No such file or directory), client: XXX.XXX.XXX.XXX, server: _, request: "GET /api/store?file_type=file&limit=10&sort=timestamp HTTP/1.1", host: "YY.Y.Y.Y.compute.amazonaws.com:8000", referrer: "http://YY.Y.Y.Y.compute.amazonaws.com:8000/" 2019/12/18 14:24:26 [error] 2512#2512: *4 open() "/var/www/snake-skin/api/store" failed (2: No such file or directory), client: XXX.XXX.XXX.XXX, server: _, request: "GET /api/store?file_type=memory&limit=10&sort=timestamp HTTP/1.1", host: "YY.Y.Y.Y.compute.amazonaws.com:8000", referrer: "http://YY.Y.Y.Y.compute.amazonaws.com:8000/" 2019/12/18 14:24:28 [error] 2512#2512: *4 open() "/var/www/snake-skin/api/scales" failed (2: No such file or directory), client: XXX.XXX.XXX.XXX, server: _, request: "GET /api/scales?file_type=file HTTP/1.1", host: "YY.Y.Y.Y.compute.amazonaws.com:8000", referrer: "http://YY.Y.Y.Y.compute.amazonaws.com:8000/" 2019/12/18 14:24:42 [error] 2512#2512: *4 open() "/var/www/snake-skin/api/upload/file" failed (2: No such file or directory), client: XXX.XXX.XXX.XXX, server: _, request: "POST /api/upload/file HTTP/1.1", host: "YY.Y.Y.Y.compute.amazonaws.com:8000", referrer: "http://YY.Y.Y.Y.compute.amazonaws.com:8000/" 2019/12/18 14:25:52 [error] 2512#2512: *7 open() "/var/www/snake-skin/api/scales" failed (2: No such file or directory), client: XXX.XXX.XXX.XXX, server: _, request: "GET /api/scales?file_type=file HTTP/1.1", host: "YY.Y.Y.Y.compute.amazonaws.com:8000", referrer: "http://YY.Y.Y.Y.compute.amazonaws.com:8000/" 2019/12/18 14:26:03 [error] 2512#2512: *7 open() "/var/www/snake-skin/api/upload/file" failed (2: No such file or directory), client: XXX.XXX.XXX.XXX, server: _, request: "POST /api/upload/file HTTP/1.1", host: "YY.Y.Y.Y.compute.amazonaws.com:8000", referrer: "http://YY.Y.Y.Y.compute.amazonaws.com:8000/"

@alexkornitzer
Copy link
Contributor

alexkornitzer commented Dec 18, 2019

Awesome so now we are back to the error I was confused about before, which is nginx trying to open a file path rather than doing proxy pass through: /var/www/snake-skin/api/upload/file That should be something like http://localhost:5000/api/upload/file. So it looks like the proxy pass settings in your nginx conf may be incorrect, are you able to share them without giving any sensitive information away?

@3nk0d3r
Copy link
Author

3nk0d3r commented Dec 18, 2019

I don't modify NGINX conf.

The NGINX conf, from install.sh process:
`/etc/nginx/sites-available# cat /etc/nginx/sites-available/snake-skin
server {
listen 8000 default_server;

root /var/www/snake-skin;
client_max_body_size 500M;
server_name _;
}`

@alexkornitzer
Copy link
Contributor

Ah yeah, I would hazard a guess you are hitting this issue: #8? Again, this solution is resolved in the new Snake Skin, it is just not ready to go live yet. So either of these should work: #8 (comment)

This is due to lack of foresight in the install scripts on my behalf, apologies for the inconvenience. This is fixed in the docker images but not the system based install.

@3nk0d3r
Copy link
Author

3nk0d3r commented Dec 18, 2019

When do you release the new Snake Skin?

I don't find "snake-skin/src/config/config.js"
asd

However, i try with Snake on docker.

Thank you

@alexkornitzer
Copy link
Contributor

Literally working on it now, so should not be too long :p

@alexkornitzer alexkornitzer added bug Something isn't working duplicate This issue or pull request already exists labels Dec 18, 2019
@alexkornitzer alexkornitzer self-assigned this Dec 18, 2019
@3nk0d3r 3nk0d3r closed this as completed Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants