LISTSERV mailing list manager LISTSERV 16.5

Help for HPS-SOFTWARE Archives


HPS-SOFTWARE Archives

HPS-SOFTWARE Archives


HPS-SOFTWARE@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

HPS-SOFTWARE Home

HPS-SOFTWARE Home

HPS-SOFTWARE  December 2016

HPS-SOFTWARE December 2016

Subject:

Re: problems in reading a local DB

From:

Alessandra Filippi <[log in to unmask]>

Reply-To:

Software for the Heavy Photon Search Experiment <[log in to unmask]>

Date:

Sun, 11 Dec 2016 13:02:46 +0100

Content-Type:

MULTIPART/MIXED

Parts/Attachments:

Parts/Attachments

TEXT/PLAIN (276 lines)

Hi Maurik, all,
thanks, with this fix I am able to read my local db.

But, er... as Sho was supposing, I am afraid I am not able to provide the 
proper db dump. I am retrieving the hps_conditions db, is this correct?
or do I need a different one?
To get it, I use the command

> mysqldump -f --lock-tables=false -h hpsdb.jlab.org -u hpsuser -p 
hps_conditions > hps_conditions_2016_12_11.mysql

if I don't use the -f flag the dump ends almost immediately with this 
complaint (and the dumpfile is small and clearly incomplete):

mysqldump: Couldn't execute 'show create table 
`conditions_engrun2015_pass2`': SHOW VIEW command denied to user 
[log in to unmask] for table 'conditions_engrun2015_pass2' (1142)

If I add the -f flag, it still complains with this and other similar 
warnings (telling that I cannot view conditions_engrun_pass1_view and 
svt_alignments_engrun_view), but the dump goes on and the dumpfile is much 
larger (but this does not mean it contains everything needed, I suppose).
When I run hps-java, after some happy queries, I get this message:

Exception in thread "main" java.lang.RuntimeException: 
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 
'hps_conditions.run_summaries' doesn't exist

