I've recently removed IIS from my windows server, because it was to complex for my needs. Then I created a small flask app, to see if everything still works. Unfortunately not, regardless if I test it using local network or internet domain I get the same result:
http 192.168.0.5
http: error: ConnectionError: HTTPConnectionPool(host='192.168.0.5', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001B0BDC15570>: Failed to establish a new connection: [WinError 10061] Nie można nawiązać połączenia, ponieważ komputer docelowy aktywnie go odmawia')) while doing a GET request to URL: http://192.168.0.5/
The thing in Polish means "A connection could not be established because the target computer is actively refusing it".
My fierewall is disabled on windows server.
same thing happens to every port. I tested 80, 443, 5000 and 9292 for a good measure
flask app:
from flask import Flask, jsonify, request
app = Flask(__name__)
@app.route('/', methods=['GET'])
def index():
return jsonify({'status': 'ok'})
app.run(port=5000, debug=True)
CodePudding user response:
Ok, I'm dumb as ... you know what. I hosted flask on loopback only... just run app with:
app.run(port=5000, debug=True, host='0.0.0.0')
solved the problem. I'm sorry