Re: [rt-users] Migration from MySQL to PostreSQL - corrupt characters (german umlaut)

2015-10-08 Thread Maik Nergert
I found an older post on the PostgreSQL mailinglist with same problems 
http://www.postgresql.org/message-id/d960cb61b694cf459dcfb4b0128514c207bb6...@exadv11.host.magwien.gv.at



And I was able to fix the issue by dumping and re-importing the db!


# Create empty PG-DB
rt-setup-database --action create,schema,acl --dba rt_user 
--dba-password DBPASS


# Run importer
rt-importer PATH

# Run Update-Pg-Sequences Script 
(http://requesttracker.wikia.com/wiki/MigrateMysql2PostgresqlV4#Import_your_RT_database)


# Dump DB as latin1
pg_dump -E LATIN1 rt4 > rt4latin.sql

# Replace client_encoding
sed -i 's/LATIN1/UTF8/' rt4latin.sql

# Recreate empty DB
rt-setup-database --action drop --dba rt_user --dba-password DBPASS
rt-setup-database --action create,schema,acl --dba rt_user 
--dba-password DBPASS


# Import DB
psql rt4 < rt4latin.sql



smime.p7s
Description: S/MIME Cryptographic Signature


[rt-users] Ticket Links missing post upgrade/conversion to Oracle 4.2.11.

2015-10-08 Thread Hummer, Greg
Good Morning,

After upgrading and converting request tracker from MySQL 4.0.6 to Oracle 
4.2.11, users noticed that the linked tickets were no longer visible.

There are bullet points for each linked ticket in the “Links” pane and the 
“Link ticket” tab, however the ticket text, number, and hyperlink are not 
visible.

Interestingly enough, if you go into the “Link ticket” tab and use chrome's 
Inspect Element feature on the “check to delete box” for the blank linked 
ticket lines, you can see where the element lists the ticket that should be 
linked (example: input type=“checkbox” class=“checkbox” id=“DeleteLink 
–RefersTo-fsck.com-rt://example.come/ticket/110566” 
name=DeleteLink—RefersTo-fsck.com-rt://example.com/ticket/110556” value=”1”>).

Has anyone else experienced a similar issue and found a way to make the 
text/link re-appear? It is obvious that the data still exists.

Note: For our conversion, we used rt-validator, rt-serializer, and rt-importer. 
New links, created after the upgrade/conversion, do appear and function as 
expected.

Thank you for your time and support.

Greg




Re: [rt-users] Regarding Apache server failure

2015-10-08 Thread bharath reddy
Hi Matt,

Thanks for replying back, here are the details :

Distro :
root@devrt:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="12.04.3 LTS, Precise Pangolin"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu precise (12.04.3 LTS)"
VERSION_ID="12.04"

cd /var/log
ls -lrt (I'm showing only latest)
-rw-r- 1 syslogadm  124 Oct  8 09:58 kern.log
-rw-r- 1 root  adm  529 Oct  8 09:58 apport.log
-rw-r- 1 syslogadm 3086 Oct  8 10:00 syslog
-rw-r- 1 syslogadm   113879 Oct  8 10:00 auth.log

root@devrt:/var/log# cat kern.log
Oct  8 09:58:10 devrt kernel: [3001033.121438] /usr/sbin/apach[5529]:
segfault at b54d9f80 ip b54d9f80 sp bfc702dc error 14

root@devrt:/var/log# cat apport.log
ERROR: apport (pid 5532) Thu Oct  8 09:58:11 2015: called for pid 5529,
signal 11
ERROR: apport (pid 5532) Thu Oct  8 09:58:11 2015: executable:
/usr/lib/apache2/mpm-prefork/apache2 (command line "/usr/sbin/apache2 -k
start")
ERROR: apport (pid 5532) Thu Oct  8 09:58:11 2015: is_closing_session(): no
DBUS_SESSION_BUS_ADDRESS in environment
ERROR: apport (pid 5532) Thu Oct  8 09:58:11 2015: apport: report
/var/crash/_usr_lib_apache2_mpm-prefork_apache2.0.crash already exists and
unseen, doing nothing to avoid disk usage DoS

root@devrt:/var/log# cat syslog
Oct  8 09:58:10 devrt kernel: [3001033.121438] /usr/sbin/apach[5529]:
segfault at b54d9f80 ip b54d9f80 sp bfc702dc error 14
Oct  8 10:00:01 devrt CRON[5582]: (smmsp) CMD (test -x /etc/init.d/sendmail
&& /usr/share/sendmail/sendmail cron-msp)

cd /var/log/apache2
ls -lrt

last updated file under this directory is on oct 6th
rw-r--r-- 1 root root  0 Oct  6 15:33 error.log

Is there any way I can enable more debug messages through apache ?

Thanks,
Bharath.





















On Tue, Oct 6, 2015 at 4:16 PM, Matt Zagrabelny  wrote:

> On Tue, Oct 6, 2015 at 3:09 PM, bharath reddy 
> wrote:
> > Dear All,
> >
> > I'm trying to configure RT to communicate with my LDAP, for which I
> followed
> > this link : https://metacpan.org/pod/RT::Authen::ExternalAuth . After
> making
> > the required changes, when I restarted my apache server it is failing
> with
> > following error :
> >
> > root@devrt:/rt/etc# /etc/init.d/apache2 start
> >  * Starting web server apache2
> > Segmentation fault (core dumped)
> > Action 'start' failed.
> > The Apache error log may have more information.
> >...fail!
> >
> > There is no important messages in log files:
> >
> > root@devrt:/rt/etc# cat /var/log/apache2/error.log
> > [Tue Oct 06 15:13:41 2015] [info] Init: Seeding PRNG with 648 bytes of
> > entropy
> > [Tue Oct 06 15:13:41 2015] [info] Loading certificate & private key of
> > SSL-aware server
> > [Tue Oct 06 15:13:41 2015] [debug] ssl_engine_pphrase.c(470): unencrypted
> > RSA private key - pass phrase not required
> > [Tue Oct 06 15:13:41 2015] [info] Init: Initializing (virtual) servers
> for
> > SSL
> > [Tue Oct 06 15:13:41 2015] [info] Configuring server for SSL protocol
> > [Tue Oct 06 15:13:41 2015] [debug] ssl_engine_init.c(367): Creating new
> SSL
> > context (protocols: TLSv1, TLSv1.1, TLSv1.2)
> > [Tue Oct 06 15:13:41 2015] [debug] ssl_engine_init.c(541): Configuring
> > client authentication
> > [Tue Oct 06 15:13:41 2015] [debug] ssl_engine_init.c(1218): CA
> certificate:
> > /C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust
> External CA
> > Root
> > [Tue Oct 06 15:13:41 2015] [debug] ssl_engine_init.c(1218): CA
> certificate:
> > /C=US/O=Internet2/OU=InCommon/CN=InCommon Server CA
> > [Tue Oct 06 15:13:41 2015] [debug] ssl_engine_init.c(608): Configuring
> > permitted SSL ciphers [!aNULL:!eNULL:!EXP:HIGH:MEDIUM:!ADH:!MD5]
> > [Tue Oct 06 15:13:41 2015] [debug] ssl_engine_init.c(316): Configuring
> TLS
> > extension handling
> > [Tue Oct 06 15:13:41 2015] [debug] ssl_engine_init.c(739): Configuring
> RSA
> > server certificate
> > [Tue Oct 06 15:13:41 2015] [debug] ssl_engine_init.c(785): Configuring
> RSA
> > server private key
> > [Tue Oct 06 15:13:41 2015] [info] mod_ssl/2.2.22 compiled against Server:
> > Apache/2.2.22, Library: OpenSSL/1.0.1
>
> What distro are you using?
>
> To see the most recently written to log files, try:
>
> cd /var/log
> ls -lrt
>
> and
>
> cd /var/log/apache2
> ls -lrt
>
> -m
>


Re: [rt-users] Regarding Apache server failure

2015-10-08 Thread Matt Zagrabelny
On Thu, Oct 8, 2015 at 9:21 AM, bharath reddy  wrote:
> Hi Matt,
>
> Thanks for replying back, here are the details :
>
> Distro :
> root@devrt:~# cat /etc/os-release
> NAME="Ubuntu"
> VERSION="12.04.3 LTS, Precise Pangolin"
> ID=ubuntu
> ID_LIKE=debian
> PRETTY_NAME="Ubuntu precise (12.04.3 LTS)"
> VERSION_ID="12.04"
>
> cd /var/log
> ls -lrt (I'm showing only latest)
> -rw-r- 1 syslogadm  124 Oct  8 09:58 kern.log
> -rw-r- 1 root  adm  529 Oct  8 09:58 apport.log
> -rw-r- 1 syslogadm 3086 Oct  8 10:00 syslog
> -rw-r- 1 syslogadm   113879 Oct  8 10:00 auth.log
>
> root@devrt:/var/log# cat kern.log
> Oct  8 09:58:10 devrt kernel: [3001033.121438] /usr/sbin/apach[5529]:
> segfault at b54d9f80 ip b54d9f80 sp bfc702dc error 14
>
> root@devrt:/var/log# cat apport.log
> ERROR: apport (pid 5532) Thu Oct  8 09:58:11 2015: called for pid 5529,
> signal 11
> ERROR: apport (pid 5532) Thu Oct  8 09:58:11 2015: executable:
> /usr/lib/apache2/mpm-prefork/apache2 (command line "/usr/sbin/apache2 -k
> start")
> ERROR: apport (pid 5532) Thu Oct  8 09:58:11 2015: is_closing_session(): no
> DBUS_SESSION_BUS_ADDRESS in environment
> ERROR: apport (pid 5532) Thu Oct  8 09:58:11 2015: apport: report
> /var/crash/_usr_lib_apache2_mpm-prefork_apache2.0.crash already exists and
> unseen, doing nothing to avoid disk usage DoS
>
> root@devrt:/var/log# cat syslog
> Oct  8 09:58:10 devrt kernel: [3001033.121438] /usr/sbin/apach[5529]:
> segfault at b54d9f80 ip b54d9f80 sp bfc702dc error 14
> Oct  8 10:00:01 devrt CRON[5582]: (smmsp) CMD (test -x /etc/init.d/sendmail
> && /usr/share/sendmail/sendmail cron-msp)

Apache is segfaulting. Perhaps you have some bad RAM or other hardware issues.

You could try to set up another system with the same configs as this one.

> cd /var/log/apache2
> ls -lrt
>
> last updated file under this directory is on oct 6th
> rw-r--r-- 1 root root  0 Oct  6 15:33 error.log
>
> Is there any way I can enable more debug messages through apache ?

Not sure. Try google. :)

-m


Re: [rt-users] Regarding Apache server failure

2015-10-08 Thread bharath reddy
Matt,

I don't think it is a problem with RAM or any hardware, because when I
revert my changes in RT_SiteConfig.pm (with out LDAPAuthentication) apache
starts with out any error.

Thanks,
Bharath.

On Thu, Oct 8, 2015 at 10:54 AM, Matt Zagrabelny  wrote:

> On Thu, Oct 8, 2015 at 9:21 AM, bharath reddy 
> wrote:
> > Hi Matt,
> >
> > Thanks for replying back, here are the details :
> >
> > Distro :
> > root@devrt:~# cat /etc/os-release
> > NAME="Ubuntu"
> > VERSION="12.04.3 LTS, Precise Pangolin"
> > ID=ubuntu
> > ID_LIKE=debian
> > PRETTY_NAME="Ubuntu precise (12.04.3 LTS)"
> > VERSION_ID="12.04"
> >
> > cd /var/log
> > ls -lrt (I'm showing only latest)
> > -rw-r- 1 syslogadm  124 Oct  8 09:58 kern.log
> > -rw-r- 1 root  adm  529 Oct  8 09:58 apport.log
> > -rw-r- 1 syslogadm 3086 Oct  8 10:00 syslog
> > -rw-r- 1 syslogadm   113879 Oct  8 10:00 auth.log
> >
> > root@devrt:/var/log# cat kern.log
> > Oct  8 09:58:10 devrt kernel: [3001033.121438] /usr/sbin/apach[5529]:
> > segfault at b54d9f80 ip b54d9f80 sp bfc702dc error 14
> >
> > root@devrt:/var/log# cat apport.log
> > ERROR: apport (pid 5532) Thu Oct  8 09:58:11 2015: called for pid 5529,
> > signal 11
> > ERROR: apport (pid 5532) Thu Oct  8 09:58:11 2015: executable:
> > /usr/lib/apache2/mpm-prefork/apache2 (command line "/usr/sbin/apache2 -k
> > start")
> > ERROR: apport (pid 5532) Thu Oct  8 09:58:11 2015: is_closing_session():
> no
> > DBUS_SESSION_BUS_ADDRESS in environment
> > ERROR: apport (pid 5532) Thu Oct  8 09:58:11 2015: apport: report
> > /var/crash/_usr_lib_apache2_mpm-prefork_apache2.0.crash already exists
> and
> > unseen, doing nothing to avoid disk usage DoS
> >
> > root@devrt:/var/log# cat syslog
> > Oct  8 09:58:10 devrt kernel: [3001033.121438] /usr/sbin/apach[5529]:
> > segfault at b54d9f80 ip b54d9f80 sp bfc702dc error 14
> > Oct  8 10:00:01 devrt CRON[5582]: (smmsp) CMD (test -x
> /etc/init.d/sendmail
> > && /usr/share/sendmail/sendmail cron-msp)
>
> Apache is segfaulting. Perhaps you have some bad RAM or other hardware
> issues.
>
> You could try to set up another system with the same configs as this one.
>
> > cd /var/log/apache2
> > ls -lrt
> >
> > last updated file under this directory is on oct 6th
> > rw-r--r-- 1 root root  0 Oct  6 15:33 error.log
> >
> > Is there any way I can enable more debug messages through apache ?
>
> Not sure. Try google. :)
>
> -m
>


Re: [rt-users] Help! I enabled Full Text search and now Simple search won't look at Subjects !!

2015-10-08 Thread Alex Vandiver
On Wed, Oct 07, 2015 at 04:23:02PM -0500, k...@rice.edu wrote:
> It looks like you should be able to change the following function in
> lib/RT/Search/Simple.pm: [snip]

RT 4.2.10 made the change to only search the Content field, and not
also the Subject field, intentionally; see the commit the did so [1]
for the full rationale.

In short, it is impossible to have a performant full-text search if
you search both Subject and Content.  In most RT installs, the
auto-reply from the ticket creation includes the subject of the
ticket, which means it is indexed along with the ticket, so removing
the Subject clause still results in finding the appropriate ticket.

You're welcome to revert the change locally -- though I would suggest
doing so via an overlay and not by editing the file directly, or your
change will be lost when you next upgrade.  If you do make the change,
I expect you'll find the simple search to be noticeably (and perhaps
unusably) slower.
 - Alex



[1] 
https://github.com/bestpractical/rt/commit/8450f0a9f233d6a761ac22dbdf14926abc54d7fa


Re: [rt-users] Ticket Links missing post upgrade/conversion to Oracle 4.2.11.

2015-10-08 Thread Maik Nergert

Hey Greg,

please check if your $Organization variable is set in RT_SiteConfig.pm
It must fit to the values of field "base" and "target" in table "links"

If your code snipped is correct then
Set( $Organization, 'example.com' );


best
Maik



smime.p7s
Description: S/MIME Cryptographic Signature


Re: [rt-users] GnuPG key management issues

2015-10-08 Thread Alex Vandiver
On Thu, Oct 08, 2015 at 08:40:37AM +0200, Christopher Kunz wrote:
> we are using the RT::Crypt::GnuPG module and have run into an issue that
> I'm afraid we cannot solve.
> [snip]
> This is where the problems start. With our current setup (and a local
> keyring on the RT server), RT will try handling the .asc attachment as
> encrypted data (which it isn't), fail and not handle the rest of the
> ticket.

I believe the 4.2/skip-asc-keys branch[1] addresses this particular
issue, of interpreting .asc as encrypted data.  I'm sure that BPS
would appreciate the feedback if it resolves the issue for you.

> We are using RT 4.2.8. Is there any configuration setting that I might
> have missed, or any other possibility to get RT to automatically import
> keys that come into the system as a .asc attachment? I am aware of the
> security implications of this (and, in fact, have set the trust settings
> to "always", as authentication of user requests is always performed
> separately).

The security implications of such a flag almost certainly preclude its
inclusion in core RT -- though you understand the security
implications, many sites might not, and might enable it regardless of
any warnings placed on it.  Operating in such configurations is far
worse than operating without GPG at all.

If you wish to implement this yourself, there are a couple options for
where to implement the behavior.  The first two of them will require
that the web user have write access to the keyring.

  1. Implement it as a mail plugin, run before RT::Crypt::GnuPG.  This
 will allow it to import the key before the decryption happens.
 Mail plugins in 4.2 are cumbersome, but an ApplyBeforeDecode
 plugin that is in @MailPlugins before Auth::Crypt should work fine.

 I would suggest using RT::Extension::FutureMailgate[2] backport
 of the 4.4/mailgate-refactor branch[3] to make writing the mail
 plugin entirely more friendly, but I just checked, and it looks
 like that backport doesn't include the Crypt changes from the
 branch[3], so running that may be unhelpful.

  2. Write a scrip to parse out the keys after the mail comes in.
 This means that if the original mail is signed by the key it
 includes, the key will be added after it has been examined, so it
 will be marked as unverified.

  3. Pre-process the keys in the mail gateway, or before.  If the mail
 has a standard format, you can potentially do all of the work by
 having procmail or similar match the message and pipe it to a
 custom program that extracts and adds the key.  This removes RT
 from the loop entirely.

If this is central to your workflow, you may wish to consider
contacting sa...@bestpractical.com to see if they can help you
implement one of the above solutions.
 - Alex

[1] https://github.com/bestpractical/rt/compare/4.2-trunk...4.2/skip-asc-keys
[2] https://github.com/bestpractical/rt-extension-futuremailgate
[3] https://github.com/bestpractical/rt/compare/master...4.4/gateway-refactor