I'm trying to configure a Client server interface for 3 operations in AUTOSAR 4.2 using EB tresos tool.
I have configure the required P and R ports in the in Server and Client respectively.
I have created 3 runnables and Operation invoked event for Server and CS interface in Client.
error 1: Im getting an issue that the runnable in server component refer to R port in Client and that its only valid if runnable and R port are in the same component.
error 2: If I put the runnables and Operation invoked event in the Client I get the error that the P port in the server points to an interface not mapped by any operation invoked event
Any one have an idea on how to
Steps required:
If not already done, create a Port Interface having the three operations
If not already done, add two Software Components
Add a Runnable to the Software Component intended to be the server
Add a (Provider/ Server) Port Prototype to the Software Component intended to be the server, typed by the Port Interface
Add a Operation Invocation Event to trigger the Runnable when an Operation on the Port gets called
I guess, but I am not sure right now, whether you also have to add a Port Access for the Runnable to the Port Prototype, or whether this happens implicitly/ automatically
Add a Runnable to the Software Component intended to be the server or select an existing one, which is intended to use the (Receiver/ Client) Port Prototype
Add a (Receiver/ Client) Port Prototype to the Software Component intended to be the client, typed by the Port Interface
Add a Port Access to this Runnable, so it is allowed to use the Port Prototype
Related
VB.NET Server Does Not Receive Connection Requests from Remote Clients
A VB.NET server application does not see connection requests from another client on the network (i.e. with a different IP address). However, it does see connection requests from the client application running on the same computer as the server.
The listening socket is created with the following parameters
System.Net.Sockets.AddressFamily.InterNetwork
System.Net.Sockets.SocketType.Stream
System.Net.Sockets.ProtocolType.IP
We have experimented with the preceding without success.
The endpoint to which the listening socket is bound specifies the local IP address and a specific port number.
The wait-for-connection code is textbook asynchronous:
thelistener.Listen(10)
thelistener.BeginAccept(New System.AsyncCallback(AddressOf targetofaccept), thelistener)
If the client that attempts connection is on the same computer as the listener, then targetofaccept is run successfully. If the client that attempts connection is on some other computer on the network, then targetofaccept is not run.
The behavior occurs for any other client on the network (i.e., not just one).
Thinking that there was some firewall issue, we created VB6 servers and clients using the same addresses and ports. The VB6 server will receive connection requests regardless of the client system.
There is no other issue with communication between clients and the server, as far as we can see. The network architecture has not been modified for a number of years.
We are debugging the code as a VB.NET console application.
Any tips on how to diagnose appreciated.
Before calling Listen() you need to bind your listener socket to the address 0.0.0.0 (in .NET IPAddress.Any) so that it listens to connections from any IP address.
This can be done using the Socket.Bind() method:
Dim listenerEndpoint As New IPEndPoint(IPAddress.Any, <your port>)
thelistener.Bind(listenerEndpoint)
thelistener.Listen(10)
Thank you.
Issue WAS firewall. Fixed by finding exact location of the IDE (devenv.exe), opening "Windows Firewall" in the control panel, selecting "Allow a program or feature through firewall", selecting "Allow another program...", browsing to the exact location and selecting the executable, then ensuring "Home/Work (Private)" column is checked for that "Name".
I have a client-server setup, a module SomethingApp.exe implementing IDL defined interface ISomething lives on the server; in addition SomethingPS.dll is created by the IDL compiler as a stub for ISomething
I access ISomething from a remote client PC, which runs up SomethingApp.exe on the server. My understanding is that all the COM registry stuff in this scenario belongs on the server, is that right? i.e. the proxy stub does not need to be distributed/registered on the client PC, because the implementation is not on that PC?
The proxy stub does need to be installed on the client PC - it's this proxy that exposes the ISomething interface to be called by the code on the client. If it's not registered on the client PC the client code won't know what to call and you'll get an exception.
We have a similar set up here - server side COM+ applications that we export to proxies and install on client machines. Without the proxy being installed on the client it doesn't work.
Edit: I see now you've edited that SomethingPS.dll is the proxy stub you've created using the IDL compiler. I believe that this should be installed on the client machine.
My requirement is
I have two machines, client and server. On server ONLY one port is open (which should not be JNDI port). Client needs reference of EJB remote objects which are deployed in Server, so that it can call methods on those EJB objects.
Here I am planning for RMI communication between client and server on the open port on Server. Upon getting the call server will return the EJB3 object to the client.
Here are my questions
Does RMI allow to return remote EJB3 references to client?
If yes, once EJB reference forwarded to the client, if client calls a method in remote EJB, using which port this communication takes place? Becausue only one port open on server ?
Here is it fine to go with RMI or EJB can be used as communication? I have searched in net, but its not possible to bind an EJB to a port.
Can RMI application deployed in Glassfish?
Thanks
Dek
Does RMI allow to return remote EJB3 references to client?
Yes.
If yes, once EJB reference forwarded to the client, if client calls a method in remote EJB, using which port this communication takes place?
Whichever Piet the EJB is exported on.
Becausue only one port open on server?
Eh?
Here is it fine to go with RMI or EJB can be used as communication?
They are the same thing. The question is meaningless.
I have searched in net, but its not possible to bind an EJB to a port.
That depends on a lot of things such as whether you're using RMI/IIOP and possibly in the specific container.
Can RMI application deployed in Glassfish?
Yes.
I'm planning on using a wsDualHttpBinding for a WCF service with callbacks. The clients will be a windows form application communicating to the service over the internet. Obviously I have no control over the firewall on the client side, so I'm wondering what is the proper way to set the ClientBaseAddress on the client side?
Right now in my intiial testing I'm running the service and client on the same pc and i am setting the binding as follows
Dim binding As System.ServiceModel.WSDualHttpBinding = Struct.Endpoint.Binding
binding.ClientBaseAddress = New Uri("http://localhost:6667")
But I have a feeling this won't work when deploying over the internet because "localhost" won't translate to the machine address (much less worrying about NAT translation) and that port might be blocked by the clients firewall.
What is the proper way to handle the base address for callbacks to a remote client?
some one tell me if i do not specify ClientBaseAddress then WCF infratructure creates a default client base address at port 80 which is used for the incoming connections from the service. Since port 80 is usually open to firewalls, things should just work.
so just tell me when win form wcf client apps will run then how can i open my custom port like "6667" and also guide me what library or what approach i should use as a result response should come from client side router
to pc and firewall will not block anything. please discuss this issue with real life scenario how people handle this kind of situation in real life. thanks
The proper way is to use TCP transport instead of HTTP transport. Duplex communication over HTTP requires two HTTP connections - one opened from client to server (that's OK) and second opened from server to client. This can work only in scenarios where you have full control over both ends. There is simply too many complications which cannot be avoided just by guessing what address to use like:
Local Windows or third party firewall has to be configured
Permission for application to run - listening on HTTP is not allowed by default unless UAC is turned off or application is running as admin. You must allow listening on the port through netsh or httpcfg (windows XP and 2003) - that again requires admin permissions.
Port can be already used by another application. In case of 80 it can be used by any local web server - for example IIS.
Private networks and network devices - if your client machine is behind the NAT the port forwarding must be configured but what if you have two machines running your application on the same private network? You cannot forward from the same incoming port to two machines.
All these issues can be avoided mostly only when you have control over whole infrastructure. That is the reason why HTTP duplex communication is useful mostly for intranet scenarios and why for example Silverlight offers another implementation where the second connection is not created and Silverlight client instead polls server continuously to check if there is any callback available.
TCP transport requires only single connection from client to server because TCP protocol is natively duplex so the server can call back the client through the same connection. When you deploy a public service you usually have control over infrastructure on the server side so you can make necessary changes in configuration to make it work.
I think this also answers your previous question.
Not sure if i'm really up-to-date, but i'm looking in a way to convert my existing project to use HTML5 websockets.
Here's my situation :
- Client runs a modified java vnc applet with extra parameter (CONNECT).
- Modified stunnel listenin on webserver (with both public, private IP) port 443
- Client connects to 443 and sends (prior to RFB) a HTTP packet like :
'CONNECT 10.0.0.1:4001'
- Stunnel opens a new stream to 10.0.0.1:4001 using SSL wrapper
- VNC Server (#10.0.0.1:4001) responds, connection is established.
Now I want to get rid of the Java Applet and switch to Websocket using NoVNC.
I want to be able to :
- Open a single port on the webserver (HTTPS preferably)
- Have client connect using HTML5 only (no more java applet)
I cannot change :
- VNCServer will still be listening on private LAN only.
- VNCServer will still listen to a bunch of ports, each corresponding to
a virtual server
Questions are :
- How to give NoVNC the notion of target HOST:PORT ?
- Is stunnel still be usable ? Or should I change to websocket proxy ?
If anyone has a starting point, i'd really appreciate !
Disclaimer: I created noVNC so my answer may be heavily biased ;-)
I'll answer you second question first:
stunnel cannot be used directly by noVNC. The issue is that the WebSockets protocol has an HTTP-like initial handshake and the messages are framed. In addition, until binary payload support is added to WebSockets, the payload is base64 encoded by the websockets proxy (websockify). Adding the necessary support to stunnel would be non-trivial but certainly doable. In fact noVNC issue #37 is an aspirational feature to add this support to stunnel.
First question:
noVNC already has a concept of HOST:PORT via the RFB.connect(host, port, password) method. The file vnc_auto.html at the top level shows how to get noVNC to automatically connect on page load based on the host, port and password specified as URL query string parameters.
However, I think what you are really asking is how do you get noVNC to connect to alternate VNC server ports on the backend. This problem is not directly addressed by noVNC and websockify. There are several ways to solve this and it usually involves an out-of-band setup/authorization mechanism so that the proxy can't be used to launch attacks by arbitrary hosts. For example, at my company we have a web based management framework that integrates noVNC and when the user wants to connect to the console, an authenticated AJAX call is used to configure the proxy for that particular user and the system they want to connect to. Our web management interface is internal only.
Ganeti Web Manager uses a similar model and the source is available. They have a fork of VNCAuthProxy that has WebSockets support. They use a control channel from the web interface to the VNCAuthProxy to setup a temporary password associated with a specific VNC server host:port.
Also OpenStack (Nova) integrates noVNC uses a similar out-of-band token based model to allow access with their nova-vncproxy.
Some links:
Ganeti Web Manager
Wiki page about how noVNC works in Ganeti Web Manager
Ganeti Web Manager sources
Ganeti Web Manager VNCAUthProxy sources
Using noVNC in Nova/OpenStack
OpenStack fork of noVNC
Old nova-vnc-proxy code
Current nova vnc proxy code