Welcome, Guest
Username: Password: Remember me

TOPIC: New Ge demo

New Ge demo 5 years 4 weeks ago #10236

  • Snarf77
  • Snarf77's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 847
  • Thank you received: 2
  • Karma: 5
Hi All,

Hope everybody is fine out there...

I had few hours free and decided to give a try to the web server and html page for my first time.
Until now I was only playing with GE graph and was satisfied with but I need to increase the number of operator station and would prefer to add this kind of web access rather than duplicating the proview nodes.

I tried to follow the Java operator environment chapter in proview designer guide but it looks like I'm missing something.

What I did so far is:
In the runtime node:
* Add an OpPlaceWeb object and enabled various option (Enable login / Enable AlarmList and Navigator)
* Add a Web graph below this object with the name attribute being equal to the name of a GE graph (with first letter in uppercase)
* I configured the security object DefaultWebPriv attribute with the rt_read privileges
* I installed a default open jre kit on the runtime
* I installed a web server (apache2) on the runtime
* apache2 config file is modified to match the virtual server /pwrp/common/web aliases to pwrp_web


In the development station:
* I installed a default java development kit
* I edited my GE graph, tick the IsJavaFrame option and Export it
* I build the volume and the node and distribute the package


What I tested:
* I used the maintenance computer as ethernet client to my server node
* I pointed my web browser to the address: NodeIPAddress/pwrp_web/index2.html
* I correctly received a web page with the correct right frame (xtt_help_index.html) but the left frame is empty (no button at all like login ..)
* I tried to point directly at Node/pwrp_web/index2_opwin_menu.html but page is empty as well


As I don't really know java, I don't know what is missing to display the following lines contained in file index2_opwin_menu.html:
<object classid="java:jpwr.jop.JopOpWindowApplet.class"
      type="application/x-java-applet"
      archive="pwr_rt_client.jar,pwr_jop.jar,pwr_jopg.jar,pwrp_17amar2101_web.jar"
      width=100% height=100% >
      <param name = "code" value="jpwr.jop.JopOpWindowApplet.class" >
      <param name ="archive" value="pwr_rt_client.jar,pwr_jop.jar,pwr_jopg.jar,pwrp_17amar2101_web.jar">
      <param name="persistState" value="false" />
      <param name="scriptable" value="false">
      <param name="pwrplace" value="Nodes-PLC-WebServer">
     </object>


The only jar file I have in my $pwrp_web directory are :
pwr_jopg.jar pwr_jop.jar pwrp_17amar2101_web.jar pwr_rt_client.jar

17amar2101 being my project name.

Another question: I export my GE graph as javaframe but where is this "export" available ? is it a file or included into a java class ? Can I point directly to it to make a try ?

I hope you can help me as I can't see what I forget

Thanks in advance
Snarf
The administrator has disabled public write access.

New Ge demo 5 years 4 weeks ago #10240

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
Hi Snarf,

Nowadays you don't need to export to java, you can copy the pwg-file to $pwrp_web instead. You should also, instead of writing the name with first letter in uppercase in the WebGraph, write the name with lowercase and '.pwg' at the end.

You also have to configure a WebHandler object and make sure that the three java server processes are started. They use the env variable $jdk and $jdk_home that should point to the java release (in /usr/lib/jvm/...) and is normally setup in /etc/pwrp_profile. The server processes are rt_webmon, rt_webmonmh and rt_webmonelog. If you don't see tne menu, rt_webmon is not responding.

/Claes
The administrator has disabled public write access.

New Ge demo 5 years 4 weeks ago #10247

  • Snarf77
  • Snarf77's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 847
  • Thank you received: 2
  • Karma: 5
Hi Claes,

Thanks for feedback.
It's good to know now java page are more naturaly integrated using the directly the pwg. Nice !

Concerning my issue, I'm unfortunately still unable to access the menu.
I have double checked that:

* My web server node has a WebHandler object with default attribute I think (nothing in the EventSelectList / MaxConnection = 50 / MaxNoOfAlamrs = 200 / MaxNoOfEvents = 500)

* jdk env vairable looks fine
pwrp@plc1p:~$ echo $jdk
/usr/lib/jvm/java-8-openjdk-i386
pwrp@plc1p:~$ echo $jdk_home
/usr/lib/jvm/java-8-openjdk-i386/bin

* pwrp_profile is in charge of generating those variable:
jdk=`eval ls -t /usr/lib/jvm | grep -m 1 -e ^java-[0-9]*-openjdk`
if [ -z "$jdk" ]; then
  jdk=`eval ls -t /usr/lib/jvm | grep -m 1 jre`
fi

export jdk=/usr/lib/jvm/$jdk
export jdk_home=$jdk/bin
PATH=$PATH:$pwr_exe:$pwrp_exe:$jdk_home