so clearly I am missing something/doing something wrong with the dump.
Any idea?
If it's too complicated and involving privileges I haven't, I would 
be happy just to retrieve a recent dumpfile from somewhere, if someone can 
provide me one copy (I have an old one, dating back to 2015, but I guess 
it's too old - and indeed it does not work properly).
Thanks for your help.
cheers
     Alessandra







On Sat, 10 Dec 2016, Maurik Holtrop wrote:

> Hello Alessandra,
> You are correct in your assessment that the code does not connect to the DB. There are 2 locations in the code where the
> code tries to connect. In one, it does listen to the prop file, in the other the address is hard coded. In the print outs
> that you show, the first one … [WARNING]… is the hard coded one not getting a connection with hpsdb.jlab.org, because you
> are offline. In your second printout, you are online, so you don’t get any message from that, and so now it tells you that
> the other connection that does use the prop file indeed connected to localhost.
> 
> The file that causes the issue is here: run-database/src/main/java/org/hps/run/database/RunManager.java
> 
> Here is the bit of code that I have changed to make it work on our farm
> 
> package org.hps.run.database;
> 
> import java.sql.Connection;
> import java.sql.SQLException;
> import java.util.List;
> import java.util.logging.Logger;
> 
> import org.hps.conditions.database.ConnectionParameters;
> import org.hps.record.daqconfig.DAQConfig;
> import org.hps.record.epics.EpicsData;
> import org.hps.record.scalers.ScalerData;
> import org.hps.record.svt.SvtConfigData;
> import org.hps.record.triggerbank.TriggerConfigData;
> import org.lcsim.conditions.ConditionsEvent;
> import org.lcsim.conditions.ConditionsListener;
> 
> /**
>  * Manages access to the run database.
>  *
>  * @author Jeremy McCormick, SLAC
>  */
> public final class RunManager implements ConditionsListener {
> 
>     /**
>      * The default connection parameters for read-only access to the run database.
>      */
>     private static ConnectionParameters DEFAULT_CONNECTION_PARAMETERS = new ConnectionParameters("hpsuser",
>             "darkphoton", “hps_run_db", “127.0.0.1");
> 
>     /**
>      * The singleton instance of the RunManager.
>      */
>     private static RunManager INSTANCE;
> 
>  
> 
> 
> The 127.0.0.1 is the same as “localhost”, usually. Depending on your DB setup you may need to change the username
> “hpsuser” or password or database name.
> 
> I hope this helps.
> 
> Best,
> Maurik
> 
> 
>
>       On Dec 10, 2016, at 4:18 AM, Alessandra Filippi <[log in to unmask]> wrote:
> 
> Hi all,
> so, I guess the issue is that I'm tying to run it completely offline (I just need to debug the recostruction on a
> few events, but I cannot be online as I'm away). The command I run is the following:
> 
> java -Dorg.hps.conditions.connection.file=local.prop -DdisableSvtAlignmentConstants -cp hps-distribution.jar
> org.hps.evio.EvioToLcio -d HPS-EngRun2015-Nominal-v5-0-fieldmap -DoutputFile=test -x
> EngineeringRun2015FullRecon_Pass2_Gbl.lcsim DATA2015/hps_005772.evio.0-nominalAllevents/hps_005772.evio.0
> 
> where hps-distribution.jar is pointing to v3.11 hps-java .jar (freshly updated). If I run it offline, I just get
> this:
> 
> 2016-12-10 09:58:08 [WARNING] org.hps.conditions.database.ConnectionParameters createConnection :: Failed to connect
> to database jdbc:mysql://hpsdb.jlab.org:3306/ - 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.
> [..]
> (repeated for 10 times)
> 
> which tells me that it doesn't care at all about my local.prop (even if I provide the name of a prop file that does
> not exist).
> 
> If I run it with the network, indeed the file is read:
> 
> 2016-12-10 09:52:48 [CONFIG] org.hps.conditions.database.DatabaseConditionsManager setConnectionProperties ::
> setting connection properties file local.prop [...]
> 
> 2016-12-10 09:59:55 [INFO] org.hps.conditions.database.DatabaseConditionsManager openConnection :: opening
> connection ...
> connection: jdbc:mysql://localhost:3306/
> host: localhost
> port: 3306
> user: filippi
> database: hps_conditions
> 
> so, if I understand it correctly, as a provisional shortcut I should hardcode the call to my local db overriding the
> search over the network of hpsdb.
> May you tell me where?
> thanks
>   Alessandra
> 
> 
> 
> 
> 
> 
> 
> 
> On Fri, 9 Dec 2016, McCormick, Jeremy I. wrote:
>
>       Alessandra, can you please send the full print output from your job and what command line you are
>       running?
>
>       We should start by double checking that at least your prop file is being picked up for the conditions db
>       before worrying about what is happening with the run db ...
>
>       -----Original Message-----
>       From: Maurik Holtrop [mailto:[log in to unmask]]
>       Sent: Friday, December 09, 2016 3:00 PM
>       To: Omar Moreno
>       Cc: McCormick, Jeremy I.; Uemura, Sho; Alessandra Filippi; hps-software
>       Subject: Re: problems in reading a local DB
>
>       Yes, this has been an issue for quite some time, and Jeremy has been aware of it:
>       https://jira.slac.stanford.edu/projects/HPSJAVA/issues/HPSJAVA-665?filter=allopenissues
>       I think we should either obey the prop file everywhere, OR, hard code it everywhere and not deceive
>       people with a prop file.
>
>       I have had this issue on our backend farm, which simply cannot see hpsdb.jlab.org, so I went with a
>       local modification that hard codes the db name everywhere.
>
>       Perhaps Jeremy can comment on why this is hard to fix?
> 
> 
>
>       On Dec 9, 2016, at 5:21 PM, Omar Moreno <[log in to unmask]> wrote:
>
>       I think she is trying to run completely offline.
> 
>
>       On Fri, Dec 9, 2016 at 2:07 PM, McCormick, Jeremy I. <[log in to unmask]> wrote:
> 
>
>       Sho is right -- the run DB URL is currently separate from the conditions db prop file and hard-coded....
>
>       Are you trying to run completely offline?
>
>       You should be able to connect to the run db if you have an internet connection, as it is publically
>       accessible.
> 
>
>       -----Original Message-----
>       From: [log in to unmask] [mailto:[log in to unmask]
>       <mailto:[log in to unmask]> ] On Behalf Of Sho Uemura
>       Sent: Friday, December 09, 2016 1:51 PM
>       To: Alessandra Filippi
>       Cc: hps-software
>       Subject: Re: problems in reading a local DB
>
>       The instructions don't cover making a local copy of the run DB, which is a separate database also at
>       JLab, and uses a different set of connection parameters. I think the run DB was added sometime
>       during/after the 2015 run, so you might not have had to deal with it before.
>
>       On Fri, 9 Dec 2016, Alessandra Filippi wrote:
>
>       > Hi all,
>       > I'm trying to use a local copy of the conditions DB to run 2015 data
>       > reconstruction. I'm following the instructions given in
>       > https://confluence.slac.stanford.edu/display/hpsg/Installing+the+Condi
>       <https://confluence.slac.stanford.edu/display/hpsg/Installing+the+Condi>
>       > tions+Database+Locally
>       >
>       > (I remember that some time ago they were working). However, when I run
>       > the reconstruction with the suggested command java
>       > -Dorg.hps.conditions.connection.file=local.prop -jar
>       > hps-distribution-bin.jar [args]
>       >
>       > it looks like the db redirection to my local file is ignored - the
>       > default jlab db is always searched for, and there is no complain if I
>       > provide a non-existent .prop filename, as if the -D instruction was neglected.
>       > Has anything changed (class names, etc) as of lately?
>       > or is the issue related to my local db copy?
>       > thanks, cheers
>       >   Alessandra
>       >
>       > ######################################################################
>       > ##
>       > Use REPLY-ALL to reply to list
>       >
>       > To unsubscribe from the HPS-SOFTWARE list, click the following link:
>       > https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1
>       <https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1>
>       >
>
>       ########################################################################
>       Use REPLY-ALL to reply to list
>
>       To unsubscribe from the HPS-SOFTWARE list, click the following link:
>       https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1
>       <https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1>
>
>       ########################################################################
>       Use REPLY-ALL to reply to list
>
>       To unsubscribe from the HPS-SOFTWARE list, click the following link:
>       https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1
>       <https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1>
> 
> 
> 
>
>       ________________________________
>
>       Use REPLY-ALL to reply to list
>
>       To unsubscribe from the HPS-SOFTWARE list, click the following link:
>       https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1
> 
> 
> 
> 
> 
>

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

April 2024
March 2024
February 2024
January 2024
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
December 2022
November 2022
October 2022
September 2022
August 2022
June 2022
April 2022
March 2022
February 2022
January 2022
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use