Hilscher Community Forum
netPI Desktop java - Printable Version

+- Hilscher Community Forum (https://forum.hilscher.com)
+-- Forum: netPI 3 - Docker featuring Industrial Raspberry Pi 3 platform (https://forum.hilscher.com/forum-1.html)
+--- Forum: Software (https://forum.hilscher.com/forum-5.html)
+--- Thread: netPI Desktop java (/thread-620.html)

Pages: 1 2


netPI Desktop java - Hochschulstudent - August-12th-2020

Guten Tag, 
Hallo, 


Ich möchte eine Java-Anwendung auf dem Dekstop Hdmi netPi oder Raspberry Pi ausführen.
Das Bild herunterladen: hilschernetpi / netpi-desktop-hdmi funktioniert einwandfrei. Die Konfiguration lautet: Netzwerk -> Bridge 
Portzuweisung: 1099: 1099 und 8080: 8080.

Java wurde über sudo apt install default-jdk installiert.
Eine JAR-Datei ist zu behandeln, auf ihrer letzten ein Agent auf Port 1099 und ein Webdienst auf 8080.


Dieser Agent kann jedoch nicht über Port 1099 kommunizieren.


Bilder im Anhang.


RE: netPI Desktop java - Armin@netPI - August-12th-2020

Well I have seen your screen shots.
My first question is about your java application. This "agent" application - is this a kind of server application and listing to the ports 109 and a client application wants to access it from outside netPI. Is my understanding correct?

You talk about the port 1099 that is not working, but how about the port 8080? I mean you do not specifically say that port 8080 works fine. So what is the status of port 8080? Do you see the web service and the web application? How about this?

Thx
Armin


RE: netPI Desktop java - Armin@netPI - August-12th-2020

I looked to your sceen shots again. In the output I see that you application is trying to access 172.17.0.3:1099. So your application wants to access another device that is connected to netPI? Is this what your application wants to do?


RE: netPI Desktop java - Hochschulstudent - August-12th-2020

(August-12th-2020, 12:48 PM)Armin @ netPI Wrote: Ich schaute wieder auf deine Szenenaufnahmen. In der Ausgabe sehe ich, dass Ihre Anwendung versucht, auf 172.17.0.3:1099 zuzugreifen. Ihre Anwendung möchte also auf ein anderes Gerät zugreifen, das mit netPI verbunden ist? Ist es das, was Ihre Anwendung tun möchte?

2 Agenten (Java-Anwendungen) sollten miteinander kommunizieren
Wir wollen Daten von einer SPS über Node-Red lesen.
Übergabe von Node-Red an den Webdienst und die Agenten.
Agent 1 sendet die Daten an Agent 2
Agent 1 empfängt jedoch auch Daten von Agent 2

Agent 1 kann keine Verbindung zu Agent 2 herstellen. Agent 1 sollte auf dem Netpi ausgeführt werden

(August-12th-2020, 12:48 PM)Armin @ netPI Wrote: Ich schaute wieder auf deine Szenenaufnahmen. In der Ausgabe sehe ich, dass Ihre Anwendung versucht, auf 172.17.0.3:1099 zuzugreifen. Ihre Anwendung möchte also auf ein anderes Gerät zugreifen, das mit netPI verbunden ist? Ist es das, was Ihre Anwendung tun möchte?

Dies ist die IP-Adresse des Containers. Dort soll der Befehl gesendet werden.


RE: netPI Desktop java - Armin@netPI - August-12th-2020

You say ... two agents. Agent 1 is running inside the desktop container. This agent 1 wants to send data to the agent 2. Which IP address does your netPI have? Which IP address does your agent 2 have?


RE: netPI Desktop java - Hochschulstudent - August-12th-2020

(August-12th-2020, 01:19 PM)Armin @ netPI Wrote: Sie sagen ... zwei Agenten. Agent 1 wird im Desktop-Container ausgeführt. Dieser Agent 1 möchte Daten an den Agenten 2 senden. Welche IP-Adresse hat Ihr netPI? Welche IP-Adresse hat Ihr Agent 2?

netpi: 192.168.161.235 
Behälter: 172.....

Agent2: 192.168.160.20

zwischen diesen beiden agenten befindet sich ja VPN Network


RE: netPI Desktop java - Armin@netPI - August-12th-2020

In the Desktop container running on netPI with IP 192.168.161.235 you can open a standard Linux "terminal" console. What happens if you call "ping 192.168.160.20" in this console? Does the ping command get a response from 192.168.160.20?

And the other direction ... if you call "ping 192.168.161.235" on your Agent2, what happens then? Does the ping command get response back from 192.168.161.235?


RE: netPI Desktop java - Hochschulstudent - August-12th-2020

(August-12th-2020, 01:39 PM)Armin @ netPI Wrote: Im Desktop-Container, der unter netPI mit IP 192.168.161.235 ausgeführt wird, können Sie eine Standard-Linux-Terminalkonsole öffnen. Was passiert, wenn Sie in dieser Konsole "ping 192.168.160.20" aufrufen? Erhält der Ping-Befehl eine Antwort von 192.168.160.20?

Und die andere Richtung ... Wenn Sie auf Ihrem Agent2 "ping 192.168.161.235" aufrufen, was passiert dann? Erhält der Ping-Befehl eine Antwort von 192.168.161.235?

beide können sich gegenseitig anpingen und eine Antwort bekommen.


RE: netPI Desktop java - Armin@netPI - August-12th-2020

This is perfect. So both sides can see each other.

Now back to your application running on Agent 1 192.168.161.235. Which IP address do you enter/setup in your Java application to get communication running with Agent 2 on 192.168.161.235 over port 1099?


RE: netPI Desktop java - Hochschulstudent - August-12th-2020

(August-12th-2020, 01:52 PM)Armin@netPI Wrote: This is perfect. So both sides can see each other.

Now back to your application running on Agent 1 192.168.161.235. Which IP address do you enter/setup in your Java application to get communication running with Agent 2 on 192.168.161.235 over port 1099?

the adress of the agent 2 : 192.168.160.20