Link to home
Start Free TrialLog in
Avatar of Stephen Kairys
Stephen KairysFlag for United States of America

asked on

Windows 8.1: Problem connecting to port 8082

Hi,

I have a Python app. it's a blog that access a web page via port 8082.  To start the application, I run it from the command prompt,
and then point my browser to:
http://localhost:8082/

The app has always worked...until today. Now, my browser is unable to connect to 8082. I see the  following. (NOTE: I am using Chrome.)
------------------------------
Error: 500 Internal Server Error

Sorry, the requested URL 'http://localhost:8082/' caused an error:

Internal Server Error
Exception:

ServerSelectionTimeoutError('localhost:27017: [Errno 10061] No connection could be made because the target machine actively refused it',)
Traceback:

Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\bottle.py", line 862, in _handle
    return route.call(**args)
  File "C:\Python27\lib\site-packages\bottle.py", line 1732, in wrapper
    rv = callback(*a, **ka)
  File "M:\MongoDB University\Blog\blog.py", line 54, in blog_index
    l = posts.get_posts(10)
  File "M:\MongoDB University\Blog\blogPostDAO.py", line 87, in get_posts
    for post in cursor:
  File "C:\Python27\lib\site-packages\pymongo\cursor.py", line 977, in __next__
    if len(self.__data) or self._refresh():
  File "C:\Python27\lib\site-packages\pymongo\cursor.py", line 914, in _refresh
    self.__codec_options))
  File "C:\Python27\lib\site-packages\pymongo\cursor.py", line 822, in __send_message
    **kwargs)
  File "C:\Python27\lib\site-packages\pymongo\mongo_client.py", line 804, in _send_message_with_response
    server = topology.select_server(selector)
  File "C:\Python27\lib\site-packages\pymongo\topology.py", line 113, in select_server
    server_selection_timeout))
  File "C:\Python27\lib\site-packages\pymongo\topology.py", line 93, in select_servers
    self._error_message(selector))
ServerSelectionTimeoutError: localhost:27017: [Errno 10061] No connection could be made because the target machine actively refused it

Open in new window

------------------------------
I tried rebooting and while the exact error may have changed, I still can't run my app. (What you see above is the latest error.)

The only major change(s) to my computer since I last used this app are:

1. Possibly Installed a WIn8.1 update.
2. Installed SQL Server Express.

Any hints on troubleshooting/fixing? (NOTE: I see a reference to 27017 toward the bottom of the above error...could that be the issue?)

Thanks,
Steve
Avatar of Gerwin Jansen
Gerwin Jansen
Flag of Netherlands image

A few things you can try:
- disable the firewall temporarily, does that change anything?
- on a cmd prompt type: netstat -a and see if something is listening on the 8082 port
- do a system restore before the moment you noticed your application stopped working
Avatar of Stephen Kairys

ASKER

Gerwin,

OK.
Per your remarks:
1. I do not think I have a firewall. I never installed one.

2. Please see attached. Which column would I check?

3. I had not used the application in over a week, so I could not say when the problem started. And I'd rather not restore that far back.

Also, I have the same problem for 8083.

Thanks,
Steve
netstat-20151121-1835.txt
Avatar of awawada
awawada

Windows Firewall is default on (since XP). Are you in a corporate Environment?
You should check the 2nd and 4th column for :8082 and LISTENING - you don't have that combination, so nothing is blocking that port (or 8083).

I don't assume a corporate env because your machine is named after you with the word home in it ;)

You can try disabling the firewall in the Windows control panel, if that fixes your issue then you need to add a rule to your firewall to allow your python program.
@Awawada:
I'm in a home environment.

@Gerwin:
OK, I'll disable the firewall when I get a chance. But, for safety's sake, I'll disconnect my modem first.
Question: How would I add the rule for my Python program to the firewall?

Thanks, everyone! :)
Steve
There are several guides available, this is the MS official one: http://windows.microsoft.com/en-gb/windows/communicate-through-windows-firewall#1TC=windows-7

Note that the above is for Windows 7 but will work for Windows 8 as well.
Thanks again.

OK, I need to step back from this issue for a day since I see it may take a while to resolve...and I have to complete an unrelated project by day's end. (Sunday) I'll investigate these suggestions tomorrow. Thanks.

Steve
No problem, take your time ;)
OK, I tried modifying my Firewall settings on the screen below...however, when I click on the options for adding an application, or turning the firewall on/off, nothing happens.

User generated image
Could it be that I don't have permissions? I'm the only user on my system. To my knowledge, I have Admin privileges...

Thanks,
Steve
>> 1. I do not think I have a firewall. I never installed one.
Your screenshot tells me that you have McAfee Personal Firewall installed, try disabling that temporarily to see whether you can start you Python application.

You're sure you didn't install McAfee PF? Or do you maybe have some security package from your ISP maybe?
OK.
I turned off McAfee firewall, but still have the problem.

Just wondering, though, since 8082 and 8083 are LOCAL, why would the firewall(s) matter?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Gerwin Jansen
Gerwin Jansen
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
YES!
That's it! The blog uses MongoDB. I had forgotten to start MONGOD.EXE.  Great catch!

Thank you for your help!
Steve
You're welcome ;)

No firewall issue after all, which is good to know as well...