Read this site and implement the API in Python Did.
API.py was created as shown on this site, and if it was
host = '0.0.0.0'locally, it worked fine.
I wanted to develop this and build a server on a lab machine, but it doesn't connect well.
Why can't I connect even though the port is properly released?
By the way, the port looks like this now.
When I tried online port check test, 80 and 22 were accessible, but 2112 was not accessible ... Is n’t it open properly?
Answer # 1
Assume that the client and server are in the same LAN.<--- Very importantStep 1. Server side Check the IP address with the
If you are not in the same LAN, you need to configure NAT.
Step 2. Client side Confirm that
pingpasses. Suppose the server IP address is
Step 3. Server side Replace
hostwith the confirmed IP address.
Step 4. Client side
if __name__ == '__main__': # api.run (host = '0.0.0.0', port = 3001)<--- It was confirmed that this does not communicate. api.run (host = '192.168.11.3', port = 3001)
This should be accessible via a browser.Supplement 1
It may be easy to understand if you hit a book or hit a book with the keywords subnet mask, WAN, and LAN.
Computers and servers on the same network can communicate easily. On the other hand, computers and servers that do not have the same network must use a router or network device (such as L3) to switch networks for communication.
By the way ...
In IPv4, 0.0.0.0 is an IP address in which all bits are 0, and is a non-routable metaaddress used to specify invalid, unknown, or non-applicable targets. This address is assigned some special meaning.
When you start Flask, you will see the text "WARNING: This is a development server. Do not use it in a production deployment."
$python hello.py * Serving Flask app "sample" (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: off * Running on http://192.168.11.5:5000/ (Press CTRL + C to quit)
I don't know if it's a security issue or a performance issue, but I don't think it should be published on the WAN. I think it's probably a performance issue ...
The development server is not intended to be used on production systems.It was designedespecially for development purposes and performs poorly under high load.For deployment setups have a look at the Application Deployment pages.
Serving WSGI Applications
- cannot post html form on local web server using python
- i want to send a file to a remote server using the scp command
- php - i want to save a file on another server using the move_uploaded_file function
- php - i want to run a file on another server using curl
- sql server - download forms using ssrs from the aspnet (c #) screen
- flask + postgresql on core server
- postgresql - about db operation using flask and sqlalchemy
- i want to automate work using rpa on a virtual server at a fixed time every day
- sql server - how to display data using inline views
- get data from sqlite using js radio with python flask
- apache - py using cgi on sakura rental server becomes internal server error
- error when using rails server command with rails 6 + mysql
- i created a wordpress site using vps, but the server cannot be found
- i built a dns server using dnsmasq, but i can't do a forward or reverse dns lookup from the client
- How to set up a DNS server using bind
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- python - you may need to restart the kernel to use updated packages error
- python 3x - typeerror: 'method' object is not subscriptable
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- xcode - pod install [!] no `podfile 'found in the project directory
- vuejs - [vuetify] unable to locate target [data-app] i want to unit test to avoid warning
- android studio - unresolved reference comes out in kotlin