simple echo server

  • Thread starter Haris Bogdanovic
  • Start date
H

Haris Bogdanovic

I'm trying to implement chess server program so I started by
implementing simple echo server.
When client is trying to connect to the server everything works fine but
when server tries to echo what it receieved from client I get access
denied error.
Why is that happening ?
(I put my server.py under ("m-net.arbornet.org") my user account. Is
this the right place to put server program or is there a place on the
Net where such applications are welcome ? )

Thanks
Haris
 
I

Irmen de Jong

Haris said:
When client is trying to connect to the server everything works fine but
when server tries to echo what it receieved from client I get access
denied error.
Why is that happening ?

Because the server has no access?

No really-- you have to give much more detailed information.
Preferrably the exact code fragment and exact error message
that you're getting.

--Irmen
 
H

Haris Bogdanovic

Irmen said:
Because the server has no access?

No really-- you have to give much more detailed information.
Preferrably the exact code fragment and exact error message
that you're getting.

--Irmen
It's the example from python docs (socket section). If you have
somewhere your personal user account you can try it aswell.
Tell me what you managed to do.

Thanks
Haris
 
H

Haris Bogdanovic

Irmen said:
Because the server has no access?

No really-- you have to give much more detailed information.
Preferrably the exact code fragment and exact error message
that you're getting.

--Irmen
It's the example from python docs (socket section). If you have
somewhere your personal user account you can try it aswell.
Tell me what you managed to do.

Thanks
Haris
 
H

Haris Bogdanovic

Irmen said:
Because the server has no access?

No really-- you have to give much more detailed information.
Preferrably the exact code fragment and exact error message
that you're getting.

--Irmen
It's the example from python docs (socket section). If you have
somewhere your personal user account you can try it aswell.
Tell me what you managed to do.

Thanks
Haris
 
I

Irmen de Jong

This was *important*:

Now, where is this extra information?
It's the example from python docs (socket section). If you have
somewhere your personal user account you can try it aswell.
Tell me what you managed to do.

I managed to get it to work just fine.

And what do you mean with 'have your personal user account' ????

--Irmen
 
H

Haris Bogdanovic

Irmen said:
This was *important*:



Now, where is this extra information?



I managed to get it to work just fine.

And what do you mean with 'have your personal user account' ????

--Irmen
I ment telnet account. Is that the place where people normally put their
server part of the application or can I put somewhere else (is there a
common way to do this) ?

Haris
 
S

Simon Bayling

I ment telnet account. Is that the place where people normally put
their server part of the application or can I put somewhere else (is
there a common way to do this) ?

Telnet account to what?
You can put it anywhere you can run Python code on an operating system
with TCP/IP.

I copied the server example and ran it.
I copied the client example, altered the HOST to 127.0.0.1 and ran it.

It connected and sent/recieved "Hello, world", then finished.

Just as it should do.

Now, what error message are you getting?

-- Simon.
 
H

Haris Bogdanovic

Simon said:
Telnet account to what?
You can put it anywhere you can run Python code on an operating system
with TCP/IP.




I copied the server example and ran it.
I copied the client example, altered the HOST to 127.0.0.1 and ran it.

It connected and sent/recieved "Hello, world", then finished.

Just as it should do.

Now, what error message are you getting?

-- Simon.
It works for me fine too, when client and server execute on the same
computer (mine) but I get "access denied" error when I put server.py on
my free telnet account ("m-net.arbornet.org").
Is that the place where I should put server.py if I want to implement
chess server or is there some other common place where servers are put ?

Thanks
Haris
 
I

Irmen de Jong

Haris said:
It works for me fine too, when client and server execute on the same
computer (mine) but I get "access denied" error when I put server.py on
my free telnet account ("m-net.arbornet.org").
Is that the place where I should put server.py if I want to implement
chess server or is there some other common place where servers are put ?

It looks to me that you are behind a firewall on your 'telnet account',
i.e. you cannot access the necessary socket port(s).
Usually only a few sockets are 'open' to the outside world. Try
setting up your server to use one of these 'open' sockets or change
the firewall configuration.

--Irmen
 
A

Andrew

i beleive that the problem is that your shell is rather restrictive on
network access. i used arbornet a while ago and recall they dont allow
anonoymous non-members to do much. find another linux box (like a
friends, or your own) and try it there.

-andrew
 
H

Haris Bogdanovic

It looks to me that you are behind a firewall on your 'telnet account',
i.e. you cannot access the necessary socket port(s).
Usually only a few sockets are 'open' to the outside world. Try
setting up your server to use one of these 'open' sockets or change
the firewall configuration.

--Irmen

I removed firewall from my computer but I still get "Permission denied"
message. I'm not really an expert on firewalls so can you tell me some
things :
Does firewall works with both sides i.e. will firewall block me from
sending something from inside of remote host to my localhost ?
If that's the case how do I lookup for open ports on that remote host
through which I can send data ?

Thanks
Haris
 
H

Haris Bogdanovic

It looks to me that you are behind a firewall on your 'telnet account',
i.e. you cannot access the necessary socket port(s).
Usually only a few sockets are 'open' to the outside world. Try
setting up your server to use one of these 'open' sockets or change
the firewall configuration.

--Irmen

I removed firewall from my computer but I still get "Permission denied"
message. I'm not really an expert on firewalls so can you tell me some
things :
Does firewall works with both sides i.e. will firewall block me from
sending something from inside of remote host to my localhost ?
If that's the case how do I lookup for open ports on that remote host
through which I can send data ?

Thanks
Haris
 
P

Peter Hansen

Haris said:
I removed firewall from my computer but I still get "Permission denied"
message. I'm not really an expert on firewalls so can you tell me some
things :
Does firewall works with both sides i.e. will firewall block me from
sending something from inside of remote host to my localhost ?
If that's the case how do I lookup for open ports on that remote host
through which I can send data ?

Haris, the best way to deal with technical problems like this is to
start simple. Shut off the firewall, turn off anything else that might
interfere, and try the program. If you get the same error message(*)
you are obviously not dealing with a firewall problem, so you can
cross that off your list and move on to the next potential cause.

You should also simplify the program to the point where "it cannot
possibly fail". Make it so simple that if it doesn't work, there
is almost nothing left to blame. Usually you'll find something
laughably trivial, some tiny bug, and once you've fixed it and
proven that was the cause, you can apply the same fix to the full
(unsimplified) program and continue troubleshooting additional
problems.

Two more pieces of advice:

These are not necessarily Python problems, at least not based on your
description, so you should be working *very* hard to help those helping
you, since they are not really here to provide basic PC training or
troubleshooting for problems unrelated to Python. The participants in this
group are quite generous with their time, for the most part, but at
some point if it becomes clear that you aren't really trying, they'll
just give up.

Item two, and *this is very important*. You've been asked before,
yet still have not acted on this. You MUST provide the *actual*
error message, cut and pasted, using your mouse, from the window
where you see it, into the newsgroup posting or email message. If
you don't do this, but merely type "permission denied" over and
over, nobody will be able to help you.

Python always produces a "traceback" when a program raises an
exception, complete with line numbers and module names, showing the
failing lines in detail. If there is one, include it.

If this is not a Python traceback, but rather an operating system
error message, cut and paste the actual *command and response* that
you see in your console window. Include the prompt, include the
previous command, include anything that might help. If you don't
do this, please don't expect much help since you're forcing everyone
to guess.

-Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,169
Messages
2,570,919
Members
47,460
Latest member
eibafima

Latest Threads

Top