Can't login from browser

Moderator: crythias

Post Reply
ITDepartment2012
Znuny newbie
Posts: 15
Joined: 18 Jan 2012, 21:44
Znuny Version: 3.0.11

Can't login from browser

Post by ITDepartment2012 »

Hi there!

Configuration:
Windows 2008 R2
IIS7
ActivePerl
SQL Server 2008 R2
Fresh install
Version 3.0.11

After a fresh install of OTRS I can't login using root@localhost root or root with password root.

I tried changing the password using otrs.setpassword script to password123

As a side note, the instance is servername\instance and there is db connectivity through data connections and checked with the dbcheck script.

I can see the user root in the otrs database

Here's a copy of the config.pm
package Kernel::Config;

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

# ---------------------------------------------------- #
# database settings #
# ---------------------------------------------------- #
# DatabaseHost
# (The database host.)
$Self->{DatabaseHost} = 'localhost\instance';
# 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} = 'password';
# 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};";
$Self->{'DatabaseDSN'} = "DBI:ODBC:driver={SQL Server};Server=$Self->{DatabaseHost},1433;database=$Self->{Database}";
$Self->{'Database::Type'} = 'mssql';
# ---------------------------------------------------- #
# fs root directory
# ---------------------------------------------------- #
$Self->{Home} = 'c:/otrs';

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

$Self->{'LogModule'} = 'Kernel::System::Log::File';
$Self->{'LogModule::LogFile'} = "$Self->{Home}/var/log/otrs.log";

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

# ---------------------------------------------------- #
# 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.23 $)[1];

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

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

1;
And here's a copy of the otrs log:
[Wed Jan 18 10:20:20 2012][Notice][Kernel::System::User::GetUserData] Panic! No UserData for user: 'root@localhost'!!!
[Wed Jan 18 10:20:20 2012][Error][Kernel::System::User::SetPassword][630] No such User!
[Wed Jan 18 10:20:33 2012][Notice][Kernel::System::User::SetPassword] User: 'root' changed password successfully!
[Wed Jan 18 13:21:24 2012][Notice][Kernel::System::User::GetUserData] Panic! No UserData for user: 'root@localhost'!!!
[Wed Jan 18 13:21:24 2012][Error][Kernel::System::User::SetPassword][630] No such User!
[Wed Jan 18 13:21:33 2012][Notice][Kernel::System::User::SetPassword] User: 'root' changed password successfully!
Edit: Just a quick note, the login times out really really quickly. It doesn't actually seem like it's hitting the db.

Edit2: Changed the title so it's less misleading. The root login works and is present in the users table. But it only works from a script. I don't get any logon events in otrs.log when I try from the browser.
Last edited by ITDepartment2012 on 19 Jan 2012, 21:21, edited 1 time in total.
ITDepartment2012
Znuny newbie
Posts: 15
Joined: 18 Jan 2012, 21:44
Znuny Version: 3.0.11

Re: Can't login with root password

Post by ITDepartment2012 »

Bump.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Can't login with root password

Post by jojo »

I see no error for the login as root (root@localhost ist not existing on your installation). Please also check if the database was populated correctly (via SQL)
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
ITDepartment2012
Znuny newbie
Posts: 15
Joined: 18 Jan 2012, 21:44
Znuny Version: 3.0.11

Re: Can't login with root password

Post by ITDepartment2012 »

jojo wrote:I see no error for the login as root (root@localhost ist not existing on your installation). Please also check if the database was populated correctly (via SQL)
Yep. All scripts completed without errors. User root (not user root@localhost) is in the user table.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Can't login with root password

Post by jojo »

So you should be able to log in. There is no error for this in your log extract
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
ITDepartment2012
Znuny newbie
Posts: 15
Joined: 18 Jan 2012, 21:44
Znuny Version: 3.0.11

Re: Can't login with root password

Post by ITDepartment2012 »

jojo wrote:So you should be able to log in. There is no error for this in your log extract
I wouldn't be here if I could.
ITDepartment2012
Znuny newbie
Posts: 15
Joined: 18 Jan 2012, 21:44
Znuny Version: 3.0.11

Re: Can't login with root password

Post by ITDepartment2012 »

Oh, as a side note, there are no login events logged when going via the browser interface. Those are from changing the password from the script.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Can't login from browser

Post by jojo »

check if you are on the right frontend server. Please also check the web server log
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
ITDepartment2012
Znuny newbie
Posts: 15
Joined: 18 Jan 2012, 21:44
Znuny Version: 3.0.11

Re: Can't login from browser

Post by ITDepartment2012 »

