Internal Server Error - customer.pl No UserObject! (solved)

Moderator: crythias

Locked
erenk
Znuny newbie
Posts: 30
Joined: 12 May 2014, 15:41
Znuny Version: 4.0.4

Internal Server Error - customer.pl No UserObject! (solved)

Post by erenk »

I had 3.2.4 OTRS installed on CentOS 6.5. I updated OTRS to 3.3.6 and got an error on the customer.pl frontend -> Internal Server Error
I checked the log files and it shows -> No UserObject! at /opt/otrs//Kernel/System/Auth/LDAP.pm line 25.\n
Then I found on Otterhub the same error, but it didn't helped. The solution posted the user "crythias" and it didn't worked ->

bad: $Self->{'Customer::AuthModule'} = 'Kernel::System::Auth::LDAP';
good: $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';

<-

I tried this but without luck :-(.

Can someone help me?

PS: I am new to CentOS and OTRS.
Last edited by erenk on 11 Mar 2015, 17:18, edited 1 time in total.
OTRS 4.0.4 - CentOS 6.5 - PostgreSQL 8.4.20
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Internal Server Error - customer.pl No UserObject!

Post by crythias »

Please post config.pm
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
erenk
Znuny newbie
Posts: 30
Joined: 12 May 2014, 15:41
Znuny Version: 4.0.4

Re: Internal Server Error - customer.pl No UserObject!

Post by erenk »

Code: Select all

package Kernel::Config;

use utf8;

sub Load {
    my $Self = shift;
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
    #                                                      #
    #         Start of your own config options!!!          #
    #                                                      #
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
    $Self->{FQDN} = 'servicedesk.ti8m.ch';
    # ---------------------------------------------------- #
    # database settings                                    #
    # ---------------------------------------------------- #
    # DatabaseHost
    # (The database host.)
    $Self->{DatabaseHost} = 'localhost';
    # Database
    # (The database name.)
    $Self->{Database} = 'db';
    # DatabaseUser
    # (The database user.)
    $Self->{DatabaseUser} = 'otrs';
    # DatabasePw
    # (The password of database user. You also can use bin/otrs.CryptPassword.pl
    # for crypted passwords.)
    $Self->{DatabasePw} = '****';
    # DatabaseDSN
    # (The database DSN for MySQL ==> more: "man DBD::mysql")
    #$Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};";

    # (The database DSN for PostgreSQL ==> more: "man DBD::Pg")
    # if you want to use a local socket connection
    $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};";
    # if you want to use a tcpip connection
#    $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};host=$Self->{DatabaseHost};";

    # ---------------------------------------------------- #
    # fs root directory
    # ---------------------------------------------------- #
    $Self->{Home} = '/opt/otrs';

    # ---------------------------------------------------- #
    # insert your own config settings "here"               #
    # config settings taken from Kernel/Config/Defaults.pm #
    # ---------------------------------------------------- #
    # $Self->{SessionUseCookie} = 0;
    # $Self->{CheckMXRecord} = 0;

    # ---------------------------------------------------- #

    # ---------------------------------------------------- #
    # data inserted by installer                           #
    # ---------------------------------------------------- #
    # $DIBI$

    # --------------------------------------------------- #
    # LDAP Settings Agent Backend                         #
    # --------------------------------------------------- #
    #
    # This is an example configuration for an LDAP auth. backend.
    # # (Make sure Net::LDAP is installed!)
    $Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
    $Self->{'AuthModule::LDAP::Host'} = 'host';
    $Self->{'AuthModule::LDAP::BaseDN'} = 'dc=ti8m,dc=ch';
    $Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';

    # # The following is valid but would only be necessary if the
    # # anonymous user do NOT have permission to read from the LDAP tree
    $Self->{'AuthModule::LDAP::SearchUserDN'} = 'cn=otrs,ou=Services,ou=ti8m,dc=ti8m,dc=ch';
    $Self->{'AuthModule::LDAP::SearchUserPw'} = '****';

    # Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
    $Self->{'AuthModule::LDAP::Params'} = {
     port => 389,
     timeout => 60,
     async => 0,
     version => 3,
     SourceCharset => 'utf-8',
     DestCharset => 'utf-8',
    };
    # defines AuthSyncBackend (AuthSyncModule) for AuthModule
    # # if this key exists and is empty, there won't be a sync.
    # # example values: AuthSyncBackend, AuthSyncBackend2
    $Self->{'AuthModule::UseSyncBackend'} = 'AuthSyncBackend';
    #
    # # agent data sync against ldap
    $Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
    $Self->{'AuthSyncModule::LDAP::Host'} = '*****';
    $Self->{'AuthSyncModule::LDAP::BaseDN'} = 'dc=ti8m, dc=ch';
    $Self->{'AuthSyncModule::LDAP::UID'} = 'sAMAccountName';
    $Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'cn=otrs,ou=Services,ou=ti8m,dc=ti8m,dc=ch';
    $Self->{'AuthSyncModule::LDAP::SearchUserPw'} = '****';
    $Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
      # DB -> LDAP
      UserFirstname => 'givenName',
      UserLastname  => 'sn',
      UserEmail     => 'mail',
    };
    # AuthSyncModule::LDAP::UserSyncInitialGroups
    # # (sync following group with rw permission after initial create of first agent
    # # login)
    $Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [
     'users',
    ];

   # --------------------------------------------------- #
   # Authentication Settings Customer Frontend           #
   # --------------------------------------------------- #
   #
   $Self->{'Customer::AuthModule1'} = 'Kernel::System::CustomerAuth::LDAP';
   $Self->{'Customer::AuthModule::LDAP::Host1'} = '*****';
   $Self->{'Customer::AuthModule::LDAP::BaseDN1'} = 'dc=ti8m,dc=ch';
   $Self->{'Customer::AuthModule::LDAP::UID1'} = 'sAMAccountName';

   # The following is valid but would only be necessary if the
   # anonymous user do NOT have permission to read from the LDAP tree
   $Self->{'Customer::AuthModule::LDAP::SearchUserDN1'} = 'cn=otrs,ou=Services,ou=ti8m,dc=ti8m,dc=ch';
   $Self->{'Customer::AuthModule::LDAP::SearchUserPw1'} = '*****';
   $Self->{'Customer::AuthModule::LDAP::Params1'} = {
    port => 389,
    timeout => 60,
    async => 0,
    version => 3,
   };
   $Self->{'Customer::AuthModule::LDAP::Die1'} = 1;

   # Enable LDAP lookups for Customer account information.
   $Self->{CustomerUser1} = {
        Name => 'LDAP Source',
        Module => 'Kernel::System::CustomerUser::LDAP',
        Params => {
          Host => 'host',
          BaseDN => 'dc=ti8m,dc=ch',
          SSCOPE => 'sub',
          UserDN => 'cn=otrs,ou=Services,ou=ti8m,dc=ti8m,dc=ch',
          UserPw => '******',
          AlwaysFilter => '(objectclass=user)',
          port => 389,
          timeout => 60,
          async => 0,
          version => 3,
          SourceCharset => 'utf-8',
          DestCharset => 'utf-8',
       },
       CustomerKey => 'sAMAccountName',
       CustomerID => '[customer_id]',
       CustomerUserListFields => ['sAMAccountName', 'sn', 'givenname', 'company',  'mail'],
       CustomerUserSearchFields => ['sAMAccountName', 'sn', 'givenname', 'company', 'mail'],
       CustomerUserPostMasterSearchFields => ['mail'],
       CustomerUserNameFields => ['givenname', 'sn'],
       CustomerUserValidFilter => '(company=*)',
       AdminSetPreferences => 0,
       Map => [
          [ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
          [ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
          [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
          [ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
          [ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
          [ 'UserCustomerID', 'CustomerID', 'company', 0, 1, 'var' ],
          [ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
          [ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
          [ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
      ],
   };

   #$Self->{CustomerUser2} = {
   #   Name => 'OTRS Database',
   #   Module => 'Kernel::System::CustomerUser::DB',
   #   Params => {
   #     Table => 'customer_user',
   #   },
      # customer unique id
   #   CustomerKey => 'login',
   #   CustomerID => 'customer_id',
   #   CustomerValid => 'valid_id',
   #   CustomerUserListFields => ['first_name', 'last_name', 'email'],
   #   CustomerUserSearchFields => ['login', 'last_name', 'customer_id'],
   #   CustomerUserSearchPrefix => '',
   #   CustomerUserSearchSuffix => '*',
   #   CustomerUserSearchListLimit => 250,
   #   CustomerUserPostMasterSearchFields => ['email'],
   #   CustomerUserNameFields => ['title','first_name','last_name'],
   #   CustomerUserEmailUniqCheck => 1,
   #   Map => [
   #     [ 'UserTitle',      'Title',      'title',        1, 0, 'var', '', 0 ],
   #     [ 'UserFirstname',  'Firstname',  'first_name',   1, 1, 'var', '', 0 ],
   #     [ 'UserLastname',   'Lastname',   'last_name',    1, 1, 'var', '', 0 ],
   #     [ 'UserLogin',      'Username',   'login',        1, 1, 'var', '', 0 ],
   #     [ 'UserPassword',   'Password',   'pw',           0, 0, 'var', '', 0 ],
   #     [ 'UserEmail',      'Email',      'email',        1, 1, 'var', '', 0 ],
   #     [ 'UserCustomerID', 'CustomerID', 'customer_id',  0, 1, 'var', '', 0 ],
   #     [ 'UserPhone',      'Phone',      'phone',        1, 0, 'var', '', 0 ],
   #     [ 'UserFax',        'Fax',        'fax',          1, 0, 'var', '', 0 ],
   #     [ 'UserMobile',     'Mobile',     'mobile',       1, 0, 'var', '', 0 ],
   #     [ 'UserStreet',     'Street',     'street',       1, 0, 'var', '', 0 ],
   #     [ 'UserZip',        'Zip',        'zip',          1, 0, 'var', '', 0 ],
   #     [ 'UserCity',       'City',       'city',         1, 0, 'var', '', 0 ],
   #     [ 'UserCountry',    'Country',    'country',      1, 0, 'var', '', 0 ],
   #     [ 'UserComment',    'Comment',    'comments',     1, 0, 'var', '', 0 ],
   #     [ 'ValidID',        'Valid',      'valid_id',     0, 1, 'int', '', 0 ],
   #   ],
   #   Selections => {
   #      UserTitle => {
   #     'Mr.' => 'Mr.',
   #     'Mrs.' => 'Mrs.',
   #     },
   #   },
   #};


    # --------------------------------------------------- #
    # Sendmail Module for SMTP                            #
    # --------------------------------------------------- #
    $Self->{"SendmailModule"} = 'Kernel::System::Email::SMTP';
    $Self->{"SendmailModule::Host"} = host';
    $Self->{"SendmailModule::AuthUser"} = 'otrs';
    $Self->{"SendmailModule::AuthPassword"} = '****';
    $Self->{'SendmailModule::Port'} = '25';
   # --------------------------------------------------- #
   # Notification                                        #
   # --------------------------------------------------- #
    $Self->{NotificationSenderName} = 'OTRS Notification Master';
    $Self->{NotificationSenderEmail} = 'otrs-demo@ti8m.ch';

    # ---------------------------------------------------- #
    #                                                      #
    #           End of your own config options!!!          #
    #                                                      #
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
}

# ---------------------------------------------------- #
# needed system stuff (don't edit this)                #
# ---------------------------------------------------- #
use strict;
use warnings;

use vars qw(@ISA $VERSION);
$VERSION = qw($Revision: 1.25 $)[1];

use Kernel::Config::Defaults;
push (@ISA, 'Kernel::Config::Defaults');

# -----------------------------------------------------#


Thanks.
OTRS 4.0.4 - CentOS 6.5 - PostgreSQL 8.4.20
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Internal Server Error - customer.pl No UserObject!

Post by crythias »

erenk wrote:-> No UserObject! at /opt/otrs//Kernel/System/Auth/LDAP.pm line 25.\n
Is that all the errors? Please post steps to replicate.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
erenk
Znuny newbie
Posts: 30
Joined: 12 May 2014, 15:41
Znuny Version: 4.0.4

Re: Internal Server Error - customer.pl No UserObject!

Post by erenk »

crythias wrote:
erenk wrote:-> No UserObject! at /opt/otrs//Kernel/System/Auth/LDAP.pm line 25.\n
Is that all the errors? Please post steps to replicate.
Yes thats all. I changed the line $Self->{'Customer::AuthModule1'} = 'Kernel::System::Auth::LDAP'; to $Self->{'Customer::AuthModule1'} = 'Kernel::System::CustomerAuth::LDAP';
, restartet otrs, httpd but nothing happend. I have access to index.pl thats working fine. But customer.pl i only see Internal Server Error.

ErenK
OTRS 4.0.4 - CentOS 6.5 - PostgreSQL 8.4.20
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Internal Server Error - customer.pl No UserObject!

Post by crythias »

erenk wrote:nothing happend
ok.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
erenk
Znuny newbie
Posts: 30
Joined: 12 May 2014, 15:41
Znuny Version: 4.0.4

Re: Internal Server Error - customer.pl No UserObject!

Post by erenk »

crythias wrote:
erenk wrote:-> No UserObject! at /opt/otrs//Kernel/System/Auth/LDAP.pm line 25.\n
Is that all the errors? Please post steps to replicate.
I forgot something to say, I updated otrs from 3.2.4 to 3.3.5 and yesterday I updated to 3.3.6.

ErenK
OTRS 4.0.4 - CentOS 6.5 - PostgreSQL 8.4.20
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Internal Server Error - customer.pl No UserObject!

Post by crythias »

erenk wrote:I forgot something to say, I updated otrs from 3.2.4 to 3.3.5 and yesterday I updated to 3.3.6.
k. Well, as nothing happens, nothing to fix.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
erenk
Znuny newbie
Posts: 30
Joined: 12 May 2014, 15:41
Znuny Version: 4.0.4

Re: Internal Server Error - customer.pl No UserObject!

Post by erenk »

crythias wrote:
erenk wrote:I forgot something to say, I updated otrs from 3.2.4 to 3.3.5 and yesterday I updated to 3.3.6.
k. Well, as nothing happens, nothing to fix.
Well I mean.. it didnt fix the problem. It just nothing happend. So the problem is still here.
OTRS 4.0.4 - CentOS 6.5 - PostgreSQL 8.4.20
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Internal Server Error - customer.pl No UserObject!

Post by crythias »

I can't fix nothing happened.

If you say, "I get the same error message when ...." (when what? describe the path of action to obtain the error message.)

"and the error message(s) in System Log say ..."
"and the apache error.log says ..."
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP'; or
$Self->{'Customer::AuthModule1'} = 'Kernel::System::CustomerAuth::LDAP'; is correct...

Make sure, for instance, that you're not also using CustomerAuth via SysConfig.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
erenk
Znuny newbie
Posts: 30
Joined: 12 May 2014, 15:41
Znuny Version: 4.0.4

Re: Internal Server Error - customer.pl No UserObject!

Post by erenk »

crythias wrote:I can't fix nothing happened.

If you say, "I get the same error message when ...." (when what? describe the path of action to obtain the error message.)

"and the error message(s) in System Log say ..."
"and the apache error.log says ..."
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP'; or
$Self->{'Customer::AuthModule1'} = 'Kernel::System::CustomerAuth::LDAP'; is correct...

Make sure, for instance, that you're not also using CustomerAuth via SysConfig.
Ok, so I get en error when I try to connect to http://servicedesk/otrs/customer.pl. It shows

"Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log."

In ssl_error_log I see "[Tue May 13 09:16:11 2014] [error] [Tue May 13 09:16:11 2014] -e: No UserObject! at /opt/otrs//Kernel/System/Auth/LDAP.pm line 25.\n"
In ssl_access_log I see "[13/May/2014:09:18:47 +0200] "GET /otrs/customer.pl HTTP/1.1" 500 399"
In ssl_request_log I see "TLSv1.2 DHE-RSA-AES128-GCM-SHA256 "GET /otrs/customer.pl HTTP/1.1" 399"

Im not sure about the SysConfig configs, so I post here screenshots
You do not have the required permissions to view the files attached to this post.
OTRS 4.0.4 - CentOS 6.5 - PostgreSQL 8.4.20
erenk
Znuny newbie
Posts: 30
Joined: 12 May 2014, 15:41
Znuny Version: 4.0.4

Re: Internal Server Error - customer.pl No UserObject!

Post by erenk »

Hi guys!

This problem is now resolved. I compared config files with the old version (3.2.4). The were some diffs so I changed that and now it works.

Erenk
OTRS 4.0.4 - CentOS 6.5 - PostgreSQL 8.4.20
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Internal Server Error - customer.pl No UserObject!

Post by crythias »

customer authmodule DB means all the LDAP config is useless.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Locked