[freeside-users] Rebuilding a new database doesn't work with freeside-setup.

John Wilson johnwilson1969 at gmail.com
Wed Apr 5 17:00:48 PDT 2017


Looks like an issue with rt. Did you drop those tables? And if so, did you
recreate the schema?

$ su freeside
$ /opt/rt3/sbin/rt-setup-database --action schema
$ /opt/rt3/sbin/rt-setup-database --action coredata
$ /opt/rt3/sbin/rt-setup-database --action insert --datafile
/opt/rt3/etc/initialdata

On Tue, Apr 4, 2017, 2:59 PM Ernie Dunbar <maillist at lightspeed.ca> wrote:

> Hi everyone.
>
> We have a Freeside server set up and working perfectly, using Freeside 4.2.
>
> I'm trying to dump all the test data we've inserted into Freeside so far,
> and start fresh. The normal way a database administrator would do this is
> to drop the database and then re-insert the database schema.
>
> However, attempting to do it like this:
>
> # /etc/init.d/freeside stop
> # /etc/init.d/apache stop
>
> # su freeside
>
> $ createdb -E UTF8 freeside
> $ freeside-setup -d lightspeed.ca
> $ freeside-adduser -g 1 fs_queue
> $ freeside-adduser -g 1 fs_daily
> $ freeside-adduser -g 1 fs_selfservice
> $ freeside-adduser -g 1 fs_api
> $ freeside-adduser -g 1 myuser mypass
> $ exit
> # freeside-queued fs_queue
> # /etc/init.d/freeside start
> # /etc/init.d/apache2 start
>
> only results in an error like this, when I try to log in with "myuser" and
> "mypass", which definitely, *definitely* got created properly:
>
> *System error*
> *error:*  Can't call method "HasRight" on an undefined value at
> /opt/rt3/lib/RT/User.pm line 1274.
> *context:*
> *...*
> *1270:*  =cut
> *1271:*
> *1272:*  sub HasRight {
> *1273:*  my $self = shift;
> *1274:*  return $self->PrincipalObj->HasRight(@_);
> *1275:*  }
> *1276:*
> *1277:*  =head2 CurrentUserCanSee [FIELD]
> *1278:*
> *...*
> *code stack:*  /opt/rt3/lib/RT/User.pm:1274
> /usr/share/perl5/FS/TicketSystem/RT_Internal.pm:47
> /usr/share/perl5/FS/TicketSystem.pm:28
> /var/www/html/freeside/elements/header-full.html:85
> /var/www/html/freeside/elements/header.html:5
> /var/www/html/freeside/index.html:4
> /var/www/html/freeside/autohandler:1
> raw error <https://freeside.lightspeed.ca/freeside/index.html#raw>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Can't call method "HasRight" on an undefined value at /opt/rt3/lib/RT/User.pm line 1274.
>
>
> Trace begun at /usr/share/perl5/HTML/Mason/Exceptions.pm line 129
> HTML::Mason::Exceptions::rethrow_exception('Can\'t call method "HasRight" on an undefined value at /opt/rt3/lib/RT/User.pm line 1274.^J') called at /opt/rt3/lib/RT/User.pm line 1274
> RT::User::HasRight('RT::CurrentUser=HASH(0x7ff1a8430a38)', 'Right', 'ModifySelf', 'Object', 'RT::System=HASH(0x7ff1a1abbb48)') called at /usr/share/perl5/FS/TicketSystem/RT_Internal.pm line 47
> FS::TicketSystem::RT_Internal::access_right('FS::TicketSystem::RT_Internal', 'HASH(0x7ff19782b170)', 'ModifySelf') called at /usr/share/perl5/FS/TicketSystem.pm line 28
> FS::TicketSystem::AUTOLOAD('FS::TicketSystem', 'HASH(0x7ff19782b170)', 'ModifySelf') called at /var/www/html/freeside/elements/header-full.html line 85
> HTML::Mason::Commands::__ANON__('Billing Main') called at /usr/share/perl5/HTML/Mason/Component.pm line 138
> HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7ff1a833aec0)', 'Billing Main') called at /usr/share/perl5/HTML/Mason/Request.pm line 1305
> eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1295
> HTML::Mason::Request::comp(undef, undef, 'Billing Main') called at /var/www/html/freeside/elements/header.html line 5
> HTML::Mason::Commands::__ANON__('Billing Main') called at /usr/share/perl5/HTML/Mason/Component.pm line 138
> HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7ff1a82cdb00)', 'Billing Main') called at /usr/share/perl5/HTML/Mason/Request.pm line 1305
> eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1295
> HTML::Mason::Request::comp(undef, undef, 'Billing Main') called at /var/www/html/freeside/index.html line 4
> HTML::Mason::Commands::__ANON__ at /usr/share/perl5/HTML/Mason/Component.pm line 138
> HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7ff1a82eecc0)') called at /usr/share/perl5/HTML/Mason/Request.pm line 1305
> eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1295
> HTML::Mason::Request::comp(undef, undef, undef) called at /usr/share/perl5/HTML/Mason/Request.pm line 958
> HTML::Mason::Request::call_next('FS::Mason::Request=HASH(0x7ff1a17722c8)') called at /var/www/html/freeside/autohandler line 1
> HTML::Mason::Commands::__ANON__ at /usr/share/perl5/HTML/Mason/Component.pm line 138
> HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7ff1a82622e8)') called at /usr/share/perl5/HTML/Mason/Request.pm line 1303
> eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1295
> HTML::Mason::Request::comp(undef, undef, undef) called at /usr/share/perl5/HTML/Mason/Request.pm line 484
> eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 484
> eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 436
> HTML::Mason::Request::exec('FS::Mason::Request=HASH(0x7ff1a17722c8)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 165
> HTML::Mason::Request::ApacheHandler::exec('FS::Mason::Request=HASH(0x7ff1a17722c8)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 831
> HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x7ff1a4c57728)', 'Apache2::RequestRec=SCALAR(0x7ff1a4d0c600)') called at /usr/local/etc/freeside/handler.pl line 153
> eval {...} at /usr/local/etc/freeside/handler.pl line 153
> HTML::Mason::handler('Apache2::RequestRec=SCALAR(0x7ff1a4d0c600)') called at -e line 0
> eval {...} at -e line 0
>
>
> I suppose I can blow away the server and rebuild it again from scratch,
> but all those perl dependencies were not easy to build the first time
> around, and the ones that needed to be installed through cpan took a long
> time. There's got to be a faster way to accomplish this.
> _______________________________________________
> freeside-users mailing list
> freeside-users at freeside.biz
> http://freeside.biz/cgi-bin/mailman/listinfo/freeside-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://freeside.biz/pipermail/freeside-users/attachments/20170406/babea801/attachment-0001.html>


More information about the freeside-users mailing list