Re: [rt-users] ExternalAuth error messages in 4.0.4

2011-11-16 Thread Joosep
Hi Kevin!

Thanks for the info.

Joosep

On Wed, Nov 16, 2011 at 6:53 PM, Kevin Falcone falc...@bestpractical.comwrote:

 On Tue, Nov 15, 2011 at 09:47:24AM +0200, Joosep wrote:
 I'm trying to install a ExternalAuth module in the test environment
 to prepare for the live
 system upgrade. Test environment is a snapshot of the live system
 that i have upgraded from
 3.8.10 to 4.0.4(no problems there).
 Module installs and authentication works. Users are able to login,
 but there are following
 errors in the log:

 Those look like warnings, not errors.  There are some warnings
 cleanups in the git repository that haven't been released yet.

 -kevin

 
 RT Training Sessions (http://bestpractical.com/services/training.html)
 *  Barcelona, Spain — November 28  29, 2011


RT Training Sessions (http://bestpractical.com/services/training.html)
*  Barcelona, Spain — November 28  29, 2011

[rt-users] ExternalAuth error messages in 4.0.4

2011-11-14 Thread Joosep
Hi list!

Environment is following:
debian 6.0 x86_64
RT 4.0.4
Postgres 8.4
OpenLDAP 2.4.11.1
ExternalAuth 0.09

I'm trying to install a ExternalAuth module in the test environment to
prepare for the live system upgrade. Test environment is a snapshot of the
live system that i have upgraded from 3.8.10 to 4.0.4(no problems there).
Module installs and authentication works. Users are able to login, but
there are following errors in the log:

Nov 15 09:05:04 rttest RT: RT::Authen::ExternalAuth::LDAP::GetAuth External
Auth OK ( My_LDAP ):
user.name(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:139)
Nov 15 09:05:04 rttest RT: Couldn't enable user 37
(/opt/rt4/sbin/../lib/RT/User.pm:1066)
Nov 15 09:05:04 rttest RT: Use of uninitialized value $val in concatenation
(.) or string at
/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm
line 274.
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:274)
Nov 15 09:05:04 rttest RT: Use of uninitialized value $message in
concatenation (.) or string at
/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm
line 274.
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:274)
Nov 15 09:05:04 rttest RT: User marked as ENABLED ( user.name ) per
External Service (, )
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:274)
Nov 15 09:05:04 rttest RT: Use of uninitialized value in string eq at
/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm
line 236.
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:236)
Nov 15 09:05:04 rttest RT: Use of uninitialized value in string eq at
/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm
line 236.
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:236)
Nov 15 09:05:04 rttest RT: Use of uninitialized value in string eq at
/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm
line 236.
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:236)
Nov 15 09:05:04 rttest RT: Use of uninitialized value in string eq at
/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm
line 236.
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:236)
Nov 15 09:05:04 rttest RT: Use of uninitialized value in string eq at
/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm
line 236.
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:236)
Nov 15 09:05:04 rttest RT: RT::Authen::ExternalAuth::CanonicalizeUserInfo
returning EmailAddress: user.n...@domain.com, ExternalAuthId: user.name,
Gecos: User Name, Name: user.name, RealName: User
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:536)
Nov 15 09:05:04 rttest RT: Successful login for user.name from
192.168.178.13
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:219)


We have same ExternalAuth version running in live environment with RT
3.8.10 and there we see only this:
Nov 15 09:27:16 rt RT: RT::Authen::ExternalAuth::LDAP::GetAuth External
Auth OK ( My_LDAP ):
user.name(/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:139)
Nov 15 09:27:17 rt RT: Couldn't enable user 37
(/opt/rt3/bin/../lib/RT/User_Overlay.pm:1226)
Nov 15 09:27:17 rt RT: User marked as ENABLED ( user.name ) per External
Service (, )
(/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:274)
Nov 15 09:27:17 rt RT: Successful login for user.name from 192.168.178.13
(/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:219)

The messages seem harmless, but i would rather have no error messages in
the log.
I have two theorys why i see these messages:
* there are some perl modules missing in the 4.0.4(which?)
* Our username form (firstname.lastname) is causing these errors

