|
From: Eric R. <er...@1s...> - 2002-08-19 22:30:02
|
Greetings. .
I'm attempting to get OI 1.41 up and running w/ PgSQL, and am having a few
issues. I have the program working fine with MySQL, but would prefer to
use PgSQL.
System Info:
Slackware Linux 7
Perl 5.6.1
Apache 1.3.26 + mod_perl 1.27
PostgreSQL 7.2.1
DBD::Pg 1.13
************************************************
************************************************
Here's my datasource from the server.ini:
[db_info main]
db_owner =
username = oi_intranet
password = <passwordhere>
dsn = dbname=oi_intranet
db_name =
driver_name = Pg
sql_install =
long_read_len = 65536
long_trunc_ok = 0
And my session_info class:
class = Apache::Session::Postgres
I have created an override_spops.perl in my site's conf dir, and have also
run "oi_manage change_spops_driver --driver=SPOPS::DBI::Pg", just to be
safe.
test_db and install_sql both ran without a hitch (after I re-read the
docs, and figured out what to do with the dsn & db_name for a Pg
connection).
************************************************
************************************************
Error log entry:
Found item: DBI::db
OpenInteract::Error::System::cannot_create_session (335) >> Cannot create
session -- someone is probably using a defunct key or something.
>> Error with code 310 thrown. Info: Object does not exist in the data
store at
/usr/local/lib/perl5/site_perl/5.6.1/Apache/Session/Store/Postgres.pm line
81.
OpenInteract::Error::System::log_and_return('Intranet::ErrorObject=HASH(0x8e520b0)')
called at
/usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/Error/System.pm line 342
OpenInteract::Error::System::cannot_create_session('Intranet::ErrorObject=HASH(0x8e520b0)')
called at /usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/Error/Main.pm
line 38
OpenInteract::Error::Main::catch('OpenInteract::Error::Main',
'Intranet::ErrorObject=HASH(0x8e520b0)') called at (eval 402) line 39
Intranet::ErrorObject::throw('Intranet::ErrorObject',
'HASH(0x9589d30)') called at
/usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/Error.pm line 94
OpenInteract::Error::throw('OpenInteract::Error',
'HASH(0x9589d30)') called at
/usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/Request.pm line 124
OpenInteract::Request::throw('OpenInteract::Request=HASH(0x9380940)',
'HASH(0x9589d30)') called at
/usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/Session/DBI.pm line 31
OpenInteract::Session::DBI::_create_session('OpenInteract::Session::DBI',
'fb014562f8776e2ac4e3aaa482c4abf7') called at
/usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/Session.pm line 27
OpenInteract::Session::parse('OpenInteract::Session::DBI') called
at /usr/local/lib/perl5/site_perl/5.6.1/OpenInteract.pm line 256
eval {...} called at
/usr/local/lib/perl5/site_perl/5.6.1/OpenInteract.pm line 251
OpenInteract::setup_cookies_and_session('OpenInteract',
'OpenInteract::Request=HASH(0x9380940)') called at
/usr/local/lib/perl5/site_perl/5.6.1/OpenInteract.pm line 52
eval {...} called at
/usr/local/lib/perl5/site_perl/5.6.1/OpenInteract.pm line 46
OpenInteract::handler('OpenInteract', 'Apache=SCALAR(0x85f52a0)')
called at /dev/null line 0
eval {...} called at /dev/null line 0
Cannot save error 310: DBD::Pg::st execute failed: ERROR: value too long
for type character varying(60) at
/usr/local/lib/perl5/site_perl/5.6.1/SPOPS/SQLInterface.pm line 288.
at /usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/Error/System.pm line
394
OpenInteract::Session::DBI::_create_session (36) >> Error thrown. Now
clear the cookie
--EXITED WITH ERROR from main handler eval block
Error: Can't call method "discover_properties" on an undefined value at
/usr/local/lib/perl5/site_perl/5.6.1/OpenInteract.pm line 348.
************************************************
************************************************
I'm suspecting "Cannot save error 310..." is the issue.
Any assistance in tracking this one down would be greatly appreciated.
Let me know if there's any additional info I can provide that might be
helpful.
Chris, thanks for the all time & effort you've put in to OI, and I hope
all went well with your move last month. (=
Thanks in advance. .
-----
Eric Reeves - Network / Systems Administrator
1st Contact Technologies - 281.333.1444
|
|
From: Chris W. <ch...@cw...> - 2002-08-20 02:39:26
|
On Mon, 2002-08-19 at 18:30, Eric Reeves wrote: > I'm attempting to get OI 1.41 up and running w/ PgSQL, and am having a few > issues. I have the program working fine with MySQL, but would prefer to > use PgSQL. Ah, a man of my own tastes :-) > I have created an override_spops.perl in my site's conf dir, and have also > run "oi_manage change_spops_driver --driver=SPOPS::DBI::Pg", just to be > safe. The global override is the way to go and it works fine. (I do this all the time, so if this got broken it would get discovered and fixed in a hurry.) > Error log entry: > ... > Cannot save error 310: DBD::Pg::st execute failed: ERROR: value too long > for type character varying(60) at > /usr/local/lib/perl5/site_perl/5.6.1/SPOPS/SQLInterface.pm line 288. > at /usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/Error/System.pm line > 394 This is interesting. In all of OI there are only two tables with a character field of length 60: ./pkg/base_error/struct/sys_error.sql: filename varchar(60) not null, ./pkg/base_security/struct/sys_security.sql: class varchar(60) not null, And since this was an error I suspect that it had problems with the first of these. I'm not sure why it would, but in any case try dropping the table, changing the table definition to varchar(120) or something in $WEBSITE_DIR/pkg/base_error-x.xx/struct/sys_error.sql, then running: oi_manage install_sql --package=base_error --sql_action=structure I'm not sure this is the error, though. Session errors (310) should never be fatal since they can happen fairly often. In the error log we also have: > --EXITED WITH ERROR from main handler eval block > Error: Can't call method "discover_properties" on an undefined value at > /usr/local/lib/perl5/site_perl/5.6.1/OpenInteract.pm line 348. Which makes me think the theme wasn't retrieve properly. Can you do a: SELECT * FROM theme to see if a theme exists, and if so, do a: SELECT * FROM sys_security WHERE class = 'Intranet::Theme' to see if you get something like: oi=> select * from sys_security where class like '%::Theme'; sid | class | object_id | scope | scope_id | security_level 25 | OITest::Theme | 1 | w | world | 4 26 | OITest::Theme | 1 | g | 3 | 8 > Chris, thanks for the all time & effort you've put in to OI, and I hope > all went well with your move last month. (= Thanks! The move went pretty well, as did the ISP migration. I'm fairly settled now and hope to crack down on SPOPS and OI more shortly. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
|
From: Eric R. <er...@1s...> - 2002-08-20 04:21:50
|
On 19 Aug 2002, Chris Winters wrote: > This is interesting. In all of OI there are only two tables with a > character field of length 60: > > ./pkg/base_error/struct/sys_error.sql: filename varchar(60) not > null, > I increased sys_error.filename to varchar(120), and now the error is getting logged properly. Looks like I have a rather long path to the OI libs that was snagging it: "/usr/local/lib/perl5/site_perl/5.6.1/\ OpenInteract/Session/DBI.pm". I guess most people install perl in /usr/lib. (= I'm going to set this to varchar(80), now that I know what it was trying to squeeze in there. > > --EXITED WITH ERROR from main handler eval block > > Error: Can't call method "discover_properties" on an undefined value at > > /usr/local/lib/perl5/site_perl/5.6.1/OpenInteract.pm line 348. > > Which makes me think the theme wasn't retrieve properly. Can you do a: > . . and you were right. I noticed that the only theme present had a theme_id of 4, which didn't match up to the object_id's returned by the query you had me do on the sys_security table. I set this to 1, and it fired up! Now, I kinda suspect this might have something to do with the fact that this site used to use MySQL as a main datasource. I just changed it over to PgSQL and ran "oi_manage --package=INITIAL install_sql" again. Does a counter for theme_id get stored somewhere within $WEBSITE_DIR? Can you think of any other way this might have happened? I've been doing a lot of playing around with oi_manage + installing/removing/upgrading packages, so it's very possible I just did something you're not supposed to do along the way. Thanx. ----- Eric Reeves - Network / Systems Administrator 1st Contact Technologies - 281.333.1444 |
|
From: Eric R. <er...@1s...> - 2002-08-20 04:40:28
|
On Mon, 19 Aug 2002, Eric Reeves wrote: > Now, I kinda suspect this might have something to do with the fact that > this site used to use MySQL as a main datasource. I just changed it over > to PgSQL and ran "oi_manage --package=INITIAL install_sql" again. Does a > counter for theme_id get stored somewhere within $WEBSITE_DIR? Can you > think of any other way this might have happened? I've been doing a lot of > playing around with oi_manage + installing/removing/upgrading packages, so > it's very possible I just did something you're not supposed to do along > the way. > Now that it's up and running, I attempted to login and noticed the superuser account isn't working. I can log in, but I don't get any of the admin boxes, and when I click 'Edit my info', it attempts to look up user_id 4. I must have done something 4 times more than I should have to get all of these counters to increment. I figured as much. I'm going to wipe out the database & website directory in the morning, and start from scratch. I'm pretty sure that'll take care of it, but I'll let you know what happens. ----- Eric Reeves - Network / Systems Administrator 1st Contact Technologies - 281.333.1444 |
|
From: Chris W. <ch...@cw...> - 2002-08-20 11:52:17
|
On Tue, 2002-08-20 at 00:40, Eric Reeves wrote: > Now that it's up and running, I attempted to login and noticed the > superuser account isn't working. I can log in, but I don't get any of the > admin boxes, and when I click 'Edit my info', it attempts to look up > user_id 4. I must have done something 4 times more than I should have to > get all of these counters to increment. I figured as much. > > I'm going to wipe out the database & website directory in the morning, and > start from scratch. I'm pretty sure that'll take care of it, but I'll let > you know what happens. You can fix this and the theme problem by editing the following values in server.ini: [default_objects] superuser = 4 <-- supergroup = 1 theme = 4 <-- public_group = 2 site_admin_group = 3 You'll probably need to edit the group IDs as well; if you've installed everything four times it will probably be 10, 11 and 12. Good luck! Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
|
From: Eric R. <er...@1s...> - 2002-08-20 13:39:22
|
On 20 Aug 2002, Chris Winters wrote: > You can fix this and the theme problem by editing the following values > in server.ini: > > [default_objects] > superuser = 4 <-- > supergroup = 1 > theme = 4 <-- > public_group = 2 > site_admin_group = 3 > > You'll probably need to edit the group IDs as well; if you've installed > everything four times it will probably be 10, 11 and 12. > These values were all set correctly in the server.ini. I dropped every table in the db, wiped the website directory, and started over, but found that the values still hadn't reset. I had to drop the db completely from PgSQL before things were happy again. Thanks for the help. ----- Eric Reeves - Network / Systems Administrator 1st Contact Technologies - 281.333.1444 |
|
From: Kim H. <k...@oe...> - 2002-08-20 13:53:11
|
At Tue, 20 Aug 2002 08:39:16 -0500 (CDT), Eric Reeves wrote: >=20 > These values were all set correctly in the server.ini. I dropped every > table in the db, wiped the website directory, and started over, but found > that the values still hadn't reset. I had to drop the db completely from > PgSQL before things were happy again. That is probably because you hadn't dropped the sequences, the are not reset if you only drop the tables. --=20 Kim Hansen | |\ _,,,---,,_ | Det er ikke Dalslandsgade 8, A708 | /,`.-'`' -. ;-;;,_ | Jeopardy. 2300 K=F8benhavn S | |,4- ) )-,_. ,\ ( `'-' | Svar _efter_ Phone: 32 88 60 86 | '---''(_/--' `-'\_) | sp=F8rgsm=E5let. |
|
From: Eric R. <er...@1s...> - 2002-08-21 01:29:31
|
On Tue, 20 Aug 2002, Kim Hansen wrote: > That is probably because you hadn't dropped the sequences, the are not > reset if you only drop the tables. > Ah ha. That's good to know. Thanks. ----- Eric Reeves - Network / Systems Administrator 1st Contact Technologies - 281.333.1444 |