All three mentionned process looks running:
root      1185  0.0  0.0   5928  4116 ?        Ss   Mar26   0:03 /usr/sbin/apache2 -k start
www-data  1188  0.0  0.1 234952  5128 ?        Sl   Mar26   0:27 /usr/sbin/apache2 -k start
www-data  1189  0.0  0.1 235008  5260 ?        Sl   Mar26   0:25 /usr/sbin/apache2 -k start
pwrp      1456  0.0  0.0   2364  1432 tty1     S+   Mar26   0:00 /bin/sh /usr/bin/startx
pwrp      1498  0.0  0.3  51876 14260 tty1     S    Mar26   0:01 /usr/bin/openbox --startup /usr/lib/i386-linux-gnu/openbox-autostart OPENBOX
pwrp      7614  5.0  1.5 132512 61916 pts/3    Sl   10:07   0:01 rt_ini -i
pwrp      7616  0.0  0.0 124108  2808 pts/3    S    10:07   0:00 rt_neth
pwrp      7617  0.6  0.0  48652   900 pts/3    Sl   10:07   0:00 rt_qmon
pwrp      7618  0.0  0.0 124036  2396 pts/3    S    10:07   0:00 rt_neth_acp
pwrp      7619  0.1  0.1 126556  5656 pts/3    S    10:07   0:00 rt_io_comm
pwrp      7620  0.1  0.0 124052  2564 pts/3    S    10:07   0:00 rt_tmon
pwrp      7621  1.4  0.3 128412 12852 pts/3    S    10:07   0:00 rt_emon
pwrp      7622  0.0  0.0 124020  2684 pts/3    S    10:07   0:00 rt_alimserver
pwrp      7623  0.0  0.1 151712  5420 pts/3    Sl   10:07   0:00 rt_bck
pwrp      7624  0.0  0.0 124040  3460 pts/3    S    10:07   0:00 rt_trend
pwrp      7625  0.2  0.0 125656  2876 pts/3    S    10:07   0:00 rt_fast
pwrp      7626  0.8  0.0 126288  3960 pts/3    S    10:07   0:00 rt_elog
pwrp      7627  0.0  0.0   5456  2888 pts/3    S    10:07   0:00 /bin/bash /usr/pwrrt/exe/rt_webmon.sh
pwrp      7628  0.0  0.0   5456  2900 pts/3    S    10:07   0:00 /bin/bash /usr/pwrrt/exe/rt_webmonmh.sh
pwrp      7629  0.0  0.0   5456  2748 pts/3    S    10:07   0:00 /bin/bash /usr/pwrrt/exe/rt_webmonelog.sh
pwrp      7630  0.0  0.0 134116  3624 pts/3    Sl   10:07   0:00 rt_statussrv
pwrp      7631  0.0  0.0 125892  3532 pts/3    S    10:07   0:00 rt_report
pwrp      7634  2.3  0.6 1524356 26308 pts/3   Sl   10:07   0:00 /usr/lib/jvm/java-8-openjdk-i386/bin/java -Djava.library.path=/usr/lib/jvm/java-8-openjdk-i386/lib/i386/client:/usr/lib/jvm/java-8-openjdk-i386/lib/i386:/usr/lib/jvm/java-8-openjdk-i386/../lib/i386:/usr/pwrrt/exe jpwr.rt.MhServer
pwrp      7635  2.1  0.6 1404060 25252 pts/3   Sl   10:07   0:00 /usr/lib/jvm/java-8-openjdk-i386/bin/java -Djava.library.path=/usr/lib/jvm/java-8-openjdk-i386/lib/i386/client:/usr/lib/jvm/java-8-openjdk-i386/lib/i386:/usr/lib/jvm/java-8-openjdk-i386/../lib/i386:/usr/pwrrt/exe jpwr.rt.HistServer
pwrp      7636  2.2  0.6 1524032 26580 pts/3   Sl   10:07   0:00 /usr/lib/jvm/java-8-openjdk-i386/bin/java -Djava.library.path=/usr/lib/jvm/java-8-openjdk-i386/lib/i386/client:/usr/lib/jvm/java-8-openjdk-i386/lib/i386:/usr/lib/jvm/java-8-openjdk-i386/../lib/i386:/usr/pwrrt/exe jpwr.rt.GdhServer

rt_webmon is not a process like other one but looks like a script (.sh) compared to other native process. Except that I don't see anything abnormal.

Here attached is what I get on screen when connection to web server

Hope you will have some other ideas..

Best regards
Snarf
Attachments:
The administrator has disabled public write access.

New Ge demo 5 years 4 weeks ago #10248

  • Snarf77
  • Snarf77's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 847
  • Thank you received: 2
  • Karma: 5
Stupid question per perhaps the issue is more obvious...Which web browser do you use ?

I tested a java test page from oracle and all my web browser seem not to support java anymore.

Firefox since version 52 has limited support according to following test page:
www.java.com/en/download/installed.jsp

Chrome doesn't support NPAPI technology (is this one required ?)

Midori is requesting a plug in that I can't succeed to make work.

Do I need to use IE ??? lol (I just can't do that)

I'm just wondering if the issue come from web browser more than proview itself

Snarf
PS: here attached java test page result for firefox and chrome
Attachments:
The administrator has disabled public write access.

New Ge demo 5 years 4 weeks ago #10250

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
Hi Snarf,

I actually use IE, and if you have a windows pc near by you could at least see if this is the problem or not. Starting the java console may also give some hints.

Otherwise if you are running V5.6.1 you could try the new websocket/JavaScript interface that will replace the java interface.

/Claes
The administrator has disabled public write access.

New Ge demo 5 years 4 weeks ago #10251

  • Snarf77
  • Snarf77's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 847
  • Thank you received: 2
  • Karma: 5
I tried with internet explorer on windows 8 and after long time to allow unsecured web site and whitelisting my PLC (I don't remember how to use windows...) result is same unfortunately.
Same result also with Edge.

Concerning my proview version I'm still using v5.5 unfortunately.

How do you start the java console ? I'm a real newbie with java ...
What should I try or test ?

Thanks
Snarf
The administrator has disabled public write access.
Time to create page: 8.462 seconds