Re: [rt-users] unrecognized roll option "nocreateuser"

2017-03-06 Thread Peter Nikolaidis
I found this string in:
/opt/rt4/etc/acl.Pg

Peter

On Mon, Mar 6, 2017 at 11:31 AM, BALLANTINE, JAMES W <jb7...@att.com> wrote:

> I'm trying to install rt on a RHEL7 system, and have apache2, perl
> 5.24.1 and postgresql-9.5.6 installed.
>
> When I try to run make initialize-database, it fails with :
>
> Now inserting database ACLs.
> [73393] [Mon Mar  6 14:46:20 2017] [warning]: DBD::Pg::st execute
> failed: ERROR:  unrecognized role option "nocreateuser"
> LINE 1: ...tuser" WITH PASSWORD 'XX' NOCREATEDB NOCREATEUS...
>  ^ at
> /usr/local/add-on/src/rt-4.4.1/sbin/../lib/RT/Handle.pm line 476.
> (/usr/local/add-on/src/rt-4.4.1/sbin/../lib/RT/Handle.pm:476)
> [73393] [Mon Mar  6 14:46:20 2017] [critical]: DBD::Pg::st execute
> failed: ERROR:  unrecognized role option "nocreateuser"
> LINE 1: ...tuser" WITH PASSWORD 'XX' NOCREATEDB NOCREATEUS...
>  ^ at
> /usr/local/add-on/src/rt-4.4.1/sbin/../lib/RT/Handle.pm line 476.
> (/usr/local/add-on/src/rt-4.4.1/sbin/../lib/RT.pm:390)
> DBD::Pg::st execute failed: ERROR:  unrecognized role option "nocreateuser"
> LINE 1: ...tuser" WITH PASSWORD '' NOCREATEDB NOCREATEUS...
>  ^ at
> /usr/local/add-on/src/rt-4.4.1/sbin/../lib/RT/Handle.pm line 476.
> make: *** [initialize-database] Error 255
>
> If I do a find . -depth -type f | grep -i NOCREATEUSER, it find
> nothing.  Now i understand that NOCREATEUSER was removed in
> pg-9.6, but why doesn't the make complete, and where is the NOCREATEUSER
> coming from?
>
> Thanks
>
> Jim Ballantine
> -
> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
> * Paris - April 24-26, 2017
>



-- 
Peter Nikolaidis
CISSP
<https://webportal.isc2.org/custom/CertificationVerificationResults.aspx?FN=Peter=Nikolaidis=453003>
, GCFE <https://www.giac.org/certified-professional/peter-nikolaidis/118082>
, GCIH <https://www.giac.org/certified-professional/peter-nikolaidis/118082>
, GPPA <http://www.giac.org/certified-professional/peter-nikolaidis/118082>
, GSNA <http://www.giac.org/certified-professional/peter-nikolaidis/118082>
Paradigm Consulting Co.
MA:617.517.2940 * NH:603.676.7119 * VT:802.234.6368
http://pa.radigm.com
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Paris - April 24-26, 2017

Re: [rt-users] Regex in scrip won't match multi-line strings

2017-03-03 Thread Peter Nikolaidis
Apparently I'm still doing something wrong and regex is kicking my butt.

Sample message body:
-
* Stopping Asterisk PBX: asterisk
...done.
* Starting Asterisk PBX: asterisk
...done.
-

