Installation: Ubuntu 12.04 x64

Moderator: crythias

Locked
mfuhrmann
Znuny newbie
Posts: 38
Joined: 10 May 2012, 10:24
Znuny Version: 3.3.8
Real Name: Marcel Fuhrmann
Location: Fulda

Installation: Ubuntu 12.04 x64

Post by mfuhrmann »

Hello,

i've installed OTRS on Ubuntu 12.04 x64. I used the installation guide in the wiki. After the installation i tried to login, but then an error occured.
The browser told:

Code: Select all

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@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.
Apache/2.2.22 (Ubuntu) Server at srv-mf01.tclsg.local Port 80
/var/log/apache2/error.log shows:

Code: Select all

ERROR: OTRS-CGI-10 Perl: 5.14.2 OS: linux Time: Mon Jul  2 13:05:20 2012

Message: C-Parser:
syntax error at line 1, column 49, byte 49 at /usr/lib/perl5/XML/Parser.pm line 187
!

Traceback (6672):
   Module: Kernel::System::XML::XMLParse (v1.109) Line: 776
   Module: Kernel::System::XML::XMLParse2XMLHash (v1.109) Line: 608
   Module: Kernel::Output::HTML::DashboardProductNotify::Run (v1.11) Line: 86
   Module: Kernel::Modules::AgentDashboard::_Element (v1.29) Line: 513
   Module: Kernel::Modules::AgentDashboard::Run (v1.29) Line: 350
   Module: Kernel::System::Web::InterfaceAgent::Run (v1.64) Line: 868
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler (unknown version) Line: 46
   Module: (eval) (v1.90) Line: 204
   Module: ModPerl::RegistryCooker::run (v1.90) Line: 204
   Module: ModPerl::RegistryCooker::default_handler (v1.90) Line: 170
   Module: ModPerl::Registry::handler (v1.99) Line: 31

ERROR: OTRS-CGI-10 Perl: 5.14.2 OS: linux Time: Mon Jul  2 13:05:20 2012

Message: XML::Parser produced errors. I use XML::Parser::Lite as fallback!

Traceback (6672):
   Module: Kernel::System::XML::XMLParse (v1.109) Line: 777
   Module: Kernel::System::XML::XMLParse2XMLHash (v1.109) Line: 608
   Module: Kernel::Output::HTML::DashboardProductNotify::Run (v1.11) Line: 86
   Module: Kernel::Modules::AgentDashboard::_Element (v1.29) Line: 513
   Module: Kernel::Modules::AgentDashboard::Run (v1.29) Line: 350
   Module: Kernel::System::Web::InterfaceAgent::Run (v1.64) Line: 868
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler (unknown version) Line: 46
   Module: (eval) (v1.90) Line: 204
   Module: ModPerl::RegistryCooker::run (v1.90) Line: 204
   Module: ModPerl::RegistryCooker::default_handler (v1.90) Line: 170
   Module: ModPerl::Registry::handler (v1.99) Line: 31

[Mon Jul 02 13:05:20 2012] [error] [Mon Jul  2 13:05:20 2012] -e: mismatched tag 'head'\n
/usr/lib/perl5/XML/Parser.pm

Code: Select all