I'm working directly on the server hosting *everything*

IIS logs (the entirety of the logs. This is the whole thing.)

W3SVC3
2012-01-17 23:33:15 172.16.1.37 GET /otrs/index.pl - 80 - 172.16.1.37 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.1;+WOW64;+Trident/4.0;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729) 404 0 2 589
2012-01-17 23:33:30 127.0.0.1 GET /otrs/index.pl - 80 - 127.0.0.1 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.1;+WOW64;+Trident/4.0;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729) 404 0 2 1
Nothing logged for each attempt.

WSVC1
#Software: Microsoft Internet Information Services 7.5
#Version: 1.0
#Date: 2012-01-18 23:35:13
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken
2012-01-18 23:35:13 172.16.1.37 GET / - 80 - 172.16.1.37 WWW-Mechanize/1.0.0+(http://rubyforge.org/projects/mechanize/) 200 0 0 1950
Nothing once again.

It seems like the page never actually submits any data. Which makes me think it's something wrong with the script or one of the modules.

There are also no authentication errors for SQL.

I have no logs to troubleshoot.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Can't login from browser

Post by jojo »

"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
ITDepartment2012
Znuny newbie
Posts: 15
Joined: 18 Jan 2012, 21:44
Znuny Version: 3.0.11

Re: Can't login from browser

Post by ITDepartment2012 »

Yep! That's exactly how I set it up.

I'm actually running through it again to see if there's anything I missed.

And used these instructions:
http://blogs.iis.net/wadeh/archive/2009 ... iis-7.aspx

It seems to be a problem with basic connectivity between browser and database. I just can't figure out where.
ITDepartment2012
Znuny newbie
Posts: 15
Joined: 18 Jan 2012, 21:44
Znuny Version: 3.0.11

Re: Can't login from browser

Post by ITDepartment2012 »

There is something I noticed when I ran through the module installer.

I tried installing JSON, which is supposedly optional. When I run the installer for JSON::XS, it throws up an error about strawberry perl, which I mistakenly installed according to the first set of instructions:
There are two major Perl distributions to choose from; Strawberry Perl and ActiveState Perl. The two distributions are both very good and comparable. Strawberry Perl is re-distributable, which is the reason why it is the Perl of choice in the OTRS Windows installer.
I only saw the ActivePerl instructions after I read that, so I went ahead and installed it. I can't help but think there' s a conflict. Perl also crashes out at one point during the JSON:XS install.

This is what I get with both directories found:

cpan> install JSON:XS
Running install for module 'JSON::XS'
Running make for M/ML/MLEHMANN/JSON-XS-2.32.tar.gz
Checksum for C:\Perl\cpan\sources\authors\id\M\ML\MLEHMANN\JSON-XS-2.32.tar.gz o
k
JSON-XS-2.32/
JSON-XS-2.32/XS/
JSON-XS-2.32/XS/Boolean.pm
JSON-XS-2.32/t/
JSON-XS-2.32/t/14_latin1.t
JSON-XS-2.32/t/15_prefix.t
JSON-XS-2.32/t/20_faihu.t
JSON-XS-2.32/t/04_dwiw_encode.t
JSON-XS-2.32/t/06_pc_pretty.t
JSON-XS-2.32/t/16_tied.t
JSON-XS-2.32/t/12_blessed.t
JSON-XS-2.32/t/19_incr.t
JSON-XS-2.32/t/09_pc_extra_number.t
JSON-XS-2.32/t/21_evans.t
JSON-XS-2.32/t/99_binary.t
JSON-XS-2.32/t/11_pc_expo.t
JSON-XS-2.32/t/07_pc_esc.t
JSON-XS-2.32/t/08_pc_base.t
JSON-XS-2.32/t/02_error.t
JSON-XS-2.32/t/17_relaxed.t
JSON-XS-2.32/t/18_json_checker.t
JSON-XS-2.32/t/13_limit.t
JSON-XS-2.32/t/22_comment_at_eof.t
JSON-XS-2.32/t/00_load.t
JSON-XS-2.32/t/01_utf8.t
JSON-XS-2.32/t/03_types.t
JSON-XS-2.32/t/10_pc_keysort.t
JSON-XS-2.32/t/05_dwiw_decode.t
JSON-XS-2.32/Changes
JSON-XS-2.32/bin/
JSON-XS-2.32/bin/json_xs
JSON-XS-2.32/META.json
JSON-XS-2.32/META.yml
JSON-XS-2.32/README
JSON-XS-2.32/XS.xs
JSON-XS-2.32/eg/
JSON-XS-2.32/eg/bench
JSON-XS-2.32/Makefile.PL
JSON-XS-2.32/typemap
JSON-XS-2.32/COPYING
JSON-XS-2.32/XS.pm
JSON-XS-2.32/MANIFEST

CPAN.pm: Going to build M/ML/MLEHMANN/JSON-XS-2.32.tar.gz

Set up gcc environment - 4.4.3
Checking if your kit is complete...
Looks good
Writing Makefile for JSON::XS
Writing MYMETA.yml
cp XS/Boolean.pm blib\lib\JSON\XS\Boolean.pm
cp XS.pm blib\lib\JSON\XS.pm
C:\Perl\bin\perl.exe C:\Perl\lib\ExtUtils\xsubpp -typemap C:\Perl\lib\ExtUtils\
typemap -typemap typemap XS.xs > XS.xsc && C:\Perl\bin\perl.exe -MExtUtils::Com
mand -e "mv" -- XS.xsc XS.c
C:/STRAWB~1/c/bin/gcc.exe -c -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DPERL_T
EXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
-DUSE_PERLIO -D_USE_32BIT_TIME_T -DHASATTRIBUTE -fno-strict-aliasing -mms-bitfie
lds -O2 -DVERSION=\"2.32\" -DXS_VERSION=\"2.32\" "-IC:\Perl\lib\CO
RE" XS.c
Running Mkbootstrap for JSON::XS ()
C:\Perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 XS.bs
C:\Perl\bin\perl.exe -MExtUtils::Mksymlists \
-e "Mksymlists('NAME'=>\"JSON::XS\", 'DLBASE' => 'XS', 'DL_FUNCS' => { },
'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);"
Set up gcc environment - 4.4.3
dlltool --def XS.def --output-exp dll.exp
C:\STRAWB~1\c\bin\g++.exe -o blib\arch\auto\JSON\XS\XS.dll -Wl,--base-file -Wl,d
ll.base -mdll -L"C:\Perl\lib\CORE" XS.o C:\Perl\lib\CORE\perl514.lib -lkernel3
2 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32
-lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl
32 -lmsvcrt dll.exp
dlltool --def XS.def --base-file dll.base --output-exp dll.exp
C:\STRAWB~1\c\bin\g++.exe -o blib\arch\auto\JSON\XS\XS.dll -mdll -L"C:\Perl\lib\
CORE" XS.o C:\Perl\lib\CORE\perl514.lib -lkernel32 -luser32 -lgdi32 -lwinspool
-lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -
lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 -lmsvcrt dll.exp
C:\Perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 755 blib\arch\auto\JSON\X
S\XS.dll
C:\Perl\bin\perl.exe -MExtUtils::Command -e "cp" -- XS.bs blib\arch\auto\JSON\XS
\XS.bs
C:\Perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 blib\arch\auto\JSON\X
S\XS.bs
C:\Perl\bin\perl.exe -MExtUtils::Command -e "cp" -- bin/json_xs blib\script\json
_xs
pl2bat.bat blib\script\json_xs
MLEHMANN/JSON-XS-2.32.tar.gz
C:\STRAWB~1\c\bin\dmake.exe -- OK
Running make test
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib',
'blib\arch')" t/*.t
t/00_load.t ............. ok
t/01_utf8.t ............. ok
t/02_error.t ............ ok
t/03_types.t ............ ok
t/04_dwiw_encode.t ...... ok
t/05_dwiw_decode.t ...... ok
t/06_pc_pretty.t ........ ok
t/07_pc_esc.t ........... ok
t/08_pc_base.t .......... ok
t/09_pc_extra_number.t .. ok
t/10_pc_keysort.t ....... ok
t/11_pc_expo.t .......... ok
t/12_blessed.t .......... ok
t/13_limit.t ............ ok
t/14_latin1.t ........... ok
t/15_prefix.t ........... ok
t/16_tied.t ............. ok
t/17_relaxed.t .......... ok
t/18_json_checker.t ..... Dubious, test returned 5 (wstat 1280, 0x500)
Failed 5/39 subtests
<--- At this point perl returns an error saying the "Command Line Interpreter has stopped working."
t/19_incr.t ............. ok
t/20_faihu.t ............ ok
t/21_evans.t ............ ok
t/22_comment_at_eof.t ... ok
t/99_binary.t ........... ok

