Unable to set Cron jobs or run manually.

Moderator: crythias

Locked
Davx
Znuny newbie
Posts: 10
Joined: 10 Jul 2012, 14:12
Znuny Version: 3.0.10
Real Name: David Henden

Unable to set Cron jobs or run manually.

Post by Davx »

Hi Guys,

I have installed OTRS 3.0.10 on linux mint which went well, however I am having some issues automating the mail fetching. I can run it fine through the back-end of otrs but if I try and run this:

./otrs.PostMasterMailbox.pl
DBI connect('database=otrs;host=localhost;','otrs',...) failed: Access denied for user 'otrs'@'localhost' (using password: YES) at /opt/otrs/Kernel/System/DB.pm line 256
ERROR: OTRS-otrs.PostMasterMailbox.pl-10 Perl: 5.12.4 OS: linux Time: Tue Jul 10 13:16:19 2012

Message: Access denied for user 'otrs'@'localhost' (using password: YES)

Traceback (3344):
Module: Kernel::System::DB::new (v1.144.2.1) Line: 227
Module: ./otrs.PostMasterMailbox.pl (v1.4) Line: 79

Got no DBObject! at /opt/otrs/Kernel/System/PID.pm line 81.

It would be nice to know where OTRS stores the DB information, when I log into my local sql-server I can see the database OTRS2 but not OTRS. OTRS2 contains all of the information which is being added, I have even tried running grep -r "otrs2" /opt/otrs with no results :S

Any help would be appreciated.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Unable to set Cron jobs or run manually.

Post by crythias »

Kernel/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
Davx
Znuny newbie
Posts: 10
Joined: 10 Jul 2012, 14:12
Znuny Version: 3.0.10
Real Name: David Henden

Re: Unable to set Cron jobs or run manually.

Post by Davx »

Ok thanks, I found my real database user/password here /var/lib/otrs/Config/ZZZAuto.pm

I then edited /opt/otrs/Kernel/Config.pm changing the defaults to the correct value. Now when I run /opt/otrs/bin/otrs.PostMasterMailbox.pl I get this:

$ ./otrs.PostMasterMailbox.pl
DBD::mysql::st execute failed: Unknown column 'process_change' in 'field list' at /opt/otrs/Kernel/System/DB.pm line 618.
ERROR: OTRS-otrs.PostMasterMailbox.pl-10 Perl: 5.12.4 OS: linux Time: Tue Jul 10 13:51:58 2012

Message: Unknown column 'process_change' in 'field list', SQL: 'SELECT process_name, process_id, process_host, process_create, process_change FROM process_id WHERE process_name = ? LIMIT 1'

Traceback (3909):
Module: Kernel::System::PID::PIDGet (v1.28) Line: 184
Module: Kernel::System::PID::PIDCreate (v1.28) Line: 124
Module: ./otrs.PostMasterMailbox.pl (v1.4) Line: 83

DBD::mysql::db do failed: Unknown column 'process_change' in 'field list' at /opt/otrs/Kernel/System/DB.pm line 478.
ERROR: OTRS-otrs.PostMasterMailbox.pl-10 Perl: 5.12.4 OS: linux Time: Tue Jul 10 13:51:58 2012

Message: Unknown column 'process_change' in 'field list', SQL: 'INSERT INTO process_id (process_name, process_id, process_host, process_create, process_change) VALUES (?, ?, ?, ?, ?)'

Traceback (3909):
Module: Kernel::System::PID::PIDCreate (v1.28) Line: 154
Module: ./otrs.PostMasterMailbox.pl (v1.4) Line: 83

NOTICE: PostMasterMailbox.pl is already running (use '-f 1' if you want to start it forced)!
$ ./otrs.PostMasterMailbox.pl -f 1
DBD::mysql::st execute failed: Unknown column 'process_change' in 'field list' at /opt/otrs/Kernel/System/DB.pm line 618.
ERROR: OTRS-otrs.PostMasterMailbox.pl-10 Perl: 5.12.4 OS: linux Time: Tue Jul 10 13:52:26 2012

