Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental Server Branch #737

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Experimental Server Branch #737

wants to merge 1 commit into from

Conversation

danomagnum
Copy link

@danomagnum danomagnum commented Jul 3, 2024

Re-opening this pull request after working through issues and figuring out which commit I missed while rebasing previously.

Of the 86,027 lines this pull request shows, 72,368 of them are from the nodeset2.xml file that is now included to allow the server to boot-strap itself - I left it as part of the repo instead of using a script to download it at buld time or something because it is embedded. An additional 5,719 are in the Opc.Ua.Di.NodeSet2.xml file used in one of the server examples showing how to use a nodeset to create a server.

@oldmaCloud
Copy link

微信截图_20240709230908
i test demo with ua expert ,there are some errors.

@danomagnum
Copy link
Author

danomagnum commented Jul 9, 2024

Ua is such a trash over complicated protocol. Did you just run one of the examples as is?

@oldmaCloud
Copy link

yes, go mod init ua_test
go get github.com/gopcua/opcua@server
and copy examples/server/map_server and run it

@oldmaCloud
Copy link

Loading cert/key from cert.pem/key.pem
Failed to load certificate: open cert.pem: The system cannot find the file specified.
New Node Set: 2022-11-01T00:00:00Z
doing objects.
New Node Set: 2022-11-01T00:00:00Z
Duplicate reference type FromState
Duplicate reference type HasSubtype
Duplicate reference type HasModellingRule
Duplicate reference type HasDescription
Duplicate reference type ToState
Duplicate reference type HasDictionaryEntry
Duplicate reference type HasEffect
Duplicate reference type HasCondition
Duplicate reference type HasAddIn
Duplicate reference type HasTypeDefinition
Duplicate reference type HasCause
Duplicate reference type HasComponent
Duplicate reference type HasProperty
Duplicate reference type HasEventSource
Duplicate reference type Organizes
Duplicate reference type HasFalseSubState
Duplicate reference type HasInterface
Duplicate reference type HasNotifier
Duplicate reference type HasGuard
Duplicate reference type HasEncoding
Duplicate reference type HasTrueSubState
doing BaseDataType
doing root.
map namespace 1 added at index 1
map namespace 2 added at index 2
Started listening on [opc.tcp://0.0.0.0:4840 opc.tcp://localhost:4840 opc.tcp://lenovo:4840]
Press CTRL-C to exit
sessionBroker.Session: error looking up session i=1988677739
it is startup logs

@danomagnum
Copy link
Author

yes, go mod init ua_test go get github.com/gopcua/opcua@server and copy examples/server/map_server and run it

So I did this same thing and didn't have any issues (after I also go got the couple other dependencies).

Which endpoint did you try to connect to? 0.0.0.0, localhost, or the computer name?

Can you verify the specific commit in your go.mod file? Mine is require github.com/gopcua/opcua v0.5.4-0.20240703154006-81653506ce2a

Mine seems to be running without issue connected to the "localhost" endpoint.

image

image

@oldmaCloud
Copy link

github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gopcua/opcua v0.5.4-0.20240703154006-81653506ce2a h1:B7Y1cTnvuE/D5d3La6KMAHEVMN6wE7JbtRh7LauxPAg=
github.com/gopcua/opcua v0.5.4-0.20240703154006-81653506ce2a/go.mod h1:7eCsq3K5yOaYNHDxzFzNavUvuqyiBgA2pi0OYuR3VtU=
github.com/pascaldekloe/goe v0.1.1 h1:Ah6WQ56rZONR3RW3qWa2NCZ6JAVvSpUcoLBaOmYFt9Q=
github.com/pascaldekloe/goe v0.1.1/go.mod h1:KSyfaxQOh0HZPjDP1FL/kFtbqYqrALJTaMafFUIccqU=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
Mine is this

@oldmaCloud
Copy link

2

@oldmaCloud
Copy link

ua_test.zip
it is all project file

@danomagnum
Copy link
Author

I didn't have any issues running what you sent.

What OS / go version are you running?

@oldmaCloud
Copy link

go version go1.22.5 windows/amd64, windows 11

@megakoresh
Copy link

@magiconair maybe the maintainer didn't get notified

@magiconair
Copy link
Member

Sorry, this landed in my spam folder.

@magiconair
Copy link
Member

I would suggest to rebase the server branch to main and then merge this patch on top of that. I don't have the time to review the code at this point but I would also like to move this forward. Who is interested in maintaining this part of the code?

@danomagnum
Copy link
Author

Is it not rebased onto main already? I don't use rebase on any of the repos I work on so I don't know exactly what needs to be done there - server branch is showing one commit ahead of main so isn't that rebased?

I'm up for maintaining the server code in any case.

@magiconair
Copy link
Member

Ah, damn. My bad. Fixing

@magiconair magiconair changed the title Initial Server Implementation Experimental Server Branch Nov 7, 2024
@magiconair
Copy link
Member

Thank you @danomagnum. I have created a v0.5.3-server tag pointing to the head of the server branch. I've also converted the issue to a discussion. Feel free to moderate this: #749

I usually get swamped by email but if you need to get my attention ping me on Twitter or we can connect on something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants