Table 'otrs.users' doesn't exist

Moderator: crythias

Locked
pmn
Znuny newbie
Posts: 23
Joined: 27 May 2015, 12:01
Znuny Version: 4.0.8-02

Table 'otrs.users' doesn't exist

Post by pmn »

Hi,

I was able to install otrs 4 on opensuse 12.1 and at the final step 4 was given a password for the root@localhost. (fresh installation)
But cannot log in to the index.pl with the root@localhost with the given password.

when i see the otrs log file it says

[Kernel::System::User::UserSearch][660] Table 'otrs.users' doesn't exist, SQL: 'SELECT id, login FROM users WHERE (login) LIKE ? AND valid_id IN (1)'

I even tried changing the password using /opt/otrs/bin/otrs.SetPassword.pl root@localhost <newpassword>

for this also it throws the above error,

what could be the issue , any insight appreciated

Thank you
pab
Znuny advanced
Posts: 138
Joined: 20 Jan 2011, 11:21
Znuny Version: [...],6.x, Znuny 7
Real Name: Peter
Company: maxence business consulting GmbH
Location: Dormagen

Re: Table 'otrs.users' doesn't exist

Post by pab »

Hi,

Have you looked into the database? Does otrs.users exist?
What does the web servers log say?
pmn
Znuny newbie
Posts: 23
Joined: 27 May 2015, 12:01
Znuny Version: 4.0.8-02

Re: Table 'otrs.users' doesn't exist

Post by pmn »

Hi ,

when i run perl /opt/otrs/bin/otrs.CheckDB.pl i get

Trying to connect to database
DSN : DBI:mysql:database=otrs;host=127.0.0.1
DatabaseUser: root

[Fri Jun 12 10:12:59 2015] otrs.CheckDB.pl: DBD::mysql::st execute failed: Table 'otrs.valid' doesn't exist at /opt/otrs/Kernel/System/DB.pm line 629.
ERROR: OTRS-otrs.CheckDB.pl-08 Perl: 5.14.2 OS: linux Time: Fri Jun 12 10:12:59 2015

Message: Table 'otrs.valid' doesn't exist, SQL: 'SELECT * FROM valid'

Traceback (10229):
Module: /opt/otrs/bin/otrs.CheckDB.pl Line: 53

[Fri Jun 12 10:12:59 2015] otrs.CheckDB.pl: DBD::mysql::st fetchrow_array failed: fetch() without execute() at /opt/otrs/Kernel/System/DB.pm line 696.
Connection successful, but no initial inserts are found!

Also i cannot see the otrs datase tables when i use show tables in my sql console .
root
Administrator
Posts: 4253
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Table 'otrs.users' doesn't exist

Post by root »

What does this command shows?

Code: Select all

mysql -e "SHOW TABLES;" -u otrs -pDATABASEPASSWORD otrs
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
pmn
Znuny newbie
Posts: 23
Joined: 27 May 2015, 12:01
Znuny Version: 4.0.8-02

Re: No UserID found for 'otrs'

Post by pmn »

hi

i deleted the /otrs folder under mysql and ran the installer again and was able to log with root@localhost
Now i cannot run the cron jobs as i cannot login with otrs user with the password provided in the interface.

otrs error log says "No UserID found for 'otrs"

But i can see the otrs user and password in Config.pm

when i run Select * from otrs.user in mysql console i only see the record for root@localhost

do i need to manually add otrs user to otrs.user database ? I thought the user is automatically added when running the web interface

if so what is the syntax

Thanks
root
Administrator
Posts: 4253
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Table 'otrs.users' doesn't exist

Post by root »

I strongly recommend to study the mysql manual. If your table where create a InnoDB tables and you don't have set innodb_file_per_table in server config your data is still in the InnoDB data file. Next time just use a 'DROP database orts' to delete the database.
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
pmn
Znuny newbie
Posts: 23
Joined: 27 May 2015, 12:01
Znuny Version: 4.0.8-02

Re: Table 'otrs.users' doesn't exist

Post by pmn »

Thanks for the reply

I did drop database otrs ; but did not move innodb files when running the installer again.
Is there any fix at this stage to add the otrs user to the user table ?
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Table 'otrs.users' doesn't exist

Post by jojo »

the user otrs is a database user, not a OTRS user. Please don't mix up these two.
"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
pmn
Znuny newbie
Posts: 23
Joined: 27 May 2015, 12:01
Znuny Version: 4.0.8-02

Re: No UserID found for 'otrs'

Post by pmn »

Is there anything i can do to add this otrs database user to the users table in order to run the cron jobs and move forward.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Table 'otrs.users' doesn't exist

Post by jojo »

you don't need a database user otrs to run cron jobs as this is done by a unix user.
Please follow the installatiin guidelines and consult your linux and database admins for support.
"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
Locked