Message: Unknown column 'process_change' in 'field list', SQL: 'SELECT process_name, process_id, process_host, process_create, process_change FROM process_id WHERE process_name = ? LIMIT 1'

Traceback (3911):
Module: Kernel::System::PID::PIDGet (v1.28) Line: 184
Module: Kernel::System::PID::PIDCreate (v1.28) Line: 124
Module: ./otrs.PostMasterMailbox.pl (v1.4) Line: 83

DBD::mysql::db do failed: Unknown column 'process_change' in 'field list' at /opt/otrs/Kernel/System/DB.pm line 478.
ERROR: OTRS-otrs.PostMasterMailbox.pl-10 Perl: 5.12.4 OS: linux Time: Tue Jul 10 13:52:26 2012

Message: Unknown column 'process_change' in 'field list', SQL: 'INSERT INTO process_id (process_name, process_id, process_host, process_create, process_change) VALUES (?, ?, ?, ?, ?)'

Traceback (3911):
Module: Kernel::System::PID::PIDCreate (v1.28) Line: 154
Module: ./otrs.PostMasterMailbox.pl (v1.4) Line: 83

NOTICE: PostMasterMailbox.pl is already running but is starting again!
DBD::mysql::st execute failed: Unknown column 'imap_folder' in 'field list' at /opt/otrs/Kernel/System/DB.pm line 618.
ERROR: OTRS-otrs.PostMasterMailbox.pl-10 Perl: 5.12.4 OS: linux Time: Tue Jul 10 13:52:26 2012

Message: Unknown column 'imap_folder' in 'field list', SQL: 'SELECT login, pw, host, account_type, queue_id, imap_folder, trusted, comments, valid_id, create_time, change_time FROM mail_account WHERE id = ?'

Traceback (3911):
Module: Kernel::System::MailAccount::MailAccountGet (v1.17) Line: 194
Module: main::Fetch (v1.4) Line: 179
Module: ./otrs.PostMasterMailbox.pl (v1.4) Line: 93

ERROR: OTRS-otrs.PostMasterMailbox.pl-10 Perl: 5.12.4 OS: linux Time: Tue Jul 10 13:52:26 2012

Message: Need Login!

Traceback (3911):
Module: Kernel::System::MailAccount::MailAccountFetch (v1.17) Line: 409
Module: main::Fetch (v1.4) Line: 180
Module: ./otrs.PostMasterMailbox.pl (v1.4) Line: 93



This was a-lot easier in previous versions :(
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Unable to set Cron jobs or run manually.

Post by crythias »

... unknown column means unknown column. Your schema is bad. I was assuming an install, not an upgrade ...
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
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Unable to set Cron jobs or run manually.

Post by crythias »

Which, by the way, means you are pointing to an OTRS2 database and did not complete an *install* with installer or manual with the sql or ... And you should back up asap if you hadn't previously. You're likely to encounter lots more issues if you were intending to upgrade.
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
Davx
Znuny newbie
Posts: 10
Joined: 10 Jul 2012, 14:12
Znuny Version: 3.0.10
Real Name: David Henden

Re: Unable to set Cron jobs or run manually.

Post by Davx »

Its not an upgrade, I installed OTRS via a apt-get. Its live and working, I'm just trying to run the PostMasterMailbox.pl to fetch the emails, at the moment I'm having to log-in and click fetch :(
Davx
Znuny newbie
Posts: 10
Joined: 10 Jul 2012, 14:12
Znuny Version: 3.0.10
Real Name: David Henden

Re: Unable to set Cron jobs or run manually.

Post by Davx »

Thanks for the help btw, I already had an old database called otrs as I tried installing it manually some time ago, then found that it was available as a package and reinstalled using the db name otrs2.
Davx
Znuny newbie
Posts: 10
Joined: 10 Jul 2012, 14:12
Znuny Version: 3.0.10
Real Name: David Henden

Re: Unable to set Cron jobs or run manually.

Post by Davx »

What an IDIOT!!!!!

/opt/otrs/ - Old install
/usr/share/otrs/ - New Install

Working fine now.....oopps
Locked