Patterns I've tried:
-
1:
(($self->TicketObj->Subject =~ /Cron \<root\@pbx\> \/etc\/init\.d\/asterisk
restart/) && # Successful cron jobs.
($self->TicketObj->Body =~ /\* Starting Asterisk PBX\:
asterisk\n\.\.\.done\./m)

2:
(($self->TicketObj->Subject =~ /Cron \<root\@pbx\> \/etc\/init\.d\/asterisk
restart/) && # Successful cron jobs.
($self->TicketObj->Body =~ /\* Starting Asterisk PBX\:
asterisk.*\.\.\.done\./ms))
3:
(($self->TicketObj->Subject =~ /Cron \<root\@pbx\> \/etc\/init\.d\/asterisk
restart/) && # Successful cron jobs.
($self->TicketObj->Body =~ /^\* Starting Asterisk PBX\:
asterisk.*\.\.\.done\.$/ms)) ||
-

Any ideas?

Thanks,

Peter

On Mon, Feb 27, 2017 at 10:57 AM, Matt Zagrabelny <mzagr...@d.umn.edu>
wrote:

> On Mon, Feb 27, 2017 at 9:48 AM, Peter Nikolaidis <pet...@paradigmcc.com>
> wrote:
> > Hi all,
> >
> > I'm trying to automatically resolve tickets that don't require any
> action.
> > In this example, I receive a backup notification. I know it's a backup
> > script result email based on the subject, and I know the backup was
> > successful (and therefore I can auto-resolve the ticket) if another regex
> > matches the body. When I match against the subject line alone, it works.
> > However, when I try to match against the mutli-line body, it never
> matches
> > (even though when I run the regex against the string in a test, it
> matches
> > as expected).
> >
> > Are multi-line matches not an option, or do I need to test in another
> way?
>
> From:
>
> http://perldoc.perl.org/perlre.html
>
> """
> Modifier m
>
> Treat the string as multiple lines. That is, change "^" and "$" from
> matching the start of the string's first line and the end of its last
> line to matching the start and end of each line within the string.
> """
> I almost always use /xms for my REs. This allows for significant
> readability - at the cost of significant number of lines. Check out
> Damian Conway's "Perl Best Practices" Regular Expression chapter.
>
> -m
>
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Paris - April 24-26, 2017

Re: [rt-users] Use lifecycle to set status and invoke Dates page?

2017-02-27 Thread Peter Nikolaidis
Hi Matt,

Thanks for the reply. What woudl be the callback/action to take someone to
the Dates page for a ticket?

Thanks again,

Peter

On Mon, Feb 27, 2017 at 9:22 AM, Matt Zagrabelny <mzagr...@d.umn.edu> wrote:

> Hi Peter,
>
> On Sun, Feb 26, 2017 at 7:59 PM, Peter Nikolaidis <pet...@paradigmcc.com>
> wrote:
> > Hi,
> >
> > I'd like to have a lifecycle action called "schedule," which would set
> the
> > ticket's status to "scheduled" and take the user to the ticket's Dates
> page
> > so they could set a due date. It's this possible?
>
> Just for clarity, the action isn't necessarily lifecycle related - it
> certainly could be, though. Statuses are a component of lifecyles,
> though.
>
> You can tweak the Actions menu to your desires. We do all sorts of
> modifications. There are Menu callbacks to inject your local tweaks
> into the Actions menu.
>
> -m
>



-- 
Peter Nikolaidis
CISSP
<https://webportal.isc2.org/custom/CertificationVerificationResults.aspx?FN=Peter=Nikolaidis=453003>
, GCFE <https://www.giac.org/certified-professional/peter-nikolaidis/118082>
, GCIH <https://www.giac.org/certified-professional/peter-nikolaidis/118082>
, GPPA <http://www.giac.org/certified-professional/peter-nikolaidis/118082>
, GSNA <http://www.giac.org/certified-professional/peter-nikolaidis/118082>
Paradigm Consulting Co.
MA:617.517.2940 * NH:603.676.7119 * VT:802.234.6368
http://pa.radigm.com


[rt-users] Regex in scrip won't match multi-line strings

2017-02-27 Thread Peter Nikolaidis
Hi all,

I'm trying to automatically resolve tickets that don't require any action.
In this example, I receive a backup notification. I know it's a backup
script result email based on the subject, and I know the backup was
successful (and therefore I can auto-resolve the ticket) if another regex
matches the body. When I match against the subject line alone, it works.
However, when I try to match against the mutli-line body, it never matches
(even though when I run the regex against the string in a test, it matches
as expected).

Are multi-line matches not an option, or do I need to test in another way?
This is an extract of the test I am running:

(($self->TicketObj->Subject =~ /Cron \<root\@blah\> \/usr\/bin\/s3cmd sync
\/var\/spool\/blah\/ s3\:\/\/somes3buckethere\//) &&
($self->TicketObj->Body =~ /Done\. Uploaded \d* bytes in \d\.\d seconds/))

Thank you,

Peter
-- 
Peter Nikolaidis
CISSP
<https://webportal.isc2.org/custom/CertificationVerificationResults.aspx?FN=Peter=Nikolaidis=453003>
, GCFE <https://www.giac.org/certified-professional/peter-nikolaidis/118082>
, GCIH <https://www.giac.org/certified-professional/peter-nikolaidis/118082>
, GPPA <http://www.giac.org/certified-professional/peter-nikolaidis/118082>
, GSNA <http://www.giac.org/certified-professional/peter-nikolaidis/118082>
Paradigm Consulting Co.
MA:617.517.2940 <(617)%20517-2940> * NH:603.676.7119 <(603)%20676-7119>
* VT:802.234.6368 <(802)%20234-6368>
http://pa.radigm.com


[rt-users] Use lifecycle to set status and invoke Dates page?

2017-02-26 Thread Peter Nikolaidis
Hi, 
I'd like to have a lifecycle action called "schedule," which would set the 
ticket's status to "scheduled" and take the user to the ticket's Dates page so 
they could set a due date. It's this possible? 
Thanks,
Peter

--
Peter Nikolaidis, CISSP, GCFE, GCIH, GPPA, GSNA
http://ParadigmCC.com
Ph: 617.517.2940


[rt-users] rt could not create user from command line

2017-02-24 Thread Peter Nikolaidis
Greetings,

I have a number of users to create. Large enough that I don't want to do it
by hand. I figured I'd just script the rt command line tool to run against
a CSV file, but when I try even a single user from the command line, I get
the following output

$ rt create -t user set Name="Joe Blow" EmailAddress=joe.b...@example.com \
Organization="Example Organization Password="asdhjrewkj" Comments=" "
rt: # Could not create user.
# Could not create user.

Any idea what I'm doing wrong?

Thanks,

Peter
-- 
Peter Nikolaidis
CISSP
<https://webportal.isc2.org/custom/CertificationVerificationResults.aspx?FN=Peter=Nikolaidis=453003>
, GCFE <https://www.giac.org/certified-professional/peter-nikolaidis/118082>
, GCIH <https://www.giac.org/certified-professional/peter-nikolaidis/118082>
, GPPA <http://www.giac.org/certified-professional/peter-nikolaidis/118082>
, GSNA <http://www.giac.org/certified-professional/peter-nikolaidis/118082>
Paradigm Consulting Co.
MA:617.517.2940 * NH:603.676.7119 * VT:802.234.6368
http://pa.radigm.com


Re: [rt-users] RT 4 on Amazon EC2

2017-02-22 Thread Peter Nikolaidis
Sorry- too quick with the send button. I did have to add a separate swap 
partition because my instance was indeed running out of memory. I also was not 
able to quickly get fcgi working, so I just moved on with standard Apache2. I 
am using the Amazon Ubuntu AMI.
Peter

--
Peter Nikolaidis, CISSP, GCFE, GCIH, GPPA, GSNA
http://ParadigmCC.com
Ph: 617.517.2940




On Tue, Feb 21, 2017 at 2:11 PM -0500, "François Meehan" <fmee...@vuwall.com> 
wrote:










Hi, 
I have restored a production instance of RT to an Amazon EC2 t2.small virtual 
machine. It has 2 Gig of RAM. 
I can’t get Apache with Mod_FCGI to work but RT will run ok when using the 
stand alone server. 

There are no error message to help. 
One particularity of EC2 is that is does not have a memory Swap file 
configured. I wonder if this can cause the issue. 
Has anyone successful at running RT 4 on EC2?
Thanks in advance, 
-- 


















François MEEHAN
IT Administrator
Administrateur TI


T: +1 514-505-4436
Skype: VuWall-Support















Re: [rt-users] RT 4 on Amazon EC2

2017-02-22 Thread Peter Nikolaidis
Hi François,
I just recently moved back to RT after three years of coping with ConnectWise 
and Autotask. I am presently running RT/Apache on a t2 nano and Postgres on 
another t2 nano instance. I have not noticed the behavior you reported, but 
have noticed that, sometime in the last week or so, apache2ctl restart no 
longer works, but /etc/init.d/apache2ctl restart does. I haven't had time to 
investigate this yet. 
Best,
Peter 

--
Peter Nikolaidis, CISSP, GCFE, GCIH, GPPA, GSNA
http://ParadigmCC.com
Ph: 617.517.2940
_
From: François Meehan <fmee...@vuwall.com>
Sent: Tuesday, February 21, 2017 2:11 PM
Subject: [rt-users] RT 4 on Amazon EC2
To:  <rt-users@lists.bestpractical.com>


Hi, 
I have restored a production instance of RT to an Amazon EC2 t2.small virtual 
machine. It has 2 Gig of RAM. 
I can’t get Apache with Mod_FCGI to work but RT will run ok when using the 
stand alone server. 

There are no error message to help. 
One particularity of EC2 is that is does not have a memory Swap file 
configured. I wonder if this can cause the issue. 
Has anyone successful at running RT 4 on EC2?
Thanks in advance, 
-- 




François MEEHAN
IT Administrator
Administrateur TI   
 T: +1 514-505-4436
Skype: VuWall-Support   
 



Re: [rt-users] 0 results after corrupt sessions table, myisamchk

2008-08-25 Thread Peter Nikolaidis
Ruslan Zakirov wrote:

 Most of RT's table MUST use InnoDB engine to work correctly. I'm not
 sure what's going on but I have feeling that you've disabled innodb
 and mysql went wild after that.

Hi Ruslan,

To my knowledge, we've never used InnoDB on this system. We upgraded to
3.6.6 months ago, and 3.8.0 about a week ago.

Can we convert and somehow get access to the data again?

Thanks,

Peter
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

[rt-users] SOLVED 0 results after corrupt sessions table, myisamchk

2008-08-25 Thread Peter Nikolaidis
Problem solved.

I wrote a loop to go through and convert all of  my tables to InnoDB. It
choked on the Tickets table, so I ran a myisamchk -r Tickets on it,
which repaired 7 indexes. I was then able to successfully convert it to
InnoDB along with the rest of the tables.

Oh Happy Day! It's working! Everything seems to be working perfectly again!

I need to run some more tests, but I think this was just a case of
MyISAM indexes being corrupted. I don't know why, but I guess we've been
dodging bullets for years because AFAIK, we've run MyISAM since we first
installed RT 3.4 way back when. Now we know better.

Thanks again to Ruslan and Tim for their help.

Best regards,

Peter
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] 0 results after corrupt sessions table, myisamchk

2008-08-24 Thread Peter Nikolaidis
On Friday afternoon, for no apparent reason, while I was the only user
on my RT 3.8.0 system, after clicking a link, I was presented with the
logon prompt.

Puzzled, I entered my username and password and logged back in.
Everything seemed normal, and the ticket I was trying to edit was there.
I continued my edits, and clicked to update the ticket.

Login prompt again.

I tried using a different browser (trusty Firefox instead of Opera,
which I've been experimenting with lately). Same thing. Login prompt
after every click.

Some research in the RT Mailing List finally led me to uncomment the
following line in my RT_SiteConfig.pm file:

Set($WebSessionClass, 'Apache::Session::File');

Doing this, and restarting Apache fixed the problem. Or so it seemed...

Last night, while reviewing the server's backups, I realized that the
nightly MySQL dump from the 22nd was much smaller than previous nights'
backups. Curious, I re-ran the backup script. It immediately failed,
saying that rt3.sessions was corrupt.

Session? That sounds familiar... More Googling. I found several
references to the same sort of problems. One fix I found was to run
myisamchk on the data file in question which, in this case, was
/var/lib/mysql/rt3/sessions.MYI. I did this, and it identified errors. I
proceeded to run myisamchck -r -q sessions in the data directory. It
threw a lot of data on the screen, and appeared to be repairing lots of
stuff.

So this explains the sudden need to add this line to my RT_SiteConfig.pm
where it was never needed previously - database corruption. One mystery
solved.

I figured if the sessions table was corrupt, maybe running a quick
repair on the rest of the tables would be a good idea. I wrote up a
quick bash script to loop through all of the table files in the
directory and myisamchck -r -q all of them.

Here's the puzzling part where my memory gets a little fuzzy. I am
fairly certain that RT was working fine after this, and I went to bed.
This morning, I attempted to log in, did so, but then saw no tickets!
Clicking my saved bookmarks to take me directly to my preferred view of
a queue showed 0 tickets. Similarly, requesting all new and open
tickets in my support queue from the command line returned 0 results.

However, if I fire up mysql, I can select data from the tables just fine.

I pulled a copy of last night's mysqldump, and attempted to open it in
Notepad++, which I was using to take notes (since I couldn't very well
take notes into RT, could I?). Bad idea. Notepad++ crashed, taking all
of my notes (essentially, everything you've read up to this point) down
with it.

So it seems I have a couple of options: attempt to roll back to the
latest known good MySQL dump, which may be 3-4 days old at this point,
or figure out what happened to the files (indexes?) and repair them.

Any suggestions greatly appreciated.

Thanks,

Peter

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] 0 results after corrupt sessions table, myisamchk

2008-08-24 Thread Peter Nikolaidis
Additional info:

After a short while, I observed the rt.log file was growing at an
astounding rate, and quickly grew to fill up the entire available space.
Every second or faster, it was filling up with the lines below. Inspired
by the first line, I ran another myisamchck against the Attributes.MYI file.

Now the RT homepage is loading, and I can again see all of my queues,
but it's still showing as having no tickets in any of them. There are
1.2GB of files in /var/lib/mysql/rt3, so the data's got to be there, but
I still need suggestions on how to get RT to realize this.

I've also observed that if I try to select all tickets that are open and
in the 'support' queue, I get no results. But if I list only tickets
whose status is 'open', I see the expected results. However, if I click
on any of them, I cannot open it.

Any advice greatly appreciated.

Thanks,

Peter

[Mon Aug 25 02:14:04 2008] [warning]: DBD::mysql::st execute failed:
Incorrect key file for table './rt3/Attributes.MYI'; try to repair it at
/usr/local/share/perl/5.8.8/DBIx/SearchBuilder/Handle.pm line 505
, GEN27 line 4.
(/usr/local/share/perl/5.8.8/DBIx/SearchBuilder/Handle.pm:505)
[Mon Aug 25 02:14:05 2008] [warning]: RT::Handle=HASH(0x9fd6e84)
couldn't execute the query 'SELECT main.* FROM Attributes main  WHERE
(main.ObjectType = 'RT::User') AND (main.ObjectId = 35) ' at /usr/local/
share/perl/5.8.8/DBIx/SearchBuilder/Handle.pm line 518
   
DBIx::SearchBuilder::Handle::SimpleQuery('RT::Handle=HASH(0x9fd6e84)',
'SELECT main.* FROM Attributes main  WHERE (main.ObjectType = ...')
called at /usr/local/share/perl/5.8.8/DBIx/SearchBuilder.pm
line 238
DBIx::SearchBuilder::_DoSearch('RT::Attributes=HASH(0xa67447c)')
called at /usr/local/rt3.8/bin/../lib/RT/Attributes_Overlay.pm line 74
RT::Attributes::_DoSearch('RT::Attributes=HASH(0xa67447c)')
called at /usr/local/share/perl/5.8.8/DBIx/SearchBuilder.pm line 498
DBIx::SearchBuilder::Next('RT::Attributes=HASH(0xa67447c)')
called at /usr/local/rt3.8/bin/../lib/RT/Attributes_Overlay.pm line 82
   
RT::Attributes::_BuildAccessTable('RT::Attributes=HASH(0xa67447c)')
called at /usr/local/rt3.8/bin/../lib/RT/Attributes_Overlay.pm line 75
RT::Attributes::_DoSearch('RT::Attributes=HASH(0xa67447c)')
called at /usr/local/rt3.8/bin/../lib/RT/Attributes_Overlay.pm line 90
RT::Attributes::_AttrHash('RT::Attributes=HASH(0xa67447c)')
called at /usr/local/rt3.8/bin/../lib/RT/Attributes_Overlay.pm line 121
RT::Attributes::Named('RT::Attributes=HASH(0xa67447c)',
'AuthToken') called at /usr/local/rt3.8/bin/../lib/RT/Record.pm line 239
RT::Record::FirstAttribute('RT::User=HASH(0xa50fe00)',
'AuthToken') called at /usr/local/rt3.8/bin/../lib/RT/User_Overlay.pm
line 1011
RT::User::AuthToken('RT::User=HASH(0xa50fe00)') called at
/usr/local/rt3.8/bin/../lib/RT/User_Overlay.pm line 1049
RT::User::GenerateAuthString('RT::User=HASH(0xa50fe00)', 'Queue
= \'support\' AND (Status = \'open\' OR Status = \'new\')') called at
/usr/local/rt3.8/share/html/Search/Elements/ResultViews line 74
HTML::Mason::Commands::__ANON__('QueryString',
'?Format=%0A%20%20%20\'%3CB%3E%3CA%20HREF%3D%22__WebPath__%2FT...',
'Query', 'Queue = \'support\' AND (Status = \'open\' OR Status =
\'new\')', 'Format'
, '\x{a}   \'BA
HREF=__WebPath__/Ticket/Display.html?id=__id__...', 'Rows', 50,
'OrderBy', ...) called at
/usr/local/share/perl/5.8.8/HTML/Mason/Component.pm line 135
   
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xa6743ec)',
'QueryString',
'?Format=%0A%20%20%20\'%3CB%3E%3CA%20HREF%3D%22__WebPath__%2FT...',
'Query', 'Queue = \'support\' AND (
Status = \'open\' OR Status = \'new\')', 'Format', '\x{a}   \'BA
HREF=__WebPath__/Ticket/Display.html?id=__id__...', 'Rows', 50, ...)
called at /usr/local/share/perl/5.8.8/HTML/Mason/Request.pm line 12
84
eval {...} called at
/usr/local/share/perl/5.8.8/HTML/Mason/Request.pm line 1274
HTML::Mason::Request::comp('undef', 'undef', 'QueryString',
'?Format=%0A%20%20%20\'%3CB%3E%3CA%20HREF%3D%22__WebPath__%2FT...',
'Query', 'Queue = \'support\' AND (Status = \'open\' OR Status = \'new\
')', 'Format', '\x{a}   \'BA
HREF=__WebPath__/Ticket/Display.html?id=__id__...', 'Rows', ...)
called at /usr/local/rt3.8/share/html/Search/Results.html line 83
HTML::Mason::Commands::__ANON__('pass', 'passwordwouldgohere',
'Rows', 50, 'Format', '', 'Page', 1, 'Order', ...) called at
/usr/local/share/perl/5.8.8/HTML/Mason/Component.pm line 135
   
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xa518be8)',
'pass', 'mypasswordwouldbehere', 'Rows', 50, 'Format', '', 'Page', 1,
...) called at /usr/local/share/perl/5.8.8/HTML/Mason/Request.
pm line 1284
eval {...} called at
/usr/local/share/perl/5.8.8/HTML/Mason/Request.pm line 1274
HTML::Mason::Request::comp('undef', 'undef', 'undef', 'pass',
'mypasswordwouldbehere', 'Rows', 50, 'Format', '', ...) called at