document address already in use error
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by David Lord · committed by David Lord · parent 9fe2131 · Browse files · 4 files·+56 added−0 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+56 added−0 removed
- other:+56 added−0 removed
Provenance
- Commit
2e10fc2- Tree
d15257a- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent
9fe2131
4 files changed+56 added−0 removed
modified:docs/tutorial/factory.rst+5 added
175 unmodified lines176 Visit http://127.0.0.1:5000/hello in a browser and you should see the177 "Hello, World!" message. Congratulations, you're now running your Flask178 web application!179 180+If another program is already using port 5000, you'll see181+``OSError: [Errno 98]`` or ``OSError: [WinError 10013]`` when the182+server tries to start. See :ref:`address-already-in-use` for how to183+handle that.184+185 Continue to :doc:`database`.modified:docs/cli.rst+5 added
101 unmodified lines102 Only use the development server during development. The development server103 is provided for convenience, but is not designed to be particularly secure,104 stable, or efficient. See :doc:`/deploying/index` for how to run in production.105 106+If another program is already using port 5000, you'll see107+``OSError: [Errno 98]`` or ``OSError: [WinError 10013]`` when the108+server tries to start. See :ref:`address-already-in-use` for how to109+handle that.110 111+112 Open a Shell113 ------------114 115 To explore the data in your application, you can start an interactive Python544 unmodified linesmodified:docs/quickstart.rst+5 added
81 unmodified lines82 83 Now head over to http://127.0.0.1:5000/, and you should see your hello84 world greeting.85 86+If another program is already using port 5000, you'll see87+``OSError: [Errno 98]`` or ``OSError: [WinError 10013]`` when the88+server tries to start. See :ref:`address-already-in-use` for how to89+handle that.90+91 .. _public-server:92 93 .. admonition:: Externally Visible Server94 849 unmodified linesmodified:docs/server.rst+41 added
62 unmodified lines63 you should prefer setting the development environment as shown64 above.65 66 67+.. _address-already-in-use:68+69+Address already in use70+~~~~~~~~~~~~~~~~~~~~~~71+72+If another program is already using port 5000, you'll see an ``OSError``73+when the server tries to start. It may have one of the following74+messages:75+76+- ``OSError: [Errno 98] Address already in use``77+- ``OSError: [WinError 10013] An attempt was made to access a socket78+ in a way forbidden by its access permissions``79+80+Either identify and stop the other program, or use81+``flask run --port 5001`` to pick a different port.82+83+You can use ``netstat`` to identify what process id is using a port,84+then use other operating system tools stop that process. The following85+example shows that process id 6847 is using port 5000.86+87+.. tabs::88+89+ .. group-tab:: Linux/Mac90+91+ .. code-block:: text92+93+ $ netstat -nlp | grep 500094+ tcp 0 0 127.0.0.1:5000 0.0.0.0:* LISTEN 6847/python95+96+ .. group-tab:: Windows97+98+ .. code-block:: text99+100+ > netstat -ano | findstr 5000101+ TCP 127.0.0.1:5000 0.0.0.0:0 LISTENING 6847102+103+MacOS Monterey and later automatically starts a service that uses port104+5000. To disable the service, got to System Preferences, Sharing, and105+disable "AirPlay Receiver".106+107+108 Lazy or Eager Loading109 ~~~~~~~~~~~~~~~~~~~~~110 111 When using the ``flask run`` command with the reloader, the server will39 unmodified lines