I would be grateful if anyone could shed some light on this matter.

Thanks,
Joosep M

RT Training Sessions (http://bestpractical.com/services/training.html)
*  Barcelona, Spain — November 28  29, 2011

Re: [rt-users] Time fields in days

2011-05-06 Thread Joosep
Hi!

Thanks for the info Kenneth i will look into it further.

Joosep

On Thu, May 5, 2011 at 5:43 PM, Kenneth Crocker kfcroc...@lbl.gov wrote:

 Joosep,

 I would think the DB changes ARE necessary. If you don't define the field
 with 3 decimal positions, then it would always round up or down and you'd
 gain/lose a lot of time. We didn't like the option of hours or minutes, so I
 removed the top-down choice. Since we offered hours in the form of .125
 days, we felt that should be sufficient. We didn't know of ANYONE in our
 organization that would project time estimates in hours or minutes. Most
 projects involve many, many man-days.

 Anyway, that was our thinking.

 Kenn


 On Thu, May 5, 2011 at 7:06 AM, Joosep joos...@gmail.com wrote:

 Thanks for the reply Kenneth,

 Is the database modification also necessary in order it to work, or should
 it work with just the modifications in the file 
 local/html/Elements/SelectTimeUnits
 ?

 Implementing the code from that thread so far only seem to give the
 possibility to select days from the dropdown menu when using for example
 time estimated field in the ticket basics, but seem to lack the math. At
 least in RT 3.8.10. When inserting some value in hours, RT automatically
 converts the inserted value into minutes(for example inserting 2 hours
 results after save 120 minutes). When inserting for example 5 hours, after
 the save, it results in 5 minutes.
 I'm not very familiar with perl, but it seems that these rows should be
 responsible for the math:
  % my $selected = 'minutes';
  % $selected = 'hours' if $minutes  60;
  % $selected = 'days' if $minutes  480;

 But they don't seem to do it. Maybe the math has moved since then or i'm
 doing something wrong.
 I would be grateful for any pointers and hints where to look.

 Thanks in advance
 Joosep





Re: [rt-users] Time fields in days

2011-05-05 Thread Joosep
Thanks for the reply Kenneth,

Is the database modification also necessary in order it to work, or should
it work with just the modifications in the file
local/html/Elements/SelectTimeUnits
?

Implementing the code from that thread so far only seem to give the
possibility to select days from the dropdown menu when using for example
time estimated field in the ticket basics, but seem to lack the math. At
least in RT 3.8.10. When inserting some value in hours, RT automatically
converts the inserted value into minutes(for example inserting 2 hours
results after save 120 minutes). When inserting for example 5 hours, after
the save, it results in 5 minutes.
I'm not very familiar with perl, but it seems that these rows should be
responsible for the math:
 % my $selected = 'minutes';
 % $selected = 'hours' if $minutes  60;
 % $selected = 'days' if $minutes  480;

But they don't seem to do it. Maybe the math has moved since then or i'm
doing something wrong.
I would be grateful for any pointers and hints where to look.

Thanks in advance
Joosep

On Wed, May 4, 2011 at 7:38 PM, Kenneth Crocker kfcroc...@lbl.gov wrote:

 Joosep,

 I did that. However, I wanted to maintain the concept of 'hours', so I
 changed the DataBase to contain all time fields with 3 decimal positions
 (.125 = 1 hour). I changed all the displays, etc. to show that.

 Kenn
 LBNL


 On Tue, May 3, 2011 at 11:21 PM, Joosep joos...@gmail.com wrote:

 Hi list!

 RT version is 3.8.10 running on postgres 8.3.14 and debian 5.0.

 I'm trying to set RT to use unit days in time fields in addition to
 minutes and hours.
 I found similar thread in list archives:
 http://www.gossamer-threads.com/lists/rt/users/82265

 RT version in that thread was 3.8.2. It seems that things are changed a
 little since then.
 I have found, that some of necessary code is  in the file
 share/html/Elements/SelectTimeUnits.
 I have now unit days in the right place, but there is no relation
 between days and hours/minutes. I.e RT doesn't know how much minutes/hours 1
 day is.
 Any idea where i can find that logic?
 If anybody knows better way to do it, i would be greatful to hear it.

 Thanks in advance,
 Joosep





[rt-users] Time fields in days

2011-05-04 Thread Joosep
Hi list!

RT version is 3.8.10 running on postgres 8.3.14 and debian 5.0.

I'm trying to set RT to use unit days in time fields in addition to
minutes and hours.
I found similar thread in list archives:
http://www.gossamer-threads.com/lists/rt/users/82265

RT version in that thread was 3.8.2. It seems that things are changed a
little since then.
I have found, that some of necessary code is  in the file
share/html/Elements/SelectTimeUnits.
I have now unit days in the right place, but there is no relation between
days and hours/minutes. I.e RT doesn't know how much minutes/hours 1 day is.
Any idea where i can find that logic?
If anybody knows better way to do it, i would be greatful to hear it.

Thanks in advance,
Joosep


[rt-users] attachment encoding causes internal server error

2010-11-15 Thread Joosep Meus
 give anything useful so far.

Any help would be much appreciated.


all the best,
Joosep Meus


Re: [rt-users] attachment encoding causes internal server error

2010-11-15 Thread Joosep Meus

Hi again!

I should probably clarify that problem is related to iso-8859-1 special 
characters. Exapmle filename i used for testing was öüõä.txt. 
Attachments, that do not contain those characters will not cause the 
problem.


All the best,
Joosep MEus

On 11/15/2010 11:32 PM, Joosep Meus wrote:

Hi everyone!

I'm using rt 3.8.8 with debian linux 5.0 and postgresql 8.3.12.

When sending e-mail with an attachment to RT, i receive following error
message:
Ticket could not be created due to an internal error

After some investigation i discovered, that this error occurs only, when
attachment name contains iso-8859-1 letters and mail is sent using
iso-5589-1 encoding. Sending the same file with mail encoding utf8 works
fine.

When error occurs, these messages will be logged into syslog:
Nov 15 22:40:56 rt RT: Converting 'ISO-8859-1' to 'utf-8' for text/plain
- Subjectless message
Nov 15 22:40:56 rt RT: Guessed encoding: ascii
Nov 15 22:40:56 rt RT: Guessed encoding: ascii
Nov 15 22:40:56 rt RT: Converting 'ascii' to 'utf-8' for text/plain -
Subjectless message
Nov 15 22:40:56 rt RT: Guessed encoding: ascii
Nov 15 22:40:56 rt RT: Guessed encoding: ascii
Nov 15 22:40:56 rt RT: Mail from user #23 (s...@mail.address)
Nov 15 22:40:56 rt RT: About to think about scrips for transaction #349
Nov 15 22:40:56 rt RT: About to think about scrips for transaction #350
Nov 15 22:40:56 rt RT: About to think about scrips for transaction #351
Nov 15 22:40:56 rt RT: About to think about scrips for transaction #352
Nov 15 22:40:56 rt RT: Attachment insert failed: ERROR: invalid byte
sequence for encoding UTF8: 0xf6fcf5e4#012HINT: This error can also
happen if the byte sequence does not match the encoding expected by the
server, which is controlled by client_encoding.
(/opt/rt3/bin/../lib/RT/Attachment_Overlay.pm:192)
Nov 15 22:40:56 rt RT: Attachment insert failed: ERROR: invalid byte
sequence for encoding UTF8: 0xf6fcf5e4#012HINT: This error can also
happen if the byte sequence does not match the encoding expected by the
server, which is controlled by client_encoding.
(/opt/rt3/bin/../lib/RT/Attachment_Overlay.pm:165)
Nov 15 22:40:56 rt RT: About to think about scrips for transaction #353
Nov 15 22:40:56 rt RT: About to prepare scrips for transaction #353
Nov 15 22:40:56 rt RT: RT::Ticket=HASH(0x50005f0) tried to load a bogus
ticket: 34
Nov 15 22:40:56 rt RT: RT::Scrips=HASH(0x500d580) couldn't load ticket
34 (/opt/rt3/bin/../lib/RT/Scrips_Overlay.pm:291)
Nov 15 22:40:56 rt RT: Found 5 scrips for TransactionCreate stage with
applicable type(s) Create
Nov 15 22:40:56 rt RT: RT::Ticket=HASH(0x4fc5008) tried to load a bogus
ticket: 34
Nov 15 22:40:56 rt RT: HasRight called with no valid object
(/opt/rt3/bin/../lib/RT/Principal_Overlay.pm:322)
Nov 15 22:40:56 rt RT: RT::Ticket=HASH(0x4f66bc0) tried to load a bogus
ticket: 34
Nov 15 22:40:56 rt RT: HasRight called with no valid object
(/opt/rt3/bin/../lib/RT/Principal_Overlay.pm:322)
Nov 15 22:40:56 rt RT: RT::Ticket=HASH(0x4be7000) tried to load a bogus
ticket: 34
Nov 15 22:40:56 rt RT: HasRight called with no valid object
(/opt/rt3/bin/../lib/RT/Principal_Overlay.pm:322)
Nov 15 22:40:56 rt RT: RT::Ticket=HASH(0x4f66bd8) tried to load a bogus
ticket: 34
Nov 15 22:40:56 rt RT: HasRight called with no valid object
(/opt/rt3/bin/../lib/RT/Principal_Overlay.pm:322)
Nov 15 22:40:56 rt RT: RT::Ticket=HASH(0x5004930) tried to load a bogus
ticket: 34
Nov 15 22:40:56 rt RT: HasRight called with no valid object
(/opt/rt3/bin/../lib/RT/Principal_Overlay.pm:322)
Nov 15 22:40:56 rt RT: RT::Ticket=HASH(0x5014810) tried to load a bogus
ticket: 34
Nov 15 22:40:56 rt RT: HasRight called with no valid object
(/opt/rt3/bin/../lib/RT/Principal_Overlay.pm:322)
Nov 15 22:40:56 rt RT: RT::Ticket=HASH(0x4f66770) tried to load a bogus
ticket: 34
Nov 15 22:40:56 rt RT: About to commit scrips for transaction #353
Nov 15 22:40:56 rt RT: Committing scrip #11 on txn #353 of ticket #
Nov 15 22:40:56 rt RT: RT::Ticket=HASH(0x501c8a8) tried to load a bogus
ticket: 34
Nov 15 22:40:56 rt RT: HasRight called with no valid object
(/opt/rt3/bin/../lib/RT/Principal_Overlay.pm:322)
Nov 15 22:40:56 rt RT: Tried to load a bogus ticket id: ''
Nov 15 22:40:56 rt RT: RT::Ticket=HASH(0x4ff5840) tried to load a bogus
ticket: 34
Nov 15 22:40:56 rt RT: Ticket couldn't be created:
(/opt/rt3/bin/../lib/RT/Ticket_Overlay.pm:679)
Nov 15 22:40:56 rt RT: Ticket could not be created due to an internal
error (/opt/rt3/bin/../lib/RT/Interface/Email.pm:244)

There are also the invalid byte sequence for encoding UTF8:
0xf6fcf5e4 messages in the Postgresql log.

I understand(correct me if i'm wrong) that the cause of the problem is
that RT is trying to insert into UTF8 database something that is not
UTF8. And the reason of that is that for some reason RT does guess' the
attachments encoding wrong. Allthough the log says Subjectless
message, the subject line of the message is not empty.
Does anyone has any idea why is RT guessing

Re: [rt-users] attachment encoding causes internal server error

2010-11-15 Thread joosep
 On Mon, Nov 15, 2010 at 11:39:42PM +0200, Joosep Meus wrote:
 Hi again!

 I should probably clarify that problem is related to iso-8859-1
 special characters. Exapmle filename i used for testing was
 öüõä.txt. Attachments, that do not contain those characters will
 not cause the problem.


 this is a known bug. See the story with some patches here:
 http://issues.bestpractical.com/Ticket/Display.html?id=14913user=guestpass=guest



Thanks alot. Patch from the link you provided fixed the problem for me.

All the best,
Joosep Meus