EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
<== Date ==> <== Thread ==>

Subject: Re: Re: Question about fetching history data from MySQL by using phoebus
From: lzfneu--- via Tech-talk <tech-talk at aps.anl.gov>
To: kasemirk <kasemirk at ornl.gov>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Fri, 30 Jun 2023 20:40:22 +0800
Hi Kay,

Sorry to disturb you again, I make a wrong version with java in my last e-mail. 

I re-unzipped again the produce-sns-4.7.3-SNAPSHOT and the jdk folder in the folder, after running "sh phoebus.sh",  the menu-->help, it shows the java version is 7.0.2.

The configurations for Phoebus are:
org.csstudio.trends.databrowser3/urls=jdbc:mysql://192.168.1.230/archive
org.csstudio.trends.databrowser3/archives=jdbc:mysql://192.168.1.230/archive

The error messages to connect MySQL 5.7.12 on server side (192.168.1.230) with lib/mysql-connector-java-8.0.30.jar are shown below:
===============================================

Cannot connect to jdbc:mysql://192.168.1.230/archive as root
...
Caused by: com.mysql.cj.jdbc.exceptions. Communications Exception: Communications link failure.

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
...
caused by: com.mysql.cj.exceptions. CJCommunicationsException: Communications link failure.

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
...
    Suppressed: java.net.SocketException: Broken pipe.
    ...
Caused by: javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake.
...
Caused by: java.io.EOFException: SSL peer shut down incorrectly.
...
===============================================


From: Kasemir, Kay <kasemirk at ornl.gov>
Sent: 29 June 2023 17:40
To: neu lzf <lzfneu at live.com>
Cc: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov> 
Subject: Re: Question about fetching history data from MySQL by using phoebus
 

> I try to use binary SNS version of Phoebus and I checked the product/lib folder and found that the file mysql-connector-java-8.0.30.jar is present.

 

Right, should look something like this :

 

/jdk/…

/lib/…

/lib/product-sns-4.7.3-SNAPSHOT/lib/mysql-connector-java-8.0.30.jar

 

When you start it, it’s using the jdk/… that’s included in the download, so the menu Help, About shows java version 17, which should work with that mysql jar file.

 

When I then try to read data from say jdbc:mysql://localhost/archive, that either works, or it fails with a meaningful error message because there is a connection issue (network, no MySQL running, …) like this :

 

WARNING [org.csstudio.trends.databrowser3] No archived data for xxx

java.lang.Exception: Cannot connect to jdbc:mysql://localhost/archive as archive

Caused by: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

 

 

What you see is this :

  1. the connection issue: Cannot connect to jdbc://mysql://192.168.1.230/archive as root  
  2. Caused by: java.sql.SQLException: No suitable driver found for jdbc:mysql://192.168.1.230/archive

Check the exact connection string. You mention both

   jdbc://mysql://192.168.1.230/archive

and

  jdbc:mysql://192.168.1.230/archive

The correct syntax is something like jdbc:mysql://localhost/archive

If I try jdbc://mysql://localhost/archive then the extra // indeed turns it into something that’s not recognized as a MySQL connection string, and then “no suitable driver” makes sense for an error.


Replies:
Re: [EXTERNAL] Re: Re: Question about fetching history data from MySQL by using phoebus Kasemir, Kay via Tech-talk
References:
Question about fetching history data from MySQL by using phoebus neu lzf via Tech-talk
Re: Question about fetching history data from MySQL by using phoebus Kasemir, Kay via Tech-talk
Re: Question about fetching history data from MySQL by using phoebus neu lzf via Tech-talk
RE: Question about fetching history data from MySQL by using phoebus CAOUEN Loic via Tech-talk
Re: Question about fetching history data from MySQL by using phoebus Kasemir, Kay via Tech-talk
Re: Question about fetching history data from MySQL by using phoebus neu lzf via Tech-talk

Navigate by Date:
Prev: Re: Help using newest OPC UA Modules/IOCs Ralph Lange via Tech-talk
Next: Re: Help using newest OPC UA Modules/IOCs Ralph Lange via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
Navigate by Thread:
Prev: Re: Question about fetching history data from MySQL by using phoebus neu lzf via Tech-talk
Next: Re: [EXTERNAL] Re: Re: Question about fetching history data from MySQL by using phoebus Kasemir, Kay via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
ANJ, 30 Jun 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·