# XML::Parser
    #
    # Copyright (c) 1998-2000 Larry Wall and Clark Cooper
    # All rights reserved.
    #
    # This program is free software; you can redistribute it and/or
    # modify it under the same terms as Perl itself.

    package XML::Parser;

    use strict;

    use vars qw($VERSION $LWP_load_failed);

    use Carp;

    BEGIN {
      require XML::Parser::Expat;
      $VERSION = '2.41';
      die "Parser.pm and Expat.pm versions don't match"
        unless $VERSION eq $XML::Parser::Expat::VERSION;
    }

    $LWP_load_failed = 0;

    sub new {
      my ($class, %args) = @_;
      my $style = $args{Style};

      my $nonexopt = $args{Non_Expat_Options} ||= {};

      $nonexopt->{Style}             = 1;
      $nonexopt->{Non_Expat_Options} = 1;
      $nonexopt->{Handlers}          = 1;
      $nonexopt->{_HNDL_TYPES}       = 1;
      $nonexopt->{NoLWP}             = 1;

      $args{_HNDL_TYPES} = {%XML::Parser::Expat::Handler_Setters};
      $args{_HNDL_TYPES}->{Init} = 1;
      $args{_HNDL_TYPES}->{Final} = 1;

      $args{Handlers} ||= {};
      my $handlers = $args{Handlers};

      if (defined($style)) {
        my $stylepkg = $style;

        if ($stylepkg !~ /::/) {
          $stylepkg = "\u$style";

          eval {
              my $fullpkg = 'XML::Parser::Style::' . $stylepkg;
              my $stylefile = $fullpkg;
              $stylefile =~ s/::/\//g;
              require "$stylefile.pm";
              $stylepkg = $fullpkg;
          };
          if ($@) {
              # fallback to old behaviour
              $stylepkg = 'XML::Parser::' . $stylepkg;
          }
        }

        my $htype;
        foreach $htype (keys %{$args{_HNDL_TYPES}}) {
          # Handlers explicity given override
          # handlers from the Style package
          unless (defined($handlers->{$htype})) {

            # A handler in the style package must either have
            # exactly the right case as the type name or a
            # completely lower case version of it.

            my $hname = "${stylepkg}::$htype";
            if (defined(&$hname)) {
              $handlers->{$htype} = \&$hname;
              next;
            }

            $hname = "${stylepkg}::\L$htype";
            if (defined(&$hname)) {
              $handlers->{$htype} = \&$hname;
              next;
            }
          }
        }
      }

      unless (defined($handlers->{ExternEnt})
              or defined ($handlers->{ExternEntFin})) {

        if ($args{NoLWP} or $LWP_load_failed) {
          $handlers->{ExternEnt} = \&file_ext_ent_handler;
          $handlers->{ExternEntFin} = \&file_ext_ent_cleanup;
        }
        else {
          # The following just bootstraps the real LWP external entity
          # handler

          $handlers->{ExternEnt} = \&initial_ext_ent_handler;

          # No cleanup function available until LWPExternEnt.pl loaded
        }
      }

      $args{Pkg} ||= caller;
      bless \%args, $class;
    }                                # End of new

    sub setHandlers {
      my ($self, @handler_pairs) = @_;

      croak("Uneven number of arguments to setHandlers method")
        if (int(@handler_pairs) & 1);

      my @ret;
      while (@handler_pairs) {
        my $type = shift @handler_pairs;
        my $handler = shift @handler_pairs;
        unless (defined($self->{_HNDL_TYPES}->{$type})) {
          my @types = sort keys %{$self->{_HNDL_TYPES}};

          croak("Unknown Parser handler type: $type\n Valid types: @types");
        }
        push(@ret, $type, $self->{Handlers}->{$type});
        $self->{Handlers}->{$type} = $handler;
      }

      return @ret;
    }

    sub parse_start {
      my $self = shift;
      my @expat_options = ();

      my ($key, $val);
      while (($key, $val) = each %{$self}) {
        push (@expat_options, $key, $val)
          unless exists $self->{Non_Expat_Options}->{$key};
      }

      my %handlers = %{$self->{Handlers}};
      my $init = delete $handlers{Init};
      my $final = delete $handlers{Final};

      my $expatnb = XML::Parser::ExpatNB->new(@expat_options, @_);
      $expatnb->setHandlers(%handlers);

      &$init($expatnb)
        if defined($init);

      $expatnb->{_State_} = 1;

      $expatnb->{FinalHandler} = $final
        if defined($final);

      return $expatnb;
    }

    sub parse {
      my $self = shift;
      my $arg  = shift;
      my @expat_options = ();
      my ($key, $val);
      while (($key, $val) = each %{$self}) {
        push(@expat_options, $key, $val)
          unless exists $self->{Non_Expat_Options}->{$key};
      }

      my $expat = XML::Parser::Expat->new(@expat_options, @_);
      my %handlers = %{$self->{Handlers}};
      my $init = delete $handlers{Init};
      my $final = delete $handlers{Final};

      $expat->setHandlers(%handlers);

      if ($self->{Base}) {
        $expat->base($self->{Base});
      }

      &$init($expat)
        if defined($init);

      my @result = ();
      my $result;
      eval {
        $result = $expat->parse($arg);
      };
      my $err = $@;
      if ($err) {
        $expat->release;
        die $err;
      }

      if ($result and defined($final)) {
        if (wantarray) {
          @result = &$final($expat);
        }
        else {
          $result = &$final($expat);
        }
      }

      $expat->release;

      return unless defined wantarray;
      return wantarray ? @result : $result;
    }

    sub parsestring {
      my $self = shift;
      $self->parse(@_);
    }

    sub parsefile {
      my $self = shift;
      my $file = shift;
      local(*FILE);
      open(FILE, $file) or  croak "Couldn't open $file:\n$!";
      binmode(FILE);
      my @ret;
      my $ret;

      $self->{Base} = $file;

      if (wantarray) {
        eval {
          @ret = $self->parse(*FILE, @_);
        };
      }
      else {
        eval {
          $ret = $self->parse(*FILE, @_);
        };
      }
      my $err = $@;
      close(FILE);
      die $err if $err;

      return unless defined wantarray;
      return wantarray ? @ret : $ret;
    }

    sub initial_ext_ent_handler {
      # This just bootstraps in the real lwp_ext_ent_handler which
      # also loads the URI and LWP modules.

      unless ($LWP_load_failed) {
        local($^W) = 0;

        my $stat =
          eval {
            require('XML/Parser/LWPExternEnt.pl');
          };

        if ($stat) {
          $_[0]->setHandlers(ExternEnt    => \&lwp_ext_ent_handler,
                             ExternEntFin => \&lwp_ext_ent_cleanup);

          goto &lwp_ext_ent_handler;
        }

        # Failed to load lwp handler, act as if NoLWP

        $LWP_load_failed = 1;

        my $cmsg = "Couldn't load LWP based external entity handler\n";
        $cmsg .= "Switching to file-based external entity handler\n";
        $cmsg .= " (To avoid this message, use NoLWP option to XML::Parser)\n";
        warn($cmsg);
      }

      $_[0]->setHandlers(ExternEnt    => \&file_ext_ent_handler,
                         ExternEntFin => \&file_ext_ent_cleanup);
      goto &file_ext_ent_handler;

    }

    sub file_ext_ent_handler {
      my ($xp, $base, $path) = @_;

      # Prepend base only for relative paths

      if (defined($base)
          and not ($path =~ m!^(?:[\\/]|\w+:)!))
        {
          my $newpath = $base;
          $newpath =~ s![^\\/:]*$!$path!;
          $path = $newpath;
        }

      if ($path =~ /^\s*[|>+]/
          or $path =~ /\|\s*$/) {
        $xp->{ErrorMessage}
            .= "System ID ($path) contains Perl IO control characters";
        return undef;
      }

      require IO::File;

      require IO::File;
      my $fh = IO::File->new($path);
      unless (defined $fh) {
        $xp->{ErrorMessage}
          .= "Failed to open $path:\n$!";
        return undef;
      }

      $xp->{_BaseStack} ||= [];
      $xp->{_FhStack} ||= [];

      push(@{$xp->{_BaseStack}}, $base);
      push(@{$xp->{_FhStack}}, $fh);

      $xp->base($path);

      return $fh;
    }

    sub file_ext_ent_cleanup {
      my ($xp) = @_;

      my $fh = pop(@{$xp->{_FhStack}});
      $fh->close;

      my $base = pop(@{$xp->{_BaseStack}});
      $xp->base($base);
    }

    1;
