> How would this conversion take place? Localhost is 127.0.0.1.
> Localhost6 is ::1. They are different
My configuration file “/etc/hosts” provides the following information
as usual.
“…
::1 localhost ipv6-localhost ipv6-loopback
…”
> and you cannot route between the two.
I got o
>> How would like to explain the error message “socket.gaierror: [Errno -9]
>> Address family for hostname not supported” on my Linux test system then?
>
> Can you supply a tiny standalone piece of code demonstrating this error
> please?
The following script part would be relevant.
…
def send_da
>> How would like to explain the error message “socket.gaierror: [Errno -9]
>> Address family for hostname not supported” on my Linux test system then?
>
> Can you supply a tiny standalone piece of code demonstrating this error
> please?
The following script part would be relevant.
…
def send_da
> "Handled transparently" means that an ipv6 server can handle connections
> from ipv4 clients without doing anything special.
It is nice if this conversion is working.
> They just appear to come from a specific IPv6 address range.
I got expected connections by my small script “socket-send_test
> It looks like the service isn't listening at the time the so.connect is
> called.
* I get an other impression from the programs “/usr/bin/netstat” and
“/usr/bin/ss”.
* The data transmission seems to work also for my small script
“socket-send_test_data1.tcl”
(even when the identification “:
> Which specific information in that man page contradicts what I wrote?
We can agree that the mentioned IP addresses are distinct.
But the corresponding functionality should be equivalent.
> If you think of
>
> | IPv4 connections can be handled with the v6 API by using the
> | v4-mapped-on-v6 ad
>> I would expect that the IPv4 address from such a connection attempt
>> would be automatically converted to a IPv6 loopback address.
>
> You haven't said which OS you are using, but as far as I know this
> expectation will be frustrated at least on Linux: There ::1 and
> 127.0.0.1 are distinct ad
>> connect(3, {sa_family=AF_INET, sin_port=htons(37351),
>> sin_addr=inet_addr("127.0.0.1")}, 16) = -1 ECONNREFUSED (Connection refused)
>
> Without seeing the code, I'd be suspicious of that difference.
I would expect that the IPv4 address from such a connection attempt
would be automatica
> Also, it can be very useful to strace the client process, eg:
Do you find the following background information more helpful
for the desired clarification of unexpected software behaviour?
elfring@Sonne:~/Projekte/Python> LANG=C strace -e trace=network
/usr/bin/python3 socket-send_json_data.py
> Well, providing minimal code samples that produce the problem would be
> a start.
I prefer an other approach to clarify relevant software configuration
differences.
> Otherwise we are just guessing...
I can offer other data before.
> Maybe you have a firewall problem.
I hope
Hello,
I can start a service as desired.
elfring@Sonne:~/Projekte/Bau/C++/test-statistic-server1/local>
./test-statistic-server2 & /usr/bin/ss -t -l -p -H|grep test
[1] 8961
waiting for connections
server_id: localhost
server_port: 35529
LISTEN 0 123 [::1]:35529
> The file name for the client script is passed by a parameter to a command
> which is repeated by this server in a loop.
> It is evaluated then how often a known record set count was sent.
In which time ranges would you expect the receiving of the complete JSON data
which were sent by the child p
>> I get an other impression from the statements “self._threads.append(t)”
>> (process_request)
>> and “thread.join()” (server_close).
>
> Okay -- v3.7 has added more logic that didn't exist in the v3.5 code
> I was examining... (block_on_close is new).
Thanks for such a version comparison.
> socketserver threading model is that the main server loops waiting for
> connection requests, when it receives a request it creates a handler thread,
This data processing style can be generally fine as long as you would like
to work without a thread (or process) pool.
> and then it completely
> Nowadays, I develop typically web applications.
> There, something similar to "CORBA" is used: WSDL described
> "web services". Typically, they use the web infrastructure
> and its protocols ("http", "https") for communication.
The popularity varies for these programming interfaces over time.
*
> Nowadays, I develop typically web applications.
> There, something similar to "CORBA" is used: WSDL described
> "web services". Typically, they use the web infrastructure
> and its protocols ("http", "https") for communication.
The popularity varies for these programming interfaces over time.
*
> And in addition, you can derive your own class from `socketserver`
> and override methods to provide whatever additional functionality
> you think is necessary.
Such a programming possibility remains generally.
I am curious if the software development attention can be adjusted
also in this area.
>>> Server.shutdown() sets a flag that tells the main server to /stop
>>> accepting new requests/.
>>
>> Can it be that this method should perform a bit more resource management
>> (according to the selected configuration like “socketserver.ThreadingMixIn”)?
>>
> There isn't much more it
> If you have a multi-threaded application and you want to be on
> the "safe side", you always use your own locks.
I suggest to reconsider your software expectations around
the word “always”.
There are more software design options available.
> Python uses locks to protect its own data structures
> Server.shutdown() sets a flag that tells the main server to /stop
> accepting new requests/.
Can it be that this method should perform a bit more resource management
(according to the selected configuration like “socketserver.ThreadingMixIn”)?
> So far as I can tell, for a threaded
> I suggested UDP as a TEST, not for the end use...
I can understand such a suggestion.
Can it distract from other software surprises?
> If UDP gives you the results you expect, it most likely means there is a
> problem
There is a questionable software behaviour still waiting for a prope
> In any multi-threaded application, you must be carefull when
> accessing (and especially modifying) shared (e.g. "global") objects.
> In general, you will need locks to synchronize the access.
I agree to this general view.
> Appending to a list (and some other elementary operations
> on Python
>> An instance for the class “threaded_TCP_server” and a call of
>> “subprocess.run(…)”.
>>
> And how many connections does the subprocess make?
A new TCP connection is performed with the information from the passed
parameters
for each call of the function “sendall”. The test command will
>> May I expect that data were completely received from clients and accordingly
>> processed by the request handler in the started threads after
>> the statement “server.shutdown()” was sucessfully executed?
>
> Python delegates those low level services to the underlaying
> network library, which l
> For the truly lazy, we have hash links.
Thanks for your reminder.
> https://docs.python.org/3/library/socketserver.html#socketserver.BaseServer.allow_reuse_address
The relationship of this class attribute with the identifier (or option)
“SO_REUSEADDR”
might become easier to find.
The use of
> https://docs.python.org/3.4/library/socketserver.html
> about the middle of the page...
It seems that you would like to refer to an other document.
https://docs.python.org/3/library/socket.html#socket-example
Under which circumstances will the execution of the method “socket.setsockopt”
b
> Why not provide them so that anyone trying to analyze what you are
> seeing can try them for themselves.
I assume that an other information system can be more appropriate
for file distribution than this mailing list.
> Starting a full process takes time
This is usual. - Such an ac
> https://docs.python.org/3/library/socketserver.html#asynchronous-mixins
I have constructed a pair of small scripts for another test.
A command (which refers to the second Python script) is executed 100 times
by “subprocess.run()” with parameters so that the child process can send six
test record
> https://docs.python.org/3/library/socketserver.html#asynchronous-mixins
An example is provided also in this software documentation.
May I expect that data were completely received from clients and accordingly
processed by the request handler in the started threads after
the statement “server.shu
> If your server listens on a random port how does the client know
> which port to connect to?
I am fiddling also with the data processing variant that such connection
properties are passed as parameters for a command which is executed
as a child process so that desired data can be sent back to it
> You'll get anything in the ephemeral ports range.
From which documentation source did you get this information for
the handling of a zero as an useful setting?
> But the other cause is that you recently shut the server down,
> and the port is still in the TIME_WAIT state.
Does this technical
> In Python, there's a certain amount of support. You can attempt to
> bind to a port, and if you fail, try the next one in a sequence.
* The zero seems to be also an usable parameter here.
Is the system configuration documentation unclear about the applied
value range for the port allocation?
> * Which challenges from inter-process communication should be taken better
> into
> account for the involved programming interfaces (because of
> multi-threading)?
I would like to clarify another recurring challenge with network configuration.
A port number should be selected somehow for the
> Does this mean that the second number in a listing like the above
> should be approximatively equal?
The expectation (or hope) was that an identical number of record sets
would be available for each loop iteration in such a data processing approach
by the server.
But the reality is different for
> The file name for the client script is passed by a parameter to a command
> which is repeated by this server in a loop.
Additional explanations can be helpful for the shown software situation.
> It is evaluated then how often a known record set count was sent.
It was actually determined for a
Hello,
I constructed another multi-threaded TCP server for my needs
(based on the available software documentation).
https://docs.python.org/3/library/socketserver.html#asynchronous-mixins
I constructed also a corresponding script which should send nine record sets
(which get extracted from a sim
36 matches
Mail list logo