Menu

#6 Curl operation times out

open
nobody
None
2020-01-01
2019-12-04
Anonymous
No

Originally created by: The-legend3

So I followed you installation instructions and for some reason the curl post keeps timing out. Not sure what the issue might be.

/tools/codecat/Backend# python3 wsgi.py &
[1] 1745
root@kali:~/tools/codecat/Backend# * Serving Flask app "application" (lazy loading)

  • Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
  • Debug mode: on
  • Running on https://0.0.0.0:5001/ (Press CTRL+C to quit)
  • Restarting with stat
  • Debugger is active!
  • Debugger PIN: 149-731-841

/tools/codecat/Backend# python3 wsgi.py &
[1] 1745
root@kali:~/tools/codecat/Backend# * Serving Flask app "application" (lazy loading)

  • Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
  • Debug mode: on
  • Running on https://0.0.0.0:5001/ (Press CTRL+C to quit)
  • Restarting with stat
  • Debugger is active!
  • Debugger PIN: 149-731-841

~/tools/codecat# curl -i -X POST -H "Content-Type: application/json" -d '{"email":"admin2@test.com","username":"admin","password":"rubrik123"}' https://0.0.0.0:5001/api/users -k
curl: (28) Operation timed out after 300644 milliseconds with 0 out of 0 bytes received

Discussion

  • Anonymous

    Anonymous - 2019-12-05

    Originally posted by: CoolerVoid

    I test on ubuntu and fedora, look that following:

    root@Artorias:/home/madara/new/codecat/Backend# python3 wsgi.py
    
     * Running on https://0.0.0.0:5001/ (Press CTRL+C to quit)
     * Restarting with stat
     * Debugger is active!
     * Debugger PIN: 336-380-853
    127.0.0.1 - - [04/Dec/2019 21:03:20] "POST /api/users HTTP/1.1" 200 -
    
    other term
    
    madara@Artorias:~/new/codecat/Frontend$ python3 wsgi.py
    
     * Running on https://0.0.0.0:9093/ (Press CTRL+C to quit)
     * Restarting with stat
     * Debugger is active!
     * Debugger PIN: 659-564-752
    
    madara@Artorias:~/codecat$ curl -i -X POST -H "Content-Type: application/json" -d '{"email":"admin2@test.com","username":"admin","password":"1234"}' https://127.0.0.1:5001/api/users -k
    HTTP/1.0 200 OK
    Content-Type: text/html; charset=utf-8
    Content-Length: 4
    X-Frame-Options: SAMEORIGIN
    Content-Security-Policy: default-src 'self'
    X-Content-Type-Options: nosniff
    X-XSS-Protection: 1; mode=block
    Strict-Transport-Security: max-age=31536000; includeSubDomains
    Server: Werkzeug/0.12.2 Python/3.6.9
    Date: Thu, 05 Dec 2019 00:03:20 GMT
    
    True
    

    On dir of backend give recursive permissions to write...
    here return ok...

    Do you have any error log ?

     
  • Anonymous

    Anonymous - 2019-12-05

    Originally posted by: CoolerVoid

    Other dont use ip 0.0.0.0... use 127.0.0.1

    curl -i -X POST -H "Content-Type: application/json" -d '{"email":"admin2@test.com","username":"admin","password":"1234"}' https://127.0.0.1:5001/api/users -k
    

    Any doubt, i am here to help.

     
  • Anonymous

    Anonymous - 2019-12-31

    Originally posted by: dwisiswant0

    Same here:

    *   Trying 127.0.0.1...
    * TCP_NODELAY set
    * Connected to 127.0.0.1 (127.0.0.1) port 5001 (#0)
    * ALPN, offering h2
    * ALPN, offering http/1.1
    * successfully set certificate verify locations:
    *   CAfile: /etc/ssl/certs/ca-certificates.crt
      CApath: /etc/ssl/certs
    * TLSv1.3 (OUT), TLS handshake, Client hello (1):
    
     
  • Anonymous

    Anonymous - 2020-01-01

    Originally posted by: CoolerVoid

    TOday i test on Last version of ubuntu, runs ok i follow readme.md step by step...

    update your repository and try again please

     

Log in to post a comment.

MongoDB Logo MongoDB