Does anybody use Ubuntu 12.04 with OTRS successfully? What's the problem here?

Thanks for help.


EDIT: can a admin plz move this thread to the installation forum? i didn't see the classification. sorry.

--
Marcel
mfuhrmann
Znuny newbie
Posts: 38
Joined: 10 May 2012, 10:24
Znuny Version: 3.3.8
Real Name: Marcel Fuhrmann
Location: Fulda

Re: Installation: Ubuntu 12.04 x64

Post by mfuhrmann »

Really strange. I've installed now Ubuntu 10.04.4 and got the same error. Any ideas?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Installation: Ubuntu 12.04 x64

Post by crythias »

Probably (?) Config.pm isn't properly configured, existing, readable, ... (?). It's rather difficult to troubleshoot from this post. There's a high likelihood you're encountering a permissions issue on ubuntu. Read the README for how to set permissions.
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
mfuhrmann
Znuny newbie
Posts: 38
Joined: 10 May 2012, 10:24
Znuny Version: 3.3.8
Real Name: Marcel Fuhrmann
Location: Fulda

Re: Installation: Ubuntu 12.04 x64

Post by mfuhrmann »

A few weeks ago i've successfully installed otrs on Ubuntu 10.04. But now this mess...

I'm sure, i didn't change anything in Config.pm. Here it is:

Code: Select all

# --
# Kernel/Config.pm - Config file for OTRS kernel
# Copyright (C) 2001-2011 xxx, http://otrs.org/
# --
# $Id: Config.pm.dist,v 1.25 2011/09/16 10:58:28 mg Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
#  Note:
#
#  -->> OTRS does have a lot of config settings. For more settings
#       (Notifications, Ticket::ViewAccelerator, Ticket::NumberGenerator,
#       LDAP, PostMaster, Session, Preferences, ...) see
#       Kernel/Config/Defaults.pm and copy your wanted lines into "this"
#       config file. This file will not be changed on update!
#
# --

