I'm getting this error when attempting to visit the Admin interface on my OTRS Jumpbox:
**********
Bad Gateway
The proxy server received an invalid response from an upstream server.
**********
I can't use that interface to do anything unless I go into the VMWare Console and restart the server there.
While auditing our backups today, I noticed that we had a whole bunch of tmp.* folders and a bunch of .tgz files of 0K or 1K size. The tmp folders had largish files in them (several hundred megabytes).
Since this didn't look right, I rebooted the server from the VMWare console, and started a backup. The backup failed to complete and hung the server.
I've also been getting these errors (via email) every day at the time the backup should be finishing:
**********
DBI connect('database=otrs;host=localhost;','otrs',...) failed: Can't connect to local
MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at
/var/data/otrs/Kernel/System/DB.pm line 197
ERROR: OTRS-UnlockTickets-10 Perl: 5.8.7 OS: linux Time: Mon May 5 01:50:47 2008
Message: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'
(2)
Traceback (17730):
Module: Kernel::System::DB::new (v1.75) Line: 174
Module: /var/data/otrs/bin/UnlockTickets.pl (v1.24) Line: 57
Got no DBObject! at /var/data/otrs/Kernel/System/Ticket.pm line 112, line 4.
**********
Please help me. I need this server to backup properly.
Further Troubleshooting
I found in another thread on these forums where someone had tried running the backup manually. So I decided to attempt it.
First I ran /jumpbox/bin/run_backup.rb with these results::
**********
Backup is not mounted, mounting.mount: only root can mount //pgc-srv-bkup/OTRSBackup on /var/data/backup
/usr/lib/ruby/1.8/fileutils.rb:1370:in `fu_list': undefined method `to_str' for nil:NilClass (NoMethodError)
from /usr/lib/ruby/1.8/fileutils.rb:1370:in `fu_list'
from /usr/lib/ruby/1.8/fileutils.rb:596:in `rm_r'
from /usr/lib/ruby/1.8/fileutils.rb:625:in `rm_rf'
from /jumpbox/bin/run_backup.rb:108
**********
Then I repeated the command prefacing it with sudo (sudo /jumpbox/bin/run_backup.rb) and entering the root password before continuing. Here's the results:
**********
Backup is not mounted, mounting./var/data/backup/tmp.aFD54r/bu.tar.gz
/var/data/backup/jb-otrs-1.0-20080508120030.tgz
/var/data/backup/tmp.aFD54r
tar: Removing leading `/' from member names
Killed
**********
The process was killed while I was having my lunch. No action was taken to kill the process.
So I restarted it to see if it would repeat:
**********
Backup is not mounted, mounting.
/var/data/backup/tmp.9F4Vxt/bu.tar.gz
/var/data/backup/jb-otrs-1.0-20080508130642.tgz
/var/data/backup/tmp.9F4Vxt
tar: Removing leading `/' from member names
/jumpbox/bin/../application_portal/privileged_scripts/ubuntu/lib/backup.rb:353:in ``': Bad file descriptor - mount (Errno::EBADF)
from /jumpbox/bin/../application_portal/privileged_scripts/ubuntu/lib/backup.rb:353:in `unmount'
from /jumpbox/bin/run_backup.rb:111
**********
Again, not successful.
I really need help on this.
Further Troubleshooting
NOTE: You should not run run_backup.rb manually because it will not work. It is designed to be run by the admin portal which takes care of several requirements before running.
Austin
OTRS Backups and Bad Gateway Error - OTRS 1.0 Known Bug
This version of the OTRS JumpBox has a know bug, which is probably what you are encountering. I am working on a complete response so please be patient. It is a simple fix.
Austin
OTRS Backups and Bad Gateway Error - OTRS 1.0 Known Bug
Ok, the errors you report above are consistent with the known bug I mention. I have a fix for the OTRS 1.0 JumpBox. SSH into the jumpbox as the admin user, then download the fixed run_backup.rb file:
Now copy this file over the old one making a backup in the process:
Scheduled backups should now work and hitting the "Run Backup now" button should work. If it doesn't let me know.
Also, the temp directories in your backup share can be removed. If the admin portal is not running you can restart the JumpBox and it should come up.
Sorry about the trouble. This has been fixed for some time.
Austin
Thank you
Many thanks Austin.
That worked perfectly.
OTRS Backups and Bad Gateway Error
Ok,
What version of the OTRS JumpBox do you have? Have you registered it and enabled shell access? If you have, could you SSH in and run the command "df -h" and paste the results here?
Austin
Results
This is a registered OTRS JumpBox, shell access is enabled. The JumpBox download we're running from is otrs-1.0.zip which I downloaded Dec. 31/07. Here are the results of "df -h". I need to get a backup running so I can migrate to the latest OTRS Jumpbox.
Filesystem Size Used Avail Use% Mounted on/dev/sda1 965M 564M 353M 62% /
varrun 126M 92K 126M 1% /var/run
varlock 126M 0 126M 0% /var/lock
udev 126M 60K 126M 1% /dev
devshm 126M 0 126M 0% /dev/shm
/dev/sdb1 9.9G 488M 8.9G 6% /storage
/storage/tmp 9.9G 488M 8.9G 6% /tmp
/storage/mysql 9.9G 488M 8.9G 6% /var/lib/mysql
/storage/otrs 9.9G 488M 8.9G 6% /var/data/otrs
/storage/otrs-webroot
9.9G 488M 8.9G 6% /var/data/otrs-webroot
//pgc-srv-bkup/OTRSBackup
147G 69G 79G 47% /var/data/backup