Comments (8)
thanks for all the bug reports. I will have a look a soon as I get 2 minutes
On Mon, 26 Oct 2015 at 09:24 jk987 [email protected] wrote:
I finally caught it (I noticed it in issue #47
#47 yesterday):http://ulozto.net/xWGF411f/test-ua2-zip
password: ua1234There is a log and pcapng. In log there is interesting time 2015-10-26
08:57:19.983. In pcapng there is interesting time 2063 with filter tcp.stream
eq 2.I have another things to do today but it seems to me that RequestResponse
and OpenSecureChannel have switched SequenceNumber. And Kepware OPC server
seems not to like it. I haven't investigate it much yet, but lock is bit
different in BinaryClient.open_secure_channel() than in
BinaryClient._send_request().—
Reply to this email directly or view it on GitHub
#48.
from python-opcua.
I tried to have a look at it but it looks there are several channels opened at the same time so it is hard to understand what is happening. Do you start several client at the same time?
from python-opcua.
Yes, usually in my app there are 4 clients at the same time. (Two devices "Channel1mc.EVA" and "Channel2mc.HC" and for each device two halves "WP1" and "WP2". In my log I often call it EVA1, EVA2, HC1, HC2.) Like I wrote, in Wireshark you should filter tcp.stream eq 2
(filter on toolbar or Menu ~ Analyze ~ Display Filters). It is the client reading tags with the name starting on "Channel2mc.HC.WP2..." (so "HC2").
It really wasn't easy to find. :)
from python-opcua.
Already 3 days I'm running my app with this modification:
def open_secure_channel(self, params):
self.logger.info("open_secure_channel")
with self._lock:
request = ua.OpenSecureChannelRequest()
request.Parameters = params
request.RequestHeader = self._create_request_header()
hdr = ua.Header(ua.MessageType.SecureOpen, ua.ChunkType.Single, self._security_token.ChannelId)
asymhdr = ua.AsymmetricAlgorithmHeader()
seqhdr = self._create_sequence_header()
future = Future()
self._callbackmap[seqhdr.RequestId] = future
self._write_socket(hdr, asymhdr, seqhdr, request)
response = ua.OpenSecureChannelResponse.from_binary(future.result(self.timeout))
response.ResponseHeader.ServiceResult.check()
self._security_token = response.Parameters.SecurityToken
return response.Parameters
and it seems to run OK for me.
But I did this modification intiutively accroding to BinaryClient._send_request() without any deeper understading the headers logic.
from python-opcua.
you are right. a lock is missing here and in close_secure_channel too. Can
you create a pull request? So you will get the immense privilege of having
your name as author :-)
On Thu, 29 Oct 2015 at 12:15 jk987 [email protected] wrote:
Already 3 days I'm running my app with this modification:
def open_secure_channel(self, params): self.logger.info("open_secure_channel") with self._lock: request = ua.OpenSecureChannelRequest() request.Parameters = params request.RequestHeader = self._create_request_header() hdr = ua.Header(ua.MessageType.SecureOpen, ua.ChunkType.Single, self._security_token.ChannelId) asymhdr = ua.AsymmetricAlgorithmHeader() seqhdr = self._create_sequence_header() future = Future() self._callbackmap[seqhdr.RequestId] = future self._write_socket(hdr, asymhdr, seqhdr, request) response = ua.OpenSecureChannelResponse.from_binary(future.result(self.timeout)) response.ResponseHeader.ServiceResult.check() self._security_token = response.Parameters.SecurityToken return response.Parameters
and it seems to run OK for me.
But I did this modification intiutively accroding to
BinaryClient._send_request() without any deeper understading the headers
logic.—
Reply to this email directly or view it on GitHub
#48 (comment)
.
from python-opcua.
Sorry, but I can't. I'm not very familiar with Git.
(I think that my little modifications don't entitle me to be named somewhere. You are doing the big job, not me. For me it is the most important that I can tell my customer that my app finally works.)
from python-opcua.
As you want but you should really learn git. It makes programming much
easier
On Thu, Oct 29, 2015, 18:34 jk987 [email protected] wrote:
Sorry, but I can't. I'm not very familiar with Git.
(I think that my little modifications don't entitle me to be named
somewhere. You are doing the big job, not me. For me it is the most
important that I can tell my customer that my app finally works.)—
Reply to this email directly or view it on GitHub
#48 (comment)
.
from python-opcua.
fixed in c4425c2
from python-opcua.
Related Issues (20)
- Getting "BadSecurityChecksFailed" every few minutes for constant read requests HOT 2
- Problem with set value in OPC UA S7-1200 HOT 7
- Unable to subscribe to datachange when using Datavalue
- UA-Client reconciliate subscription not working HOT 4
- Duplicate endpoint when restarting server
- Cannot get value from alias HOT 14
- python OPCUA package installation failed in Linux ARM32V7 HOT 4
- Continues connection to opc ua - kepserver, and flask rest api HOT 1
- Callback function or event to intercept a write request on server
- How to use method call in client with complex arguments HOT 14
- Transfer Subscription Request
- SourceTime Stamp Issue HOT 1
- My simple python server error
- Unable to change variable value to True HOT 12
- Writing variables to ABB IRC5 controller using set_value() function HOT 4
- AttributeError: 'bytearray' object has no attribute 'public_key' HOT 7
- Disconnection of server session after 1 minute-TimeoutError
- Timeout error
- How to get node value HOT 4
- Triggering DataChangeEvent Only When Variant Value Changes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-opcua.