package Kernel::Config;

use utf8;

sub Load {
    my $Self = shift;
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
    #                                                      #
    #         Start of your own config options!!!          #
    #                                                      #
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #

    # ---------------------------------------------------- #
    # database settings                                    #
    # ---------------------------------------------------- #
    # DatabaseHost
    # (The database host.)
    $Self->{'DatabaseHost'} = 'localhost';
    # Database
    # (The database name.)
    $Self->{'Database'} = 'otrs';
    # 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'} = 'hot';
    # 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};";
    # if you have PostgresSQL 8.1 or earlier, activate the legacy driver with this line:
#    $Self->{DatabasePostgresqlBefore82} = 1;

    # ---------------------------------------------------- #
    # 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$

    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
    #                                                      #
    #           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');

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

1;

here the permissions:

Code: Select all

-rw-rw-r--  1 otrs www-data  4037 2012-07-03 20:15 Config.pm
mfuhrmann
Znuny newbie
Posts: 38
Joined: 10 May 2012, 10:24
Znuny Version: 3.3.8
Real Name: Marcel Fuhrmann
Location: Fulda

Re: Installation: Ubuntu 12.04 x64

Post by mfuhrmann »

Yesterday I've installed OTRS on my Ubuntu 12.04 x64 Desktop at home and badabum! it works!
Today i've installed many times ubuntu 10.04.4 and followed the installation guide without success.
Sometimes this error occurs while installation (for example: after creating databases and clicking next) and also when i try to login.
mfuhrmann
Znuny newbie
Posts: 38
Joined: 10 May 2012, 10:24
Znuny Version: 3.3.8
Real Name: Marcel Fuhrmann
Location: Fulda

Re: Installation: Ubuntu 12.04 x64

Post by mfuhrmann »

Today i installed Debian 6 x64. Same problem.
Am i the only one with this mess? I can't imagine.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Installation: Ubuntu 12.04 x64

Post by crythias »

Describe steps to install. Did you CheckModules?
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
massimo
Znuny newbie
Posts: 3
Joined: 02 Aug 2012, 17:10
Znuny Version: 3.1.7
Real Name: massimo

Re: Installation: Ubuntu 12.04 x64

Post by massimo »

I have got the identic error of mfuhrmann.
And identic message in /var/log/apache2/error.log

My installation is on ubuntu server 10.04 lts
The version of otrs is 3.1.7

the error only occurs when I enter with a specific login as agent
With other login all is ok

massimo
Massimo
OTRS 3.1.7 on Ubuntu server 10.04 LTS with MySQL database connected to an Active Directory for Customers.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Installation: Ubuntu 12.04 x64

Post by crythias »

If you get *exactly* this error message:
Module: Kernel::Output::HTML::DashboardProductNotify::Run (v1.11) Line: 86

and exactly because of certain logins, it's because the login is parsing http://otrs.org/product.xml and/or http://www.otrs.com/en/rss.xml and cannot render Product News/OTRS News appropriately for those users.

What to do?

Per user: close the boxes in preferences.
Globally:
Edit Config Settings in Framework -> Frontend::Agent::Dashboard
clear checkbox for Product notification and/or DashboardBackend###0410-RSS
and any other .xml render you don't need.
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
massimo
Znuny newbie
Posts: 3
Joined: 02 Aug 2012, 17:10
Znuny Version: 3.1.7
Real Name: massimo

Re: Installation: Ubuntu 12.04 x64

Post by massimo »

thanks crythias
Yes, I get exactly this error :

Module: Kernel :: Output :: HTML :: DashboardProductNotify :: Run (v1.11) Line: 86


Unfortunately in the meantime I have reinstalled the server ...
If it happens again I'll keep you up to date

bye
massimo
Massimo
OTRS 3.1.7 on Ubuntu server 10.04 LTS with MySQL database connected to an Active Directory for Customers.
massimo
Znuny newbie
Posts: 3
Joined: 02 Aug 2012, 17:10
Znuny Version: 3.1.7
Real Name: massimo

Re: Installation: Ubuntu 12.04 x64

Post by massimo »

Crythias, I think that the problem was just what you reported.

My server is behind a firewall. Until I had problems accessing the internet would receive "500 - Internal Error"
When I solved the problem of access to the internet then I have not had the error

bye and thanks a lot (and sorry for my google-english :-) )
massimo
Massimo
OTRS 3.1.7 on Ubuntu server 10.04 LTS with MySQL database connected to an Active Directory for Customers.
Locked