Test Summary Report
-------------------
t/18_json_checker.t (Wstat: 1280 Tests: 34 Failed: 0)
Non-zero exit status: 5
Parse errors: Bad plan. You planned 39 tests but ran 34.
Files=24, Tests=25559, 14 wallclock secs ( 2.33 usr + 0.17 sys = 2.50 CPU)
Result: FAIL
Failed 1/24 test programs. 0/25559 subtests failed.
dmake.exe: Error code 255, while making 'test_dynamic'
MLEHMANN/JSON-XS-2.32.tar.gz
C:\STRAWB~1\c\bin\dmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports MLEHMANN/JSON-XS-2.32.tar.gz
Running make install
make test had returned bad status, won't install without force
Failed during this command:
MLEHMANN/JSON-XS-2.32.tar.gz : make_test NO



jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Can't login from browser

Post by jojo »

deinstall all perl installations and start over.
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
ITDepartment2012
Znuny newbie
Posts: 15
Joined: 18 Jan 2012, 21:44
Znuny Version: 3.0.11

Re: Can't login from browser

Post by ITDepartment2012 »

A couple notes on the document:

1. You have to extract the OTRS zip file *before* running the perl scripts.
2. The 64bit download of ActivePerl will not work. You need the 32bit. Also the most recent ActivePerl version is 5.14
3. You must use the ppm to download JSON
4. Date::Manip errors out in cpan - use ppm
5. Should create the otrs user first and then run the scripts.

