Giter Site home page Giter Site logo

Comments (4)

miguelgfierro avatar miguelgfierro commented on May 14, 2024

When following this tutorial, after doing sudo nginx -t I get the following error:

nginx: [emerg] could not build server_names_hash, you should increase server_names_hash_bucket_size: 64
nginx: configuration file /etc/nginx/nginx.conf test failed

Then I go to sudo vim /etc/nginx/nginx.conf and uncomment the line: server_names_hash_bucket_size: 64, however, I get the exact same error.

If I change it to 128, then the service is ok:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

The reason was because my domain name is very long and server_names_hash_bucket_size controls the maximum length of a virtual host entry (ie the length of the domain name).

from ai_projects.

miguelgfierro avatar miguelgfierro commented on May 14, 2024

After opening the port 80 and put http://my-dns.com:80, I get a bad gateway: 502 Bad Gateway.

from ai_projects.

miguelgfierro avatar miguelgfierro commented on May 14, 2024

I am following the guide for Ubuntu 16.04. I got Bad gateway.
After restarting the service:

sudo systemctl restart cntk_api
sudo systemctl restart nginx

I got the following error:

2017/03/21 07:44:27 [crit] 30615#30615: *1 connect() to unix:/home/hoaphumanoid/repo/sciblog_support/Intro_to_Machine_Learning_API/cntk_api.sock failed (13: Permission denied) while connecting to upstream, client: ...

To solve it: chmod 777 cntk_api.sock. Then I got the following:

2017/03/21 07:46:12 [error] 30724#30724: *1 connect() to unix:/home/hoaphumanoid/repo/sciblog_support/Intro_to_Machine_Learning_API/cntk_api.sock failed (111: Connection refused) while connecting to upstream, client: ...

If I do sudo journalctl -u cntk_api I get:

Mar 21 07:51:44 hoaphumanoidserver systemd[1]: Stopped Gunicorn instance to serve CNTK API.
Mar 21 07:51:44 hoaphumanoidserver systemd[1]: Started Gunicorn instance to serve CNTK API.
Mar 21 07:51:44 hoaphumanoidserver systemd[1]: cntk_api.service: Main process exited, code=exited, status=217/USER
Mar 21 07:51:44 hoaphumanoidserver systemd[1]: cntk_api.service: Unit entered failed state.
Mar 21 07:51:44 hoaphumanoidserver systemd[1]: cntk_api.service: Failed with result 'exit-code'.

To solve this problem I had to remove the file cntk_api.sock, it is created automatically by gunicorn. This is the information of the file, once the system is working:

ls -lha
srwxrwx--- 1 hoaphumanoid www-data        0 Mar 21 08:11 cntk_api.sock

from ai_projects.

miguelgfierro avatar miguelgfierro commented on May 14, 2024

0f1c9bb

from ai_projects.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.