I'm using the open source OPC UA client/server implementation of Eclipse Milo. I got a S7-1500 Siemens PLC configurated with a IP address, Port number and Urn name.
To test the Milo Client ReadExample I changed the server configuration settings so that instead of making it's own default server it would connect to the Siemens PLC.
I did but instead of seeing and reading from the PLC it gives an exception.
The ReadExample is running through the ClientExampleRunner where the configuration of the server is called. I first cleaned the project and after that I only runned the ReadExample
Only now after some instruction I commented the calls to the ExampleServer, where the configuration is made, out and changed the endpoint to the address of the PLC.
Don't forget to comment out the exampleServer.shutdown().get() at the end because it will give you an error.
Related
I'm trying to connect to OPC UA Server which is located over local intranet, though the OPC Server is exposing the Computer Name as a hostname when trying to connect through the given IP address and eventually error out as hostname can't be resolved.
While on the other side, Prosys OPC UA Client can successfully connect to it. I'm currently using Eclipse Milo, but would like to understand how other clients connect to IP Address rather than the hostname while I couldn't?
Asked and answered here: Java OPC-UA Client Eclipse Milo endpoint URL changes to localhost
Instead of using the sample code in that post there is now a helper method in EndpointUtil.updateUrl that you can use.
I tried to clean up the ReadExample mini project for client repository from Milo OPC, and for endpoint i put the PLC ip address.
But there was no port in the plc configuration that i could configure.
When i do not specify a port, it says i cannot open a port to it.
If i specify a port, it says connection refused by the machine.
Is it possible to connect the client to the plc? or was i just hoping?
Also, i did remove the server part from the example, as stated in some other questions here about this subject.
Does the PLC have an embedded OPC UA server? Have you tried the default port 4840 yet?
During our development I've been running a V5.19 Kepware Server with UA access. This has been working fine until our Server machine (Windows 7) suddenly restarted. Now none of our applications can connect via UA - BadRequestTimeout error is returned. DA access is OK, it's just the UA clients that cannot connect.
I've done the usual Google and no useful information is returned other than telling me what the numerical value of the error code is, which I already knew.
The UA configuration of the server looks fine - i.e. it hasn't changed. None of the clients have changed.
Can someone please shed some light on this?
Thanks
Steve
The Server's UA Configuration had Trusted Server and Trusted Client entries (both of which were unnecessary).
I removed both of these and suddenly UA connections were allowed.
Not sure why removing these made any difference - these had been in place for a long time, when the server was initially installed.
I have a server written on C++ REST SDK.
There's http_listener which listens to "http://localhost:34568".
When I try to send a request in browser or from the client to localhost it works fine and I get the responses from my server. But the point is to use the application in network. And here where the problem comes.
When I try to request the server from the other PC using IP(192.168.1.103:34568) I get "HTTP Error 400. The request hostname is invalid."
I'm aware that that could be some firewall issues but it's turned off. Also I tried to set port rules in brandmauer and it didn't help.
And even more! I got XAMPP running Apache server and when I do the same thing but with (192.168.1.103:80) I do get the response from Apache and have an access.
Anybody had something similar or somebody knows what the problem is about?
Listen to local ip address or to your network name (dns):
"http://xxx.xxx.xxx.xxx:34568" or
"http://your_network_name:34568"
So, if you have multiple network adapters, you can choose which one.
I have a Gwan server set up at home on my Arch Linux box. I'm running "motion". I have a router that, of course, handles my external IP address.
I want to access the avi movie shorts generated by motion through port 1000 which is port forwarded through my router to the box on my internal network. I've written an event_end script that copies these motion videos to my Gwan "Document Root". I've set the particular directory up according to the Gwan docs and can see these videos using the external ip address:1000 just fine when I'm at home. But when I click on the very same link from the machine at my office, I get this error message in Firefox: "Firefox can't establish a connection to the server at 99.99.99.99:1000.".
So I don't understand why I can see that link when I'm at home but not from anyplace else. What setting have I missed?
Thanks.
Are you sure that your firewall at work allows traffic on port :1000 at all?
port 1000 which is port forwarded through my router to the box on my internal network [at home]... but I get an error "Firefox can't establish a connection to the server at 99.99.99.99:1000" [from my office].
As Pete noticed, this sounds like a routing error.
As the HTTP client, Firefox, cannot even establish a connection, the problem happens before G-WAN can do anything.
while I was using quickserve, I could view those videos just fine while using port:1000
...probably from your private network at home, and not from your office.
If quickserve was available from your office then, since then, you have messed with the router port mapping OR with the G-WAN listener (hence the connection failure).
Unfortunately, since G-WAN won't receive anything until you get this right, its log files won't help.
And as you do not provide any information about your port mapping and G-WAN listener, we can't help you to spot obvious errors.
Note that this issue is a system configuration problem and has little to do with the G-WAN application server itself (remember that Stackoverflow is a Q&A site for developers). The Serverfault site might be a better place to discuss your problem.