Skip to content
Myr

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

4 files+56 added−0 removed

modified:docs/tutorial/factory.rst+5 added
175 unmodified lines
176Visit http://127.0.0.1:5000/hello in a browser and you should see the177"Hello, World!" message. Congratulations, you're now running your Flask178web application!179180If another program is already using port 5000, you'll see181``OSError: [Errno 98]`` or ``OSError: [WinError 10013]`` when the182server tries to start. See :ref:`address-already-in-use` for how to183handle that.184185Continue to :doc:`database`.
modified:docs/cli.rst+5 added
101 unmodified lines
102 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.105106If another program is already using port 5000, you'll see107``OSError: [Errno 98]`` or ``OSError: [WinError 10013]`` when the108server tries to start. See :ref:`address-already-in-use` for how to109handle that.110111112Open a Shell113------------114115To explore the data in your application, you can start an interactive Python
544 unmodified lines
modified:docs/quickstart.rst+5 added
81 unmodified lines
8283Now head over to http://127.0.0.1:5000/, and you should see your hello84world greeting.8586If another program is already using port 5000, you'll see87``OSError: [Errno 98]`` or ``OSError: [WinError 10013]`` when the88server tries to start. See :ref:`address-already-in-use` for how to89handle that.9091.. _public-server:9293.. admonition:: Externally Visible Server94
849 unmodified lines
modified:docs/server.rst+41 added
62 unmodified lines
63 you should prefer setting the development environment as shown64 above.656667.. _address-already-in-use:6869Address already in use70~~~~~~~~~~~~~~~~~~~~~~7172If another program is already using port 5000, you'll see an ``OSError``73when the server tries to start. It may have one of the following74messages:7576- ``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``7980Either identify and stop the other program, or use81``flask run --port 5001`` to pick a different port.8283You can use ``netstat`` to identify what process id is using a port,84then use other operating system tools stop that process. The following85example shows that process id 6847 is using port 5000.8687.. tabs::8889 .. group-tab:: Linux/Mac9091 .. code-block:: text9293 $ netstat -nlp | grep 500094 tcp 0 0 127.0.0.1:5000 0.0.0.0:* LISTEN 6847/python9596 .. group-tab:: Windows9798 .. code-block:: text99100 > netstat -ano | findstr 5000101 TCP 127.0.0.1:5000 0.0.0.0:0 LISTENING 6847102103MacOS Monterey and later automatically starts a service that uses port1045000. To disable the service, got to System Preferences, Sharing, and105disable "AirPlay Receiver".106107108Lazy or Eager Loading109~~~~~~~~~~~~~~~~~~~~~110111When using the ``flask run`` command with the reloader, the server will
39 unmodified lines