But after all this. It still doesn't work.

Same problem.

Couple differences this time. otrs.log is not there and instead of root, root@localhost is the user in the database.
Nothing logged in the server logs.

I'm at a total loss. I have no idea why the authentication information wouldn't be submitted to the database. Everything looks ok, I followed the install instructions and cleared everything out.
ITDepartment2012
Znuny newbie
Posts: 15
Joined: 18 Jan 2012, 21:44
Znuny Version: 3.0.11

Re: Can't login from browser

Post by ITDepartment2012 »

I'm trying to provide as much detail here as possible.

I've just run through this:
http://faq.otrs.org/otrs/public.pl?Acti ... ItemID=371

On the office chance

The tmp/cache directory is empty

These files do not exist:
search ZZZAuto.pm for lines like $Self->{'Frontend::Module'}->{'AgentStats'} = { ... }; and comment them out
remove ZZZAAuto.pm and run afterwards $OTRS_HOME/bin/otrs.RebuildConfig.pl
ITDepartment2012
Znuny newbie
Posts: 15
Joined: 18 Jan 2012, 21:44
Znuny Version: 3.0.11

Re: Can't login from browser

Post by ITDepartment2012 »

Bump.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Can't login from browser

Post by jojo »

did you do a complete new installation, as suggested?
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
ITDepartment2012
Znuny newbie
Posts: 15
Joined: 18 Jan 2012, 21:44
Znuny Version: 3.0.11

Re: Can't login from browser

Post by ITDepartment2012 »

Yes.
ITDepartment2012
Znuny newbie
Posts: 15
Joined: 18 Jan 2012, 21:44
Znuny Version: 3.0.11

Re: Can't login from browser

Post by ITDepartment2012 »

Some additional notes for 2008 users. Even with UAC turned off, 2008 restricted access to JSON.pm because it was downloaded from the Interent. I had to go into C:\otrs\kernel\system and click "unblock" on everything.

This was really helpful:
http://www.lotb.de/wordpress/2010/json- ... w/?lang=en
http://blogs.technet.com/b/heyscripting ... shell.aspx
https://nicholasrogoff.wordpress.com/20 ... rver-2008/
ITDepartment2012
Znuny newbie
Posts: 15
Joined: 18 Jan 2012, 21:44
Znuny Version: 3.0.11

Re: Can't login from browser

Post by ITDepartment2012 »

After a bit more testing, it's definitely the ActivePerl handler. With test perl scripts and cgi, IIS reports a handler not found error.

It's worth mentioning that R2 comes with IIS 7.5. It's possible something changed between IIS 7 and now.

It works in Apache and connects to the DB using ODBC, just not in IIS. I've had to throw in the towel on this one. Too much messing around.
ITfromScratch
Znuny newbie
Posts: 2
Joined: 15 Apr 2013, 17:20
Znuny Version: OTRS 3.2
Real Name: The New Guy

Re: Can't login from browser

Post by ITfromScratch »

I was having a similar problem. I was able to log in initially, but then after doing some tweaks to the config file (I was trying to get LDAP to work), I could no longer log in.

I tried changing the password with:

Code: Select all

sudo ./otrs.SetPassword.pl root@localhost password
The response was

Code: Select all

Done.
but I still couldn't log in.

I had the thought finally that maybe I needed to restart Apache after doing that update. I did, and now it works.

I don't know if that would fix your issue or not, but it was the solution to my similar issue.
Post Reply