Is there a script to reinitialised the uploads SQLite db?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there a script to reinitialised the uploads SQLite db?

Keiran Raine
Hi,

We changed our server to run under a different user and had to clean out many of the temporary files including the SQLite db.  Now gbrowse_clean.pl gives the following error:

DBD::SQLite::db prepare failed: no such table: uploads at /gbrowse/perl5/bin/gbrowse_clean.pl line 142

Is there a way to force this to reinitialise?

Thanks,

Keiran Raine
Principal Bioinformatician
Cancer Genome Project
Wellcome Trust Sanger Institute

Tel:+44 (0)1223 834244 Ext: 7703
Office: H104


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: Is there a script to reinitialised the uploads SQLite db?

Timothy Parnell
Hi Keiran,

The gbrowse_metadb_config.pl script which comes with GBrowse2 will do this. It's probably installed in /usr/local/bin. You may need to give it sudo access to check for permissions.

Tim

On Nov 26, 2013, at 4:49 PM, Keiran Raine <[hidden email]<mailto:[hidden email]>> wrote:

Hi,

We changed our server to run under a different user and had to clean out many of the temporary files including the SQLite db.  Now gbrowse_clean.pl gives the following error:

DBD::SQLite::db prepare failed: no such table: uploads at /gbrowse/perl5/bin/gbrowse_clean.pl line 142

Is there a way to force this to reinitialise?

Thanks,

Keiran Raine
Principal Bioinformatician
Cancer Genome Project
Wellcome Trust Sanger Institute

[hidden email]<mailto:[hidden email]>
Tel:+44 (0)1223 834244 Ext: 7703
Office: H104


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: Is there a script to reinitialised the uploads SQLite db?

Keiran Raine
Hi Tim,

Thanks of the help, the only problem I have now is I can't get it to recognise that my server isn't running as www-data…  Looking at the script it attempts to get the user from GBrowse.conf:

my $www_user       = GBrowse::ConfigData->config('wwwuser');

I've tried setting the value for 'wwwuser' but I guess it has to be in a particular section, any ideas?

Thanks again,

Keiran Raine
Principal Bioinformatician
Cancer Genome Project
Wellcome Trust Sanger Institute

Tel:+44 (0)1223 834244 Ext: 7703
Office: H104

On 27 Nov 2013, at 16:08, Timothy Parnell <[hidden email]> wrote:

Hi Keiran,

The gbrowse_metadb_config.pl script which comes with GBrowse2 will do this. It's probably installed in /usr/local/bin. You may need to give it sudo access to check for permissions.

Tim

On Nov 26, 2013, at 4:49 PM, Keiran Raine <[hidden email]<[hidden email]>> wrote:

Hi,

We changed our server to run under a different user and had to clean out many of the temporary files including the SQLite db.  Now gbrowse_clean.pl gives the following error:

DBD::SQLite::db prepare failed: no such table: uploads at /gbrowse/perl5/bin/gbrowse_clean.pl line 142

Is there a way to force this to reinitialise?

Thanks,

Keiran Raine
Principal Bioinformatician
Cancer Genome Project
Wellcome Trust Sanger Institute

[hidden email]<[hidden email]>
Tel:+44 (0)1223 834244 Ext: 7703
Office: H104


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse



-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: Is there a script to reinitialised the uploads SQLite db?

Timothy Parnell
That's odd.

So I took a closer look at the script, and it's trying to find the web user from the module GBrowse::ConfigData. Apparently that value is stored in the module itself, so you should check there (or possibly for more than one in your @INC path).

I think whenever I had to run this manually, I simply ran it under root to create the database, then manually adjusted the directory permissions to be writable by the web user as necessary (it likes to complain about the user and group on OS X, for whatever reason). Adjusting permissions is the last thing the script does, and I can easily do that myself anyway.

Thinking about this some more, I remember some scary issues when I had to play around the user and/or sessions database, particularly when moving them (file paths) around. Users returning to GBrowse would lock GBrowse itself, and issuing the magic reset URL and/or clearing the user's browser cookies would fix things. Apparently GBrowse did not like it at all when there was a mismatch between a user's cookie and it's internal database. This was quite some time ago (years?), so maybe it's more forgiving now, but just to forewarn you.

Good luck.


On Nov 27, 2013, at 1:08 PM, Keiran Raine <[hidden email]<mailto:[hidden email]>> wrote:

Hi Tim,

Thanks of the help, the only problem I have now is I can't get it to recognise that my server isn't running as www-data…  Looking at the script it attempts to get the user from GBrowse.conf:

my $www_user       = GBrowse::ConfigData->config('wwwuser');

I've tried setting the value for 'wwwuser' but I guess it has to be in a particular section, any ideas?

Thanks again,

Keiran Raine
Principal Bioinformatician
Cancer Genome Project
Wellcome Trust Sanger Institute

[hidden email]<mailto:[hidden email]>
Tel:+44 (0)1223 834244 Ext: 7703
Office: H104

On 27 Nov 2013, at 16:08, Timothy Parnell <[hidden email]<mailto:[hidden email]>> wrote:

Hi Keiran,

The gbrowse_metadb_config.pl script which comes with GBrowse2 will do this. It's probably installed in /usr/local/bin. You may need to give it sudo access to check for permissions.

Tim

On Nov 26, 2013, at 4:49 PM, Keiran Raine <[hidden email]<mailto:[hidden email]><mailto:[hidden email]>> wrote:

Hi,

We changed our server to run under a different user and had to clean out many of the temporary files including the SQLite db.  Now gbrowse_clean.pl gives the following error:

DBD::SQLite::db prepare failed: no such table: uploads at /gbrowse/perl5/bin/gbrowse_clean.pl line 142

Is there a way to force this to reinitialise?

Thanks,

Keiran Raine
Principal Bioinformatician
Cancer Genome Project
Wellcome Trust Sanger Institute

[hidden email]<mailto:[hidden email]><mailto:[hidden email]>
Tel:+44 (0)1223 834244 Ext: 7703
Office: H104


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk_______________________________________________
Gmod-gbrowse mailing list
[hidden email]<mailto:[hidden email]>
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse



-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: Is there a script to reinitialised the uploads SQLite db?

Keiran Raine
Hi Tim,

I've figured out what's happened.  Basically the apache user is written during the configuration GBrowse to the end of GBrowse::Config.  The server was originally setup as www-data but has now changed to a user that has relevant group access to some network files (as the server is internal only).

I've just edited GBrowse::Config to the new user and the script runs.

Regards,

Keiran Raine
Principal Bioinformatician
Cancer Genome Project
Wellcome Trust Sanger Institute

Tel:+44 (0)1223 834244 Ext: 7703
Office: H104

On 27 Nov 2013, at 23:13, Timothy Parnell <[hidden email]> wrote:

That's odd.

So I took a closer look at the script, and it's trying to find the web user from the module GBrowse::ConfigData. Apparently that value is stored in the module itself, so you should check there (or possibly for more than one in your @INC path).

I think whenever I had to run this manually, I simply ran it under root to create the database, then manually adjusted the directory permissions to be writable by the web user as necessary (it likes to complain about the user and group on OS X, for whatever reason). Adjusting permissions is the last thing the script does, and I can easily do that myself anyway.

Thinking about this some more, I remember some scary issues when I had to play around the user and/or sessions database, particularly when moving them (file paths) around. Users returning to GBrowse would lock GBrowse itself, and issuing the magic reset URL and/or clearing the user's browser cookies would fix things. Apparently GBrowse did not like it at all when there was a mismatch between a user's cookie and it's internal database. This was quite some time ago (years?), so maybe it's more forgiving now, but just to forewarn you.

Good luck.


On Nov 27, 2013, at 1:08 PM, Keiran Raine <[hidden email]<[hidden email]>> wrote:

Hi Tim,

Thanks of the help, the only problem I have now is I can't get it to recognise that my server isn't running as www-data…  Looking at the script it attempts to get the user from GBrowse.conf:

my $www_user       = GBrowse::ConfigData->config('wwwuser');

I've tried setting the value for 'wwwuser' but I guess it has to be in a particular section, any ideas?

Thanks again,

Keiran Raine
Principal Bioinformatician
Cancer Genome Project
Wellcome Trust Sanger Institute

[hidden email]<[hidden email]>
Tel:+44 (0)1223 834244 Ext: 7703
Office: H104

On 27 Nov 2013, at 16:08, Timothy Parnell <[hidden email]<[hidden email]>> wrote:

Hi Keiran,

The gbrowse_metadb_config.pl script which comes with GBrowse2 will do this. It's probably installed in /usr/local/bin. You may need to give it sudo access to check for permissions.

Tim

On Nov 26, 2013, at 4:49 PM, Keiran Raine <[hidden email]<[hidden email]><[hidden email]>> wrote:

Hi,

We changed our server to run under a different user and had to clean out many of the temporary files including the SQLite db.  Now gbrowse_clean.pl gives the following error:

DBD::SQLite::db prepare failed: no such table: uploads at /gbrowse/perl5/bin/gbrowse_clean.pl line 142

Is there a way to force this to reinitialise?

Thanks,

Keiran Raine
Principal Bioinformatician
Cancer Genome Project
Wellcome Trust Sanger Institute

[hidden email]<[hidden email]><[hidden email]>
Tel:+44 (0)1223 834244 Ext: 7703
Office: H104


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk_______________________________________________
Gmod-gbrowse mailing list
[hidden email]<mailto:[hidden email]>
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse



-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.



-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse