From 18ba20e1c242dc39341b82ea4acc8eca85c1fd14 Mon Sep 17 00:00:00 2001 From: mynamewastaken Date: Fri, 17 Jan 2014 23:10:28 -0600 Subject: [PATCH] Fixed code block formatting --- troubleshooting_101.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/troubleshooting_101.rst b/troubleshooting_101.rst index 9b8578f..93c34e4 100644 --- a/troubleshooting_101.rst +++ b/troubleshooting_101.rst @@ -75,16 +75,20 @@ Cannot bind to socket There are two common reasons that you can't bind to a socket: the port is already in use, or you don't have permission. As an example, you can see what happens when I try to start a Python -SimpleHTTPServer on a port that is already in use:: +SimpleHTTPServer on a port that is already in use: - python -m SimpleHTTPServer 8080 +.. code-block:: console + + user@opsschool ~$ python -m SimpleHTTPServer 8080 ... socket.error: [Errno 98] Address already in use Here's an example of what happens when I try to bind to a privileged port -without proper permissions (in Linux, ports < 1024 are privileged):: +without proper permissions (in Linux, ports < 1024 are privileged): - python -m SimpleHTTPServer 80 +.. code-block:: console + + user@opsschool ~$ python -m SimpleHTTPServer 80 ... socket.error: [Errno 13] Permission denied