Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6699309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:40:49+00:00 2026-05-26T06:40:49+00:00

For a class project I’m trying to do some socket programming Python but running

  • 0

For a class project I’m trying to do some socket programming Python but running into a very basic issue. I can’t create a TCP connection from my laptop to a lab machine. (Which I’m hoping to use as the “server”) Without even getting into the scripts I have written, I’ve been simply trying interpreter line commands with no success. On the lab machine (kh4250-39.cselabs.umn.edu) I type the following into Python:

from socket import *
sock = socket()
sock.bind(('', 8353))
sock.listen(5)
sock.accept()

And then on my laptop I type:

from socket import *
sock = socket()
sock.connect(('kh4250-39.cselabs.umn.edu', 8353))

At which point both machines block and don’t do anything until the client times out or I send a SIGINT. This code is pretty much exactly copied from examples I’ve found online and from Mark Lutz’s book Programming Python (using ” for the server host name apparently uses the OS default and is fairly common). If I run both ends in my computer and use ‘localhost’ for the hostname it works fine, so I suspect it’s some problem with the hostnames I’m using on one or both ends. I’m really not sure what could be going wrong on such a simple example. Does anyone have an idea?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:40:49+00:00Added an answer on May 26, 2026 at 6:40 am

    A good way to confirm whether it’s a firewall issue or not is to perform a telnet from the command-line to the destination host in question:

    % telnet kh4250-39.cselabs.umn.edu 8353
    Trying 128.101.38.44... 
    

    And then sometime later:

    telnet: connect to address 128.101.38.44: Connection timed out
    

    If it just hangs there at Trying and then eventually times out, chances are the connection to the remote host on that specific port is being blocked by a firewall. It could either be at the network layer (e.g. a real firewall or a router access-list) or at the host, such as iptables or other host-based filtering mechanisms.

    Access to this lab host might only be available from within the lab or the campus network. Talk with your professor or a network administrator or someone “in the know” on the network to find out for sure.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to write a basic RSS reader for a class project. Our book
class Project(models.Model): categories = models.ManyToManyField(Category) class Category(models.Model): name = models.CharField() now, i make some
I've included the necessary assemblies into a Windows Class project in VS2008. When I
I've been working on my final programming class project, and I am stuck right
I want to store some data from structures like this: class Project { ChildA
I had a class project consisting in programming a swype-like. I had to do
I'm currently working on a class project, and we're doing a basic implementation of
I am trying to deploy my class project as web service on glassfish. I
I'm using the SQLAlchemy Python ORM in a Pylons project. I have a class
I have a LINQ generated class called Project. I wanted to add some attributes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.