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
LVL 4
Stephen KairysTechnical Writer - ConsultantAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gerwin Jansen, EE MVETopic Advisor Commented:
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
Stephen KairysTechnical Writer - ConsultantAuthor Commented:
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
awawadaCommented:
Windows Firewall is default on (since XP). Are you in a corporate Environment?
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

Gerwin Jansen, EE MVETopic Advisor Commented:
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.
Stephen KairysTechnical Writer - ConsultantAuthor Commented:
@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
Gerwin Jansen, EE MVETopic Advisor Commented:
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.
Stephen KairysTechnical Writer - ConsultantAuthor Commented:
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
Gerwin Jansen, EE MVETopic Advisor Commented:
No problem, take your time ;)
Stephen KairysTechnical Writer - ConsultantAuthor Commented:
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.

WIn8.1 Firewall Settings
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
Gerwin Jansen, EE MVETopic Advisor Commented:
>> 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?
Stephen KairysTechnical Writer - ConsultantAuthor Commented:
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.
Gerwin Jansen, EE MVETopic Advisor Commented:
Looking at your error message again, what kind of blog system is this? It is using mongodb - that seems to use port 27017 locally.

Your database is probably not running or is having an issue that causes the python application to fail. Can you restart the database or find in it's log anything pointing to a database issue?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Stephen KairysTechnical Writer - ConsultantAuthor Commented:
YES!
That's it! The blog uses MongoDB. I had forgotten to start MONGOD.EXE.  Great catch!

Thank you for your help!
Steve
Gerwin Jansen, EE MVETopic Advisor Commented:
You're welcome ;)

No firewall issue after all, which is good to know as well...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 8

From novice to tech pro — start learning today.