juanluisbaptiste / docker-otrs Goto Github PK
View Code? Open in Web Editor NEWThe unofficial Znuny/OTRS Ticketing System docker image
Home Page: https://www.juanbaptiste.tech/category/otrs
License: GNU Lesser General Public License v3.0
The unofficial Znuny/OTRS Ticketing System docker image
Home Page: https://www.juanbaptiste.tech/category/otrs
License: GNU Lesser General Public License v3.0
The readme says:
"OTRS_ROOT_PASSWORD
root@localhost user password. Default password is changeme
."
If OTRS_ROOT_PASSWORD is empty it uses DEFAULT_OTRS_PASSWORD, but the variable is nowhere defined, so the password is set to nothing instead to changeme.
Is it possible?
Hi i wold like to know what are the OTRS_TIMEZONE values. The only value i can see is UTC, but i like to setup to Mexico_City, how do i do that. I tried UTC-6 but it did not work. I really apreciate your help.
Hi,
thank you for the provision of this image :)
I have a problem with the database which is not available when everything seems correct.
Here are the logs
DB
Running mysql_install_db ..., Installing MariaDB/MySQL system tables in '/var/lib/mysql' ..., 180425 15:01:37 [Note] /usr/libexec/mysqld (mysqld 5.5.56-MariaDB) starting as process 33 ..., OK, Filling help tables..., 180425 15:01:38 [Note] /usr/libexec/mysqld (mysqld 5.5.56-MariaDB) starting as process 40 ..., OK, , To start mysqld at boot time you have to copy, support-files/mysql.server to the right place for your system, , PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !, To do so, start the server, then issue the following commands:, , '/usr/bin/mysqladmin' -u root password 'new-password', '/usr/bin/mysqladmin' -u root -h xxxxxxx password 'new-password', , Alternatively you can run:, '/usr/bin/mysql_secure_installation', , which will also give you the option of removing the test, databases and anonymous user created by default. This is, strongly recommended for production servers., , See the MariaDB Knowledgebase at http://mariadb.com/kb or the, MySQL manual for more instructions., , You can start the MariaDB daemon with:, cd '/usr' ; /usr/bin/mysqld_safe --datadir='/var/lib/mysql', , You can test the MariaDB daemon with mysql-test-run.pl, cd '/usr/mysql-test' ; perl mysql-test-run.pl, , Please report any problems at http://mariadb.org/jira, , The latest information about MariaDB is available at http://mariadb.org/., You can find additional information about the MySQL part at:, http://dev.mysql.com, Consider joining MariaDB's strong and vibrant community:, https://mariadb.org/get-involved/, , Finished mysql_install_db, 180425 15:01:38 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'., 180425 15:01:38 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql,
OTRS:
otrs_1 | [INFO] Database server is not available. Waiting 2 seconds...
otrs_1 | [INFO] Database server is not available. Waiting 2 seconds...
otrs_1 | [INFO] Database server is not available. Waiting 2 seconds...
otrs_1 | [INFO] Database server is not available. Waiting 2 seconds...
Docker Compose
services:
otrs:
image: juanluisbaptiste/otrs:latest
build: otrs
ports:
- '80:80'
depends_on:
- mariadb
env_file: otrs-setup.env
volumes:
- './volumes/config:/opt/otrs/Kernel'
- './otrs/backup:/var/otrs/backups'
- '/etc/localtime:/etc/localtime:ro'
mariadb:
image: juanluisbaptiste/otrs-mariadb:latest
build: mariadb
expose:
- "3306"
env_file: otrs-setup.env
volumes:
- './volumes/mysql:/var/lib/mysql'
- '/etc/localtime:/etc/localtime:ro'
otrs-setup.env :
OTRS_ROOT_PASSWORD=changeme
OTRS_DB_NAME=otrs
OTRS_DB_HOST=mariadb
OTRS_DB_PORT=3306
OTRS_DB_USER=otrs
OTRS_LANGUAGE=fr
Permission :
ls -l ./volumes/mysql/
-rw-rw---- 1 27 sudo 16384 avril 25 15:01 aria_log.00000001 -rw-rw---- 1 27 sudo 52 avril 25 15:01 aria_log_control
-rw-rw---- 1 27 sudo 18874368 avril 25 15:01 ibdata1 -rw-rw---- 1 27 sudo 268435456 avril 25 15:01 ib_logfile0
-rw-rw---- 1 27 sudo 268435456 avril 25 15:01 ib_logfile1 drwx------ 2 27 sudo 4096 avril 25 15:01 mysql
srwxrwxrwx 1 27 sudo 0 avril 25 15:01 mysql.sock drwx------ 2 27 sudo 4096 avril 25 15:01 performance_schema
Hi there,
would it be possible to include spamassassin? There is a setting (i didn't know of) in Core::Email::PostMaster
which we like to use.
So if you agree that this would be a benefit to this project I would create a pull request.
Kind Regards
Hi,
I made a backup of my legacy OTRS install (v5.0.27) with :
linux:/opt/otrs/scripts# ./backup.pl -d /backup/
I put the backup in the folder ./volumes/backup
When trying to restore it, I run into the following error:
mysqladmin:
connect to server at 'mariadb' failed
error: 'Lost connection to MySQL server at 'reading initial communication packet', system error: 111'
[INFO] Database server is not available. Waiting 2 seconds...
[INFO] Database server is up !
[INFO] Restoring OTRS backup: "2018-11-08_09-34" for host
[INFO] Updating database password on configuration file...
sed: can't read /opt/otrs/Kernel/Config.pm: No such file or directory
[INFO] Updating databse server on configuration file...
sed: can't read /opt/otrs/Kernel/Config.pm: No such file or directory
[INFO] Updating SMTP server on configuration file...
grep: /opt/otrs/Kernel/Config.pm: No such file or directory
[INFO] Adding configuration option SendmailModule with value: Kernel::System::Email::SMTP
sed: can't read /opt/otrs/Kernel/Config.pm: No such file or directory
grep: /opt/otrs/Kernel/Config.pm: No such file or directory
[INFO] Adding configuration option SendmailModule::Host with value: postfix
sed: can't read /opt/otrs/Kernel/Config.pm: No such file or directory
grep: /opt/otrs/Kernel/Config.pm: No such file or directory
[INFO] Adding configuration option SendmailModule::Port with value: 25
sed: can't read /opt/otrs/Kernel/Config.pm: No such file or directory
ERROR 1049 (42000) at line 1: Unknown database 'otrs'
[INFO] Creating OTRS database...
sed: can't read /opt/otrs/Kernel/Config.pm: No such file or directory
tar (child): /var/otrs/backups/"2018-11-08_09-34": Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
[ERROR] Couldn't uncompress main backup file !!
My compose :
version: '3'
services:
otrs:
image: juanluisbaptiste/otrs:5.0.27
build: otrs
ports:
- '80:80'
depends_on:
- mariadb
env_file: otrs-setup.env
volumes:
- ./volumes/config:/opt/otrs/Kernel
- ./volumes/skins:/opt/otrs/var/httpd/htdocs/skins/
- ./volumes/backup:/var/otrs/backups
- /etc/localtime:/etc/localtime:ro
mariadb:
image: juanluisbaptiste/otrs-mariadb:latest
build: mariadb
expose:
- "3306"
env_file: otrs-setup.env
volumes:
- ./volumes/mysql:/var/lib/mysql
- /etc/localtime:/etc/localtime:ro
First: I'm a docker newbie...
What I've done: Stopped all containers (3), pulled new images with docker-compose (found newer images juanluisbaptiste/otrs and juanluisbaptiste/otrs-mariadb), removed the corresponding containers, restarted all with docker-compose.
What happened: Startup looks ok, but http://$OTRS_HOSTNAME
says "can't connect to mysql on 127.0.0.1". Due to panicking I can't remember my next steps exactly, but I've tried different things, the last one gives a 500/403 right away when going to http://$OTRS_HOSTNAME
, something I found in /var/log/httpd/error.log
:
[Tue Mar 14 11:53:20 2017] [error] [client 192.168.1.7] Directory index forbidden by Options directive: /var/www/html/
[Tue Mar 14 11:53:20 2017] -e: DBI connect('database=otrs;host=127.0.0.1;','otrs',...) failed: Can't connect to MySQL server on '127.0.0.1' (111) at /usr/sbin/../../Kernel/System/DB.pm line 202
ERROR: OTRS-CGI-98 Perl: 5.10.1 OS: linux Time: Tue Mar 14 11:53:20 2017
Message: Can't connect to MySQL server on '127.0.0.1' (111)
RemoteAddress: 192.168.1.7
RequestURI: /
Traceback (67):
Module: Kernel::System::Web::InterfaceAgent::Run Line: 164
Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler Line: 40
Module: (eval) (v1.99) Line: 204
Module: ModPerl::RegistryCooker::run (v1.99) Line: 204
Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 170
Module: ModPerl::Registry::handler (v1.99) Line: 31
[Tue Mar 14 11:53:20 2017] -e: DBI connect('database=otrs;host=127.0.0.1;','otrs',...) failed: Can't connect to MySQL server on '127.0.0.1' (111) at /usr/sbin/../../Kernel/System/DB.pm line 202
ERROR: OTRS-CGI-98 Perl: 5.10.1 OS: linux Time: Tue Mar 14 11:53:20 2017
Message: Can't connect to MySQL server on '127.0.0.1' (111)
RemoteAddress: 192.168.1.7
RequestURI: /
Traceback (67):
Module: Kernel::System::DB::Prepare Line: 666
Module: Kernel::System::Package::RepositoryList Line: 170
Module: Kernel::System::OTRSBusiness::_GetOTRSBusinessPackageFromRepository Line: 909
Module: Kernel::System::OTRSBusiness::OTRSBusinessIsInstalled Line: 113
Module: Kernel::Output::HTML::Layout::Error Line: 1030
Module: Kernel::Output::HTML::Layout::FatalError Line: 942
Module: Kernel::System::Web::InterfaceAgent::Run Line: 169
Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler Line: 40
Module: (eval) (v1.99) Line: 204
Module: ModPerl::RegistryCooker::run (v1.99) Line: 204
Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 170
Module: ModPerl::Registry::handler (v1.99) Line: 31
[Tue Mar 14 11:53:21 2017] [error] Can't call method "fetchrow_array" on an undefined value at /usr/sbin/../../Kernel/System/DB.pm line 746.\n
What I've done next: Started with an empty ./volumes/config
directory, keeping the stuff in ./volumes/mysql
- now everything is working again, but I've lost several (all) things I've changed via Admin -> SysConfig previously, I think.
Some documentation regarding updates would be nice!
After run sudo docker-compose -f docker-compose-prod.yml up
I got an error as title says.
any idea about this?
docker-otrs git:(master) โ sudo docker-compose -f docker-compose-prod.yml up
Starting dockerotrs_data_1
Starting dockerotrs_postfix_1
Starting dockerotrs_data-otrs_1
Starting dockerotrs_mariadb_1
Starting dockerotrs_otrs_1
Attaching to dockerotrs_data_1, dockerotrs_postfix_1, dockerotrs_data-otrs_1, dockerotrs_mariadb_1, dockerotrs_otrs_1
dockerotrs_data_1 exited with code 0
mariadb_1 | Running mysql_install_db ...
otrs_1 | [INFO] ERROR
mariadb_1 | mkdir: cannot create directory '/var/lib/mysql/mysql': Permission denied
otrs_1 | [WARNING] DB server still isn't up, sleeping a little bit ...
mariadb_1 | Fatal error Can't create database directory '/var/lib/mysql/mysql'
mariadb_1 |
mariadb_1 | The latest information about mysql_install_db is available at
mariadb_1 | https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
I am trying to run the image, went through docs, the only thing I left out if SMTP because even with proper configs it given me exit code 1
, but I think It does not play a role in my problem...
OTRS starts correctly and I see it processing over time in the log when run locally with:
sudo docker-compose -f docker-compose-prod.yml up
my problem is that OTRS is not accessible on http://localhost:80
I made sure nothing is using that port.... Even when trying to remap ports in docker-compose-prod
file it is not accessible...
I was also looking at docker ps
what is the port and it is as desired, but when trying to load nothing appears there....
any ideas where this may originate ?
NOTE: for me is good enough it would be accessible like this on localhost, I only want to use it for local testing of library using its JSON API, so no need for -d
detached run or some such...
Thanks ๐
Hi,
I made a backup of my OTRS install. It put it in the volume I set up as expected.
However, when trying to restore it, I run into the following error:
otrs_1 | [INFO] ERROR
otrs_1 | [WARNING] DB server still isn't up, sleeping a little bit ...
otrs_1 | [INFO] ERROR
otrs_1 | [WARNING] DB server still isn't up, sleeping a little bit ...
otrs_1 | [INFO] ERROR
otrs_1 | [WARNING] DB server still isn't up, sleeping a little bit ...
otrs_1 | [INFO] ERROR
otrs_1 | [WARNING] DB server still isn't up, sleeping a little bit ...
otrs_1 | [INFO] COUNT(*)
otrs_1 | [INFO] Server is up !
otrs_1 | [INFO] Restoring OTRS backup: 2017-05-16_12-55 for host
otrs_1 | ls: cannot access /opt/otrs/Kernel/: No such file or directory
otrs_1 | [INFO] Found empty /opt/otrs/Kernel/, copying default configuration to it...
otrs_1 | [INFO] Done.
otrs_1 | ERROR 1049 (42000) at line 1: Unknown database 'otrs'
otrs_1 | [INFO] Creating OTRS database...
otrs_1 | ./functions.sh: line 86: update_config_password: command not found
otrs_1 | Restore /var/otrs/backups/2017-05-16_12-55/Config.tar.gz ...
otrs_1 | [Tue May 16 13:19:22 2017] restore.pl: DBI connect('database=otrs;host=127.0.0.1;','otrs',...) failed: Can't connect to MySQL server on '127.0.0.1' (111) at /opt/otrs/Kernel/System/DB.pm line 202
otrs_1 | ERROR: OTRS-restore.pl-10 Perl: 5.10.1 OS: linux Time: Tue May 16 13:19:22 2017
otrs_1 |
otrs_1 | Message: Can't connect to MySQL server on '127.0.0.1' (111)
otrs_1 |
otrs_1 | Traceback (39):
otrs_1 | Module: Kernel::System::DB::Prepare Line: 666
otrs_1 | Module: /opt/otrs/scripts/restore.pl Line: 121
otrs_1 |
otrs_1 | Can't call method "fetchrow_array" on an undefined value at /opt/otrs/Kernel/System/DB.pm line 746.
otrs_1 | [ERROR] Couldn't load OTRS backup !!
otrsclientruby_otrs_1 exited with code 1
Below is my docker-compose.yml
file:
version: '2'
services:
otrs:
image: juanluisbaptiste/otrs:latest
ports:
- 80
depends_on:
- mariadb
environment:
- MYSQL_ROOT_PASSWORD=root
- OTRS_ROOT_PASSWORD=root
- OTRS_DB_PASSWORD=root
- OTRS_INSTALL=restore
- OTRS_BACKUP_DATE=2017-05-16_12-55
volumes:
- ./docker/otrs_backups:/var/otrs/backups
mariadb:
image: juanluisbaptiste/otrs-mariadb:latest
expose:
- 3306
environment:
MYSQL_ROOT_PASSWORD: root
Any ideas on the reason why it happens?
Thanks for your help!
would it be possible to provide an example otrs-setup.env file, to ease use of the docker compose .yml files ?
Hello,
I insert Docker on a Synology DS918 +. Your packages from MariaDB and Postfix each run in a separate container. I will start your OTRS package with the following environment variables:
OTRS_HOSTNAME helpdesk.test.de
OTRS_DB_NAME otrs
OTRS_DB_USER otrs
OTRS_DB_PASSWORD qwer1234
OTRS_ROOT_PASSWORD qwer1234
MYSQL_ROOT_PASSWORD qwer1234
OTRS_LANGUAGE de
OTRS_TICKET_COUNTER 1
OTRS_NUMBER_GENERATOR AutoIncrement
OTRS_DB_HOST 192.168.178.75
OTRS_DB_PORT 3308
After starting the OTRS package, I get the following Synology-Docker log:
[INFO] Starting a clean OTRS 6.0.14-01 Free installation ready to be configured !! stdout
17:41:06 stdout
17:41:06 ls: cannot access /opt/otrs/Kernel/: No such file or directory stdout
17:41:06 [INFO] Found empty /opt/otrs/Kernel/, copying default configuration to it... stdout
17:41:27 [INFO] Done. stdout
17:41:27 [INFO] Copying default skins... stdout
17:41:30 [INFO] Done. stdout
17:41:30 [INFO] Updating configuration option DatabaseUser with value: otrs stdout
17:41:30 [INFO] Updating configuration option DatabasePw with value: qwer1234 stdout
17:41:30 [INFO] Updating configuration option DatabaseHost with value: 192.168.178.75 stdout
17:41:30 [INFO] Adding configuration option DatabasePort with value: 3308 stdout
17:41:30 [INFO] Updating configuration option Database with value: otrs stdout
17:41:30 [INFO] Adding configuration option DefaultLanguage with value: de stdout
17:41:30 [INFO] Adding configuration option FQDN with value: helpdesk.test.de stdout
17:41:30 [INFO] Adding configuration option SendmailModule with value: Kernel::System::Email::SMTP stdout
17:41:30 [INFO] Adding configuration option SendmailModule::Host with value: postfix stdout
17:41:30 [INFO] Adding configuration option SendmailModule::Port with value: 25 stdout
17:41:30 [INFO] Adding configuration option SecureMode with value: 1 stdout
17:41:30 ERROR 1049 (42000) at line 1: Unknown database 'otrs' stdout
17:41:30 [INFO] Creating OTRS database... stdout
17:41:30 [INFO] Loading default db schemas... stdout
17:41:57 [INFO] Loading initial db inserts... stdout
17:42:25 [INFO] Loading initial schema constraints... stdout
17:44:45 [INFO] Setting password for default admin account root@localhost to: qwer1234 stdout
17:44:47 Error: The terminal encoding should be set to 'utf-8', but is 'ansi_x3.4-1968'. Some characters might not be displayed correctly. stdout
17:44:47 [Fri Dec 14 17:44:47 2018] otrs.Console.pl: DBI connect('database=otrs;host=192.168.178.75;','otrs',...) failed: Can't connect to MySQL server on '192.168.178.75' (111) at /opt/otrs/Kernel/System/DB.pm line 204. stdout
17:44:47 ERROR: OTRS-otrs.Console.pl-Admin::User::SetPassword-10 Perl: 5.16.3 OS: linux Time: Fri Dec 14 17:44:47 2018 stdout
17:44:47 stdout
17:44:47 Message: Can't connect to MySQL server on '192.168.178.75' (111) stdout
17:44:47 stdout
17:44:47 Traceback (51): stdout
17:44:47 Module: Kernel::System::DB::Prepare Line: 682 stdout
17:44:47 Module: Kernel::System::Valid::ValidList Line: 74 stdout
17:44:47 Module: Kernel::System::Valid::ValidLookup Line: 120 stdout
17:44:47 Module: Kernel::System::Valid::ValidIDsGet Line: 160 stdout
17:44:47 Module: Kernel::System::User::UserSearch Line: 729 stdout
17:44:47 Module: Kernel::System::Console::Command::Admin::User::SetPassword::Run Line: 47 stdout
17:44:47 Module: (eval) Line: 460 stdout
17:44:47 Module: Kernel::System::Console::BaseCommand::Execute Line: 454 stdout
17:44:47 Module: Kernel::System::Console::InterfaceConsole::Run Line: 80 stdout
17:44:47 Module: /opt/otrs/bin/otrs.Console.pl Line: 36 stdout
17:44:47 stdout
17:44:47 ERROR: OTRS-otrs.Console.pl-Admin::User::SetPassword-10 Perl: 5.16.3 OS: linux Time: Fri Dec 14 17:44:47 2018 stdout
17:44:47 stdout
17:44:47 Message: No Valid for valid found! stdout
17:44:47 stdout
17:44:47 Traceback (51): stdout
17:44:47 Module: Kernel::System::Valid::ValidLookup Line: 139 stdout
17:44:47 Module: Kernel::System::Valid::ValidIDsGet Line: 160 stdout
17:44:47 Module: Kernel::System::User::UserSearch Line: 729
This means that OTRS can connect to the database for the installation. No more after installation. How can I fix this. Can it be that the database root is root@localhost and therefore does not get a share, because the database does not run in the same container?
Can I ignore the error message regarding utf-8?
I would be very grateful for your help.
Christmas greetings
Andreas
Hello!
I'm trying to run a stack from docker-compose.yml with default .env and I can't connect with MySQL:
otrs.Daemon.pl: DBI connect('database=otrs;host=127.0.0.1;','otrs',...) failed: Can't connect to MySQL server on '127.0.0.1' (111) at /opt/otrs/Kernel/System/DB.pm line 204.
Inside container with OTRS deamon:
Can't connect:
mysql -u root -p -h localhost
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Can connect:
[root@cd2480e8d50c Kernel]# mysql -u root -p -h mariadb
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
....
DB otrs doesn't exist:
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)
I suppose data in Config.pm are too wrong - Should be data with our variables set in .env file :
[root@cd2480e8d50c Kernel]# pwd
/opt/otrs/Kernel
[root@cd2480e8d50c Kernel]# cat Config.pm | grep -A 14 "The database host"
# The database host
$Self->{DatabaseHost} = '127.0.0.1';
# The database name
$Self->{Database} = 'otrs';
# The database user
$Self->{DatabaseUser} = 'otrs';
# The password of database user. You also can use bin/otrs.Console.pl Maint::Database::PasswordCrypt
# for crypted passwords
$Self->{DatabasePw} = 'some-pass';
Please check it.
Hey Dude,
hope you can help me out, maybe iยดm just to stupid .
When iยดm starting my Database OTRS is saying database server is not avaible
Output is:
sh-4.2$ sudo docker-compose -f docker-compose.yml up
Creating dockerotrs_mariadb_1
Creating dockerotrs_otrs_1
Attaching to dockerotrs_mariadb_1, dockerotrs_otrs_1
mariadb_1 | 180319 13:57:07 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
mariadb_1 | 180319 13:57:07 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
otrs_1 | [INFO] Database server is not available. Waiting 2 seconds...
otrs_1 | [INFO] Database server is not available. Waiting 2 seconds...
I Will attach you my docker-compose.yml file, hope you can help me
docker-compose.txt
Permissions on the Volumes are set
Best Regards
Masterheese
I had some weird startup behavior. The docker image "default" Config.pm defined $Self->{'DatabaseHost'} = 'mariadb';
but i get an error in /var/log/httpd/error_log:
-e: DBI connect('database=otrs;host=127.0.0.1;','otrs',...) failed: Can't connect to MySQL server on '127.0.0.1' (111) at /usr/sbin/../../Kernel/System/DB.pm line 202
So the source of my problems (the system is calling 127.0.0.1
instead of mariadb
) was the default OTRs configuration folder which was moved to /Kernel.
So i deleted the /Kernel copy and all system are up again. Somehow this folder don't get removed every time? I looked into the corresponding function check_host_mount_dir but i don't see how this works in the context.
sudo docker-compose build
Couldn't find env file: /home/core/credentials-smtp.env
Running otrs container on ec2 instance remotely results in the following error. Though ssh into ec2 instance and then running the container works fine.
sudo docker-compose -f docker-compose-prod.yml up
Starting sgcotrs_postfix_1
Starting sgcotrs_data_1
Starting sgcotrs_data-otrs_1
Starting sgcotrs_mariadb_1
Starting sgcotrs_otrs_1
Attaching to sgcotrs_data-otrs_1, sgcotrs_data_1, sgcotrs_postfix_1, sgcotrs_mariadb_1, sgcotrs_otrs_1
postfix_1 | postmap: fatal: bad string length 0 < 1: myhostname =
postfix_1 | /usr/lib/python2.7/site-packages/supervisor/options.py:295: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
postfix_1 | 'Supervisord is running as root and it is searching '
mariadb_1 | 161224 08:00:57 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
otrs_1 | [INFO] Enter
mariadb_1 | 161224 08:00:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
postfix_1 | 2016-12-24 08:00:53,561 CRIT Supervisor running as root (no user in config file)
otrs_1 | [INFO] Server is up !
postfix_1 | 2016-12-24 08:00:53,561 WARN Included extra file "/etc/supervisord.d/postfix.ini" during parsing
postfix_1 | Unlinking stale socket /var/tmp/supervisor.sock
otrs_1 | [INFO] Starting OTRS 5.0.15-01 installer !!
mariadb_1 | 161224 08:01:01 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
otrs_1 | [INFO] Starting supervisord...
postfix_1 | 2016-12-24 08:00:53,898 INFO RPC interface 'supervisor' initialized
otrs_1 | [INFO] Restarting OTRS daemon...
otrs_1 | 2016-12-24 08:01:01,846 CRIT Supervisor running as root (no user in config file)
postfix_1 | 2016-12-24 08:00:53,898 CRIT Server 'unix_http_server' running without any HTTP authentication checking
otrs_1 | Unlinking stale socket /var/tmp/supervisor.sock
postfix_1 | 2016-12-24 08:00:53,899 INFO supervisord started with pid 11
otrs_1 | 2016-12-24 08:01:02,338 INFO /var/tmp/supervisor.sock:Medusa (V1.1.1.1) started at Sat Dec 24 08:01:02 2016
otrs_1 | Hostname:
postfix_1 | 2016-12-24 08:00:54,903 INFO spawned: 'master' with pid 14
otrs_1 | Port:/var/tmp/supervisor.sock
postfix_1 | 2016-12-24 08:00:55,906 INFO success: master entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
postfix_1 | 2016-12-24 08:00:55,916 INFO exited: master (exit status 1; not expected)
otrs_1 | 2016-12-24 08:01:02,382 CRIT Running without any HTTP authentication checking
otrs_1 | 2016-12-24 08:01:02,383 INFO supervisord started with pid 10
otrs_1 | 2016-12-24 08:01:02,385 INFO spawned: 'httpd' with pid 13
otrs_1 | 2016-12-24 08:01:02,389 INFO spawned: 'crond' with pid 14
otrs_1 | 2016-12-24 08:01:02,392 INFO spawned: 'rsyslog' with pid 15
otrs_1 | 2016-12-24 08:01:02,412 INFO exited: rsyslog (exit status 1; not expected)
otrs_1 | 2016-12-24 08:01:02,413 INFO received SIGCLD indicating a child quit
sgcotrs_data-otrs_1 exited with code 0
sgcotrs_data_1 exited with code 0
otrs_1 | 2016-12-24 08:01:03,430 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
otrs_1 | 2016-12-24 08:01:03,430 INFO success: crond entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
otrs_1 | 2016-12-24 08:01:03,433 INFO spawned: 'rsyslog' with pid 16
otrs_1 | 2016-12-24 08:01:03,443 INFO exited: rsyslog (exit status 1; not expected)
otrs_1 | 2016-12-24 08:01:03,444 INFO received SIGCLD indicating a child quit
otrs_1 | otrs.Daemon.pl - the OTRS daemon
otrs_1 | Copyright (C) 2001-2016 OTRS AG, http://otrs.com/
otrs_1 |
otrs_1 | Daemon stopped
sgcotrs_mariadb_1 exited with code 0
otrs_1 | 2016-12-24 08:01:05,450 INFO spawned: 'rsyslog' with pid 26
otrs_1 | 2016-12-24 08:01:05,460 INFO exited: rsyslog (exit status 1; not expected)
otrs_1 | 2016-12-24 08:01:05,460 INFO received SIGCLD indicating a child quit
otrs_1 | otrs.Daemon.pl - the OTRS daemon
otrs_1 | Copyright (C) 2001-2016 OTRS AG, http://otrs.com/
otrs_1 |
otrs_1 | ERROR: OTRS-otrs.Daemon.pl-98 Perl: 5.10.1 OS: linux Time: Sat Dec 24 08:01:07 2016
otrs_1 |
otrs_1 | Message: Don't have write permissions in directory '/opt/otrs/var/run/':
otrs_1 |
otrs_1 | Traceback (29):
otrs_1 | Module: main::_PIDLock Line: 483
otrs_1 | Module: main::Start Line: 191
otrs_1 | Module: /opt/otrs/bin/otrs.Daemon.pl Line: 138
The postfix container exepcts SMTP_PASSWORD and SMTP_USERNAME as parameters. But our smarthost doesn't use authentication.
Can we make this optionally?
I have trouble creating a docker container from a non-docker backup. I read the docs this way, that I need to create the backup on the old installation with the script from the docker image. I copied it over together with the functions and let it run. it throw some error about not finding stop_all_services but created a backup file:
otrs-2018-09-06_12_42-full.tar.gz
I copied it to the docker server and mounted the directory with the file in it:
docker-compose.yml:
- '/srv/docker/data/otrs/backup:/var/otrs/backups'
ls -lisa /srv/docker/data/otrs/backup:
11010050 4 drwxr-xr-x 3 500 48 4096 Sep 6 15:07 .
11010049 4 drwxr-xr-x 5 root root 4096 Sep 6 11:24 ..
11012442 4 drwxrwx--- 2 root root 4096 Sep 6 12:49 2018-09-06_12-42
11012446 2356324 -rwxr-xr-x 1 root root 2412871680 Sep 6 13:36 otrs-2018-09-06_12_42-full.tar.gz
as you can see, I also tried to extract it to no avail. also, when extracting, 12_42 turns into 12-42.
anyway, this is what the otrs-setup.env looks like:
OTRS_INSTALL=restore
OTRS_BACKUP_DATE="2018-09-06_12-42"
OTRS_DROP_DATABASE=yes
and this is the error message:
Restoring OTRS backup: "2018-09-06_12-42" for host otrs-
[INFO] Found existing configuration directory, Ok.
[INFO] Updating configuration option DatabaseUser with value: otrs
[INFO] Updating configuration option DatabasePw with value: changeme
[INFO] Updating configuration option DatabaseHost with value: mariadb
[INFO] Updating configuration option DatabasePort with value: 3306
[ERROR] Backup file does not exist !!
I am quite sure it is something small, but I just can't put my finger on it..
functions.sh hardcodes the user as "root" and doesn't allow you to define an already created database.
Any plans of building docker containers with OTRS version 5?
Reporting a bug
First of all, this is not a problem reporting forum, only report if you are pretty sure what you are experiencing is a bug with this image and docker, not a configuration issue of OTRS, for that you can go to the OTRS community forums.
If the container starts up, you can login and don't have any issues with the stuff you configured on the .env file, then the problem probably is in OTRS.
Probably, but the locale of the user root
/otrs
could be changed during image-creation.
Also be sure you are using the latest image by doing docker pull juanluisbaptiste/otrs.
Please post the image version you are using (latest, 6.0.x, latest-5x, etc).
I'm on 6.0.17
[otrs@16499fa9a4af ~]$ /opt/otrs/bin/otrs.Console.pl Admin::User::SetPassword root@localhost
Error: The terminal encoding should be set to 'utf-8', but is 'ansi_x3.4-1968'. Some characters might not be displayed correctly.
[otrs@16499fa9a4af ~]$ locale charmap
ANSI_X3.4-1968
As the otrs - user is operating with wrong locale - settings the initial setup of the root@localhost-password can fail. Furthermore other operations could result in unexpected behaviour.
Expected behavior
User root/otrs uses utf-8.
Hello, I have a problem when deploying the image of OTRS 6, the problem is that when I use the variable OTRS_DB_NAME
at some point in the execution, its value is lost or maybe it is not being respected. For example if I have OTRS_DB_NAME=otrs3
the container executes all the steps in mysql container and creates the database otrs3
but when OTRS tries to start it tries to connect to the DB otrs
and not to otrs3
.
I took as a base your Dockerfile file to create my own image and that is what I use for the Stack.
version: "3.2"
services:
uat-otrs2:
image: my-image # base your dockerfile
environment:
# Default first run
- OTRS_INSTALL=no
- OTRS_DROP_DATABASE=yes
# DB configs
- OTRS_DB_HOST=uat-mysql2
- OTRS_DB_PORT=3306
- OTRS_DB_USER=prueba
- OTRS_DB_PASSWORD=prueba
- OTRS_DB_NAME=otrs3
# MySQL root pass for create de initial DB
- MYSQL_ROOT_PASSWORD=*****
# OTRS configs
- OTRS_ROOT_PASSWORD=OTRSadmin
- OTRS_LANGUAGE=es
- OTRS_TIMEZONE=UTC
- OTRS_NUMBER_GENERATOR=DateChecksum
# Debug mode
- OTRS_DEBUG=yes
...
other stuff
| ERROR 1049 (42000) at line 1: Unknown database 'otrs3'
| + '[' 1 -gt 0 ']'
| + create_db
| + print_info 'Creating OTRS database...'
| + echo -e '\e[46m[INFO]\e[0m Creating OTRS database...'
| + mysql -uroot -h uat-mysql2 -P 3306 -p***** -e 'CREATE DATABASE IF NOT EXISTS otrs3;'
| [INFO] Creating OTRS database...
| + '[' 0 -gt 0 ']'
| + mysql -uroot -h uat-mysql2 -P 3306 -p**** -e ' GRANT ALL ON otrs3.* to '\''prueba'\''@'\''%'\'' identified by '\''prueba'\'''
| + '[' 0 -gt 0 ']'
| + '[' no == no ']'
| + print_info 'Loading default db schemas...'
| + echo -e '\e[46m[INFO]\e[0m Loading default db schemas...'
| [INFO] Loading default db schemas...
| + mysql -uroot -h uat-mysql2 -P 3306 -p***** otrs3
| [INFO] Loading initial db inserts...
| + '[' 0 -gt 0 ']'
| + print_info 'Loading initial db inserts...'
| + echo -e '\e[46m[INFO]\e[0m Loading initial db inserts...'
| + mysql -uroot -h uat-mysql2 -P 3306 -p***** otrs3
| [INFO] Loading initial schema constraints...
| + '[' 0 -gt 0 ']'
| + print_info 'Loading initial schema constraints...'
| + echo -e '\e[46m[INFO]\e[0m Loading initial schema constraints...'
| + mysql -uroot -h uat-mysql2 -P 3306 -p***** otrs3
| + '[' 0 -gt 0 ']'
| + print_info 'Setting password for default admin account \e[38;5;31mroot@localhost\e[0m to: \e[31mOTRSadmin\e[0m'
| [INFO] Setting password for default admin account root@localhost to: OTRSadmin
| + echo -e '\e[46m[INFO]\e[0m Setting password for default admin account \e[38;5;31mroot@localhost\e[0m to: \e[31mOTRSadmin\e[0m'
| + su -c '/opt/otrs/bin/otrs.Console.pl Admin::User::SetPassword root@localhost OTRSadmin' -s /bin/bash otrs
| [Mon Nov 5 22:41:47 2018] otrs.Console.pl: DBI connect('database=otrs;host=uat-mysql2;','prueba',...) failed: Access denied for user 'prueba'@'%' to database 'otrs' at /opt/otrs/Kernel/System/DB.pm line 204.
| ERROR: OTRS-otrs.Console.pl-Admin::User::SetPassword-10 Perl: 5.16.3 OS: linux Time: Mon Nov 5 22:41:47 2018
|
| Message: Access denied for user 'prueba'@'%' to database 'otrs'
From what I can notice instead of using the otrs3
database some part of the script tries to use otrs
.
With the defined user prueba and password prueba
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| otrs3 |
+--------------------+
After commenting out the following lines in docker-compose.yaml
since they are failing, the container won't start.
Commenting out from docker-compose.yaml
:
env_file: ../docker-otrs/otrs-setup.env
And:
env_file: ../../credentials-smtp.env
Error occurs when trying to build:
$ docker-compose up
[...]
WARNING: Image for service otrs was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating dockerotrs_data-otrs_1
Creating dockerotrs_postfix_1
Creating dockerotrs_data_1
Creating dockerotrs_mariadb_1
Creating dockerotrs_otrs_1
ERROR: for otrs Cannot start service otrs: Cannot link to a non running container: /dockerotrs_mariadb_1 AS /dockerotrs_otrs_1/dockerotrs_mariadb_1
ERROR: Encountered errors while bringing up the project.
[INFO] Updating SMTP server on configuration file...
Enter password: ERROR 2005 (HY000): Unknown MySQL server host 'mariadb' (1)
[INFO] Creating OTRS database...
Enter password: ERROR 2005 (HY000): Unknown MySQL server host 'mariadb' (1)
[ERROR] Couldn't create OTRS database !!
This is its output.
Do you know why it is not working? I just use your dockerfile for pure fresh installation
Hi,
I cloned the containers, changed the yml a little bit to remove unnecessary things like volumes (I just wanted to test if I can run these) and when trying to start the compose it gives me some errors.
yml:
otrs:
image: juanluisbaptiste/otrs:latest
ports:
- "80:80"
links:
- mariadb:mariadb
- postfix:postfix
environment:
OTRS_INSTALL: "yes"
OTRS_POSTMASTER_FETCH_TIME: 0
OTRS_HOSTNAME: xyz.domain
OTRS_ADMIN_EMAIL: [email protected]
OTRS_ROOT_PASSWORD: otrsotrs
MYSQL_ROOT_PASSWORD: otrsotrs
OTRS_DB_PASSWORD: otrsotrs
mariadb:
image: juanluisbaptiste/otrs-mariadb:latest
expose:
- "3306"
environment:
MYSQL_ROOT_PASSWORD: otrsotrs
postfix:
image: juanluisbaptiste/postfix:latest
expose:
- "25"
environment:
SMTP_SERVER: smtp.bar.com
SMTP_USERNAME: [email protected]
SMTP_PASSWORD: XXXXXXXX
SERVER_HOSTNAME: helpdesk.mycompany.com
Error I get:
mariadb_1 | 170217 14:29:39 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
postfix_1 | postmap: warning: /etc/postfix/sasl_passwd.db: duplicate entry: "[smtp.bar.com]:587"
mariadb_1 | 170217 14:29:39 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
postfix_1 | /usr/lib/python2.7/site-packages/supervisor/options.py:296: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
postfix_1 | 'Supervisord is running as root and it is searching '
postfix_1 | 2017-02-17 14:28:08,546 CRIT Supervisor running as root (no user in config file)
postfix_1 | 2017-02-17 14:28:08,546 WARN Included extra file "/etc/supervisord.d/postfix.ini" during parsing
postfix_1 | Unlinking stale socket /var/run/supervisor/supervisor.sock
postfix_1 | 2017-02-17 14:28:08,860 INFO RPC interface 'supervisor' initialized
postfix_1 | 2017-02-17 14:28:08,860 CRIT Server 'unix_http_server' running without any HTTP authentication checking
postfix_1 | 2017-02-17 14:28:08,860 INFO supervisord started with pid 12
postfix_1 | 2017-02-17 14:28:09,862 INFO spawned: 'master' with pid 15
postfix_1 | 2017-02-17 14:28:10,010 INFO success: master entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
postfix_1 | 2017-02-17 14:28:10,010 INFO exited: master (exit status 0; expected)
otrs_1 | [INFO] ERROR
otrs_1 | [WARNING] DB server still isn't up, sleeping a little bit ...
otrs_1 | [INFO] COUNT(*)
otrs_1 | [INFO] Server is up !
otrs_1 | [INFO] Starting OTRS 5.0.16-01 installer !!
otrs_1 | [INFO] Starting supervisord...
otrs_1 | [INFO] Restarting OTRS daemon...
otrs_1 | 2017-02-17 14:29:41,420 CRIT Supervisor running as root (no user in config file)
otrs_1 | 2017-02-17 14:29:41,424 INFO /var/tmp/supervisor.sock:Medusa (V1.1.1.1) started at Fri Feb 17 14:29:41 2017
otrs_1 | Hostname: <unix domain socket>
otrs_1 | Port:/var/tmp/supervisor.sock
otrs_1 | 2017-02-17 14:29:41,443 CRIT Running without any HTTP authentication checking
otrs_1 | 2017-02-17 14:29:41,443 INFO supervisord started with pid 15
otrs_1 | 2017-02-17 14:29:41,444 INFO spawned: 'httpd' with pid 18
otrs_1 | 2017-02-17 14:29:41,444 INFO spawned: 'crond' with pid 19
otrs_1 | 2017-02-17 14:29:41,445 INFO spawned: 'rsyslog' with pid 20
otrs_1 | 2017-02-17 14:29:41,484 INFO exited: httpd (exit status 1; not expected)
otrs_1 | 2017-02-17 14:29:41,484 INFO received SIGCLD indicating a child quit
otrs_1 | Can't locate Encode/Locale.pm in @INC (@INC contains: /opt/otrs/Custom /opt/otrs/Kernel/cpan-lib /opt/otrs /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Kernel/System/Encode.pm line 15.
otrs_1 | BEGIN failed--compilation aborted at Kernel/System/Encode.pm line 15.
otrs_1 | Compilation failed in require at Kernel/System/ObjectManager.pm line 29.
otrs_1 | BEGIN failed--compilation aborted at Kernel/System/ObjectManager.pm line 29.
otrs_1 | Compilation failed in require at /opt/otrs/bin/otrs.Daemon.pl line 35.
otrs_1 | BEGIN failed--compilation aborted at /opt/otrs/bin/otrs.Daemon.pl line 35.
otrs_1 | 2017-02-17 14:29:42,485 INFO success: crond entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
otrs_1 | 2017-02-17 14:29:42,485 INFO success: rsyslog entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
otrs_1 | 2017-02-17 14:29:42,486 INFO spawned: 'httpd' with pid 25
otrs_1 | 2017-02-17 14:29:42,505 INFO exited: httpd (exit status 1; not expected)
otrs_1 | 2017-02-17 14:29:42,505 INFO received SIGCLD indicating a child quit
otrs_1 | Can't locate Encode/Locale.pm in @INC (@INC contains: /opt/otrs/Custom /opt/otrs/Kernel/cpan-lib /opt/otrs /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Kernel/System/Encode.pm line 15.
otrs_1 | BEGIN failed--compilation aborted at Kernel/System/Encode.pm line 15.
otrs_1 | Compilation failed in require at Kernel/System/ObjectManager.pm line 29.
otrs_1 | BEGIN failed--compilation aborted at Kernel/System/ObjectManager.pm line 29.
otrs_1 | Compilation failed in require at /opt/otrs/bin/otrs.Daemon.pl line 35.
otrs_1 | BEGIN failed--compilation aborted at /opt/otrs/bin/otrs.Daemon.pl line 35.
otrs_1 | 2017-02-17 14:29:44,507 INFO spawned: 'httpd' with pid 29
otrs_1 | 2017-02-17 14:29:44,526 INFO exited: httpd (exit status 1; not expected)
otrs_1 | 2017-02-17 14:29:44,526 INFO received SIGCLD indicating a child quit
otrs_1 | 2017-02-17 14:29:47,530 INFO spawned: 'httpd' with pid 30
otrs_1 | 2017-02-17 14:29:48,550 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
otrs_1 | 2017-02-17 14:29:48,550 INFO exited: httpd (exit status 1; not expected)
otrs_1 | 2017-02-17 14:29:48,550 INFO received SIGCLD indicating a child quit
otrs_1 | 2017-02-17 14:29:49,552 INFO spawned: 'httpd' with pid 31
Do you have any suggestion?
File credentials-smtp.env
is missing, so project won't build from a fresh checkout.
$ docker-compose build
ERROR: Couldn't find env file: /home/user/credentials-smtp.env
There seems to be a problem with httpd package
Failed:
httpd.x86_64 0:2.4.6-80.el7.centos
Complete!
ERROR: Service 'otrs' failed to build: The command '/bin/sh -c yum install
We have a custom skin and everytime I restart the OTRS container the permissions on the skins css-cache folder is broken. I assume it is because you are running SetPermissions script in your run.sh. I'd assume OTRS would keep this in mind but for some reason the permission is broken in our skin.
Bad (after cotnainer restart):
[root@0d1edda79228 /]# cd /opt/otrs/var/httpd/htdocs/skins/Agent/ubsimple/
[root@0d1edda79228 ubsimple]# ll
total 16
drwxrwsr-x+ 2 otrs apache 4096 Jun 6 16:13 css
drwxrwsr-x+ 2 otrs apache 4096 Jun 12 10:11 css-cache
drwxrwsr-x+ 2 otrs apache 4096 Apr 26 12:54 img
drwxrwsr-x+ 3 otrs apache 4096 Jun 6 10:15 vendor
Good (after fixing the permissions manually):
[root@0d1edda79228 /]# cd /opt/otrs/var/httpd/htdocs/skins/Agent/ubsimple/
[root@0d1edda79228 ubsimple]# ll
total 16
drwxrwsr-x+ 2 otrs apache 4096 Jun 6 16:13 css
drwxrwsr-x+ 2 apache apache 4096 Jun 12 10:11 css-cache
drwxrwsr-x+ 2 otrs apache 4096 Apr 26 12:54 img
drwxrwsr-x+ 3 otrs apache 4096 Jun 6 10:15 vendor
Good morning!
I really appreciate if some one could help me, I'm getting crazy trying to configure a Gmail account as my main account, but I really don't know if it is posible, I try to configure it by IMAPS(imap.gmail.com & INBOX folder) and it doesn't work.
In addition, I have checked all the security settings in GMail and IMAP is available. And also, ping imap.gmail.com and telnet imap.gmail.com 993 from container was succesufull.
Would anybody please kindly help me to solve the problem?
in DOCS:
OTRS_ROOT_PASSWORD root@localhost user password. Default password is changeme
in CODE:
while [ ! "$(mysqladmin ping -h ${OTRS_DB_HOST} -P ${OTRS_DB_PORT} -u root \
--password="${MYSQL_ROOT_PASSWORD}" --silent --connect_timeout=3)" ]; do
https://github.com/juanluisbaptiste/docker-otrs/blob/master/otrs/functions.sh#L51
root@NAS:# docker inspect juanluisbaptiste-otrs1#
[
{
"Id": "a7c276f1dba5cf61496751bcc3274261450ecbf9b45e407fb93fd9ccc2723540",
"Created": "2018-05-19T06:04:25.058168702Z",
"Path": "/run.sh",
"Args": [],
"State": {
"Status": "exited",
"Running": false,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 0,
"ExitCode": 0,
"Error": "",
"StartedAt": "2018-05-20T10:59:45.714163253Z",
"FinishedAt": "2018-05-20T11:11:10.96189853Z",
"StartedTs": 1526813985,
"FinishedTs": 1526814670
},
"Image": "sha256:2eb9b6232849f3dc95d426e9ce129003e3e66f9a6053ec3e8184929675e28775",
"ResolvConfPath": "/volume1/@docker/containers/a7c276f1dba5cf61496751bcc3274261450ecbf9b45e407fb93fd9ccc2723540/resolv.conf",
"HostnamePath": "/volume1/@docker/containers/a7c276f1dba5cf61496751bcc3274261450ecbf9b45e407fb93fd9ccc2723540/hostname",
"HostsPath": "/volume1/@docker/containers/a7c276f1dba5cf61496751bcc3274261450ecbf9b45e407fb93fd9ccc2723540/hosts",
"LogPath": "/volume1/@docker/containers/a7c276f1dba5cf61496751bcc3274261450ecbf9b45e407fb93fd9ccc2723540/log.db",
"Name": "/juanluisbaptiste-otrs1",
"RestartCount": 0,
"Driver": "btrfs",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "docker-default",
"ExecIDs": null,
"HostConfig": {
"Binds": [],
"ContainerIDFile": "",
"LogConfig": {
"Type": "db",
"Config": {}
},
"NetworkMode": "bridge",
"PortBindings": {
"80/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": ""
}
]
},
"RestartPolicy": {
"Name": "no",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": null,
"CapDrop": null,
"Dns": null,
"DnsOptions": null,
"DnsSearch": null,
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"Env": [
"OTRS_INSTALL=yes",
"OTRS_LANGUAGE=en",
"OTRS_ROOT_PASSWORD=changeme",
"OTRS_DB_PORT=33306",
"OTRS_DB_HOST= 192.168.3.210",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"OTRS_VERSION=6.0.6-01",
"OTRS_ROOT=/opt/otrs/",
"OTRS_BACKUP_DIR=/var/otrs/backups",
"OTRS_CONFIG_DIR=/opt/otrs/Kernel",
"OTRS_CONFIG_MOUNT_DIR=/config/",
"SKINS_PATH=/opt/otrs//var/httpd/htdocs/skins/"
],
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 50,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": null,
"DeviceCgroupRules": null,
"DiskQuota": 0,
"KernelMemory": 0,
"MemoryReservation": 0,
"MemorySwap": -1,
"MemorySwappiness": -1,
"OomKillDisable": false,
"PidsLimit": 0,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0
},
"GraphDriver": {
"Data": null,
"Name": "btrfs"
},
"Mounts": [],
"Config": {
"Hostname": "juanluisbaptiste-otrs1",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"80/tcp": {}
},
"Tty": true,
"OpenStdin": true,
"StdinOnce": false,
"Env": [
"OTRS_INSTALL=yes",
"OTRS_LANGUAGE=en",
"OTRS_ROOT_PASSWORD=changeme",
"OTRS_DB_PORT=33306",
"OTRS_DB_HOST= 192.168.3.210",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"OTRS_VERSION=6.0.6-01",
"OTRS_ROOT=/opt/otrs/",
"OTRS_BACKUP_DIR=/var/otrs/backups",
"OTRS_CONFIG_DIR=/opt/otrs/Kernel",
"OTRS_CONFIG_MOUNT_DIR=/config/",
"SKINS_PATH=/opt/otrs//var/httpd/htdocs/skins/"
],
"Cmd": [
"/run.sh"
],
"ArgsEscaped": true,
"Image": "juanluisbaptiste/otrs:6.0.6",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": null,
"Labels": {
"build-date": "20180302",
"license": "GPLv2",
"name": "CentOS Base Image",
"vendor": "CentOS"
},
"DDSM": false
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "1390a3c4736f295f177f226be7c29e478b0afd7a0e83990a5dce7a3a6b763f77",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {},
"SandboxKey": "/var/run/docker/netns/1390a3c4736f",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "a363cbd561add56c5ae47c0f495941348936235cdd1f7ce6cc9d3951067bc45f",
"EndpointID": "",
"Gateway": "",
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": ""
}
}
}
}
]
root@NAS:
Hi Juan,
First of all thank you for the great work.
When I issue 'docker exec otrs_container /opt/otrs/scripts/otrs_backup.sh' it says no such file is found.
What am I doing wrong?
Thanks.
Hello,
file credentials-smtp.env is missing thus howto for running docker-compose should be somehow changed. Would you be so kind to add some generic credentials-smtp.env or atleast provide info about how this file should be formated?
Thank you
is it able to use external database? (standalone, not docker)
thanks.
as the 5.x branch differs quite profoundly from the 6.x branch in regard to the docker-compose (and I have quite some trouble getting it running) I wonder, is it possible to use the 6.x branch docker-compose.yml replace the image with juanluisbaptiste/otrs:latest-5x and do the restore, than upgrade to 6.x according to the README?
The container started successfully but i get these errors
`ERROR: OTRS-otrs.Daemon.pl - Daemon Kernel::System::Daemon::DaemonModules::SystemConfigurationSyncManager-10 Perl: 5.16.3 OS: linux Time: Thu Aug 30 11:18:24 2018
Message: There was an error executing ConfigurationDeploySync: [Thu Aug 30 11:18:24 2018] otrs.Daemon.pl: DBD::mysql::st execute failed: Table 'otrs.sysconfig_deployment' doesn't exist at /opt/otrs/Kernel/System/DB.pm line 694.
ERROR: OTRS-otrs.Daemon.pl - Daemon Kernel::System::Daemon::DaemonModules::SystemConfigurationSyncManager-10 Perl: 5.16.3 OS: linux Time: Thu Aug 30 11:18:24 2018`
Alongside with some of these
`ERROR: OTRS-otrs.Daemon.pl - Daemon Kernel::System::Daemon::DaemonModules::SystemConfigurationSyncManager-10 Perl: 5.16.3 OS: linux Time: Thu Aug 30 11:18:24 2018
Message: There was an error executing ConfigurationDeploySync: [Thu Aug 30 11:18:24 2018] otrs.Daemon.pl: DBD::mysql::st execute failed: Table 'otrs.sysconfig_deployment' doesn't exist at /opt/otrs/Kernel/System/DB.pm line 694.
ERROR: OTRS-otrs.Daemon.pl - Daemon Kernel::System::Daemon::DaemonModules::SystemConfigurationSyncManager-10 Perl: 5.16.3 OS: linux Time: Thu Aug 30 11:18:24 2018`
The webui opens but with 'root' and my password i set by adding -e 'OTRS_ROOT_PASSWORD'='test'
i can't login. 'changeme' wont work either.
When attempting to shutdown the OTRS container, it takes the timeout time until the container stops because the SIGTERM
signal is not processed by all processes in the container. This causes the docker daemon to perform a forced shutdown after timeout
passed, potentially causing a loss of data and other issues.
Expected: Graceful shoutdown.
How to reproduce: docker-compose stop
Further reading: https://medium.com/@gchudnov/trapping-signals-in-docker-containers-7a57fdda7d86
Using an existing otrs database, the postmaster mailbox fetch does not work. The otrs daemon seems to connect to our IMAP-server with an empty username (imap-login: Disconnected (no auth attempts in 0 secs): user=<>
) therefore the authentication fails.
When we use a fresh otrs installation on a VM with the same existing otrs-database, the IMAP fetch works without any problems. So the problem must be related to the docker image.
Thanks
My Composefile is
version: '2'
services:
otrs:
image: juanluisbaptiste/otrs:latest
ports:
- "80:80"
links:
- mariadb:mariadb
- postfix:postfix
volumes_from:
- data
environment:
MYSQL_ROOT_PASSWORD: root
OTRS_ROOT_PASSWORD: root
OTRS_NUMBER_GENERATOR: Date
OTRS_LANGUAGE: es
OTRS_POSTMASTER_FETCH_TIME: 5
mariadb:
image: juanluisbaptiste/otrs-mariadb:latest
expose:
- "3306"
volumes_from:
- data
environment:
MYSQL_ROOT_PASSWORD: root
postfix:
image: juanluisbaptiste/postfix:latest
expose:
- "587"
environment:
SMTP_SERVER: smtp.server.com
SMTP_USERNAME: [email protected]
SMTP_PASSWORD: password@123
SERVER_HOSTNAME: linuxdocker
# nginx:
# image: juanluisbaptiste/bigbluebutton-proxy
# ports:
# - "80:80"
# - "443:443"
# volumes:
# - /var/run/docker.sock:/tmp/docker.sock
# - "/etc/localtime:/etc/localtime:ro"
data:
image: centos/mariadb:latest
volumes:
#- "./db:/var/lib/mysql"
- /var/lib/mysql"
- "./otrs/backup:/var/otrs/backups"
- "./volumes/config:/opt/otrs/Kernel"
- "/etc/localtime:/etc/localtime:ro"
command: /bin/true
Output is
docker-compose up
Creating otrsrel501_postfix_1
Creating otrsrel501_data_1
Creating otrsrel501_mariadb_1
Creating otrsrel501_otrs_1
Attaching to otrsrel501_postfix_1, otrsrel501_data_1, otrsrel501_mariadb_1, otrsrel501_otrs_1
mariadb_1 | Running mysql_install_db ...
mariadb_1 | Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
otrsrel501_data_1 exited with code 0
otrs_1 | [INFO] ERROR
otrs_1 | [WARNING] DB server still isn't up, sleeping a little bit ...
mariadb_1 | 170131 16:51:02 [Note] /usr/libexec/mysqld (mysqld 5.5.52-MariaDB) starting as process 28 ...
mariadb_1 | OK
mariadb_1 | Filling help tables...
mariadb_1 | 170131 16:51:03 [Note] /usr/libexec/mysqld (mysqld 5.5.52-MariaDB) starting as process 37 ...
postfix_1 | postmap: fatal: bad string length 0 < 1: mydomain =
mariadb_1 | OK
mariadb_1 |
mariadb_1 | To start mysqld at boot time you have to copy
mariadb_1 | support-files/mysql.server to the right place for your system
mariadb_1 |
mariadb_1 | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
mariadb_1 | To do so, start the server, then issue the following commands:
mariadb_1 |
mariadb_1 | '/usr/bin/mysqladmin' -u root password 'new-password'
mariadb_1 | '/usr/bin/mysqladmin' -u root -h b9a40aabad25 password 'new-password'
mariadb_1 |
mariadb_1 | Alternatively you can run:
mariadb_1 | '/usr/bin/mysql_secure_installation'
mariadb_1 |
mariadb_1 | which will also give you the option of removing the test
mariadb_1 | databases and anonymous user created by default. This is
mariadb_1 | strongly recommended for production servers.
mariadb_1 |
mariadb_1 | See the MariaDB Knowledgebase at http://mariadb.com/kb or the
mariadb_1 | MySQL manual for more instructions.
mariadb_1 |
mariadb_1 | You can start the MariaDB daemon with:
mariadb_1 | cd '/usr' ; /usr/bin/mysqld_safe --datadir='/var/lib/mysql'
mariadb_1 |
mariadb_1 | You can test the MariaDB daemon with mysql-test-run.pl
mariadb_1 | cd '/usr/mysql-test' ; perl mysql-test-run.pl
mariadb_1 |
mariadb_1 | Please report any problems at http://mariadb.org/jira
mariadb_1 |
mariadb_1 | The latest information about MariaDB is available at http://mariadb.org/.
mariadb_1 | You can find additional information about the MySQL part at:
mariadb_1 | http://dev.mysql.com
mariadb_1 | Support MariaDB development by buying support/new features from MariaDB
mariadb_1 | Corporation Ab. You can contact us about this at [email protected].
mariadb_1 | Alternatively consider joining our community based development effort:
mariadb_1 | http://mariadb.com/kb/en/contributing-to-the-mariadb-project/
mariadb_1 |
mariadb_1 | Finished mysql_install_db
mariadb_1 | 170131 16:51:03 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
mariadb_1 | 170131 16:51:04 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
otrs_1 | [INFO] ERROR
otrs_1 | [WARNING] DB server still isn't up, sleeping a little bit ...
postfix_1 | /usr/lib/python2.7/site-packages/supervisor/options.py:295: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
postfix_1 | 'Supervisord is running as root and it is searching '
postfix_1 | 2017-01-31 11:21:04,954 CRIT Supervisor running as root (no user in config file)
postfix_1 | 2017-01-31 11:21:04,958 WARN Included extra file "/etc/supervisord.d/postfix.ini" during parsing
postfix_1 | 2017-01-31 11:21:05,119 INFO RPC interface 'supervisor' initialized
postfix_1 | 2017-01-31 11:21:05,135 CRIT Server 'unix_http_server' running without any HTTP authentication checking
postfix_1 | 2017-01-31 11:21:05,136 INFO supervisord started with pid 11
postfix_1 | 2017-01-31 11:21:06,155 INFO spawned: 'master' with pid 14
postfix_1 | 2017-01-31 11:21:07,191 INFO success: master entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
otrs_1 | [INFO] ERROR
otrs_1 | [WARNING] DB server still isn't up, sleeping a little bit ...
postfix_1 | 2017-01-31 11:21:08,542 INFO exited: master (exit status 1; not expected)
otrs_1 | [INFO] ERROR
otrs_1 | [WARNING] DB server still isn't up, sleeping a little bit ...
otrs_1 | [INFO] ERROR
otrs_1 | [WARNING] DB server still isn't up, sleeping a little bit ...
otrs_1 | [INFO] ERROR
otrs_1 | [WARNING] DB server still isn't up, sleeping a little bit ...
otrs_1 | [INFO] ERROR
I am setting the parameter OTRS_DB_PORT = 50033
With debug set I am getting
++ mysqladmin ping -h xxx.xxx.xxx.xxx -P 3306 -u root --password=xxxxxxxxx --silent --connect_timeout=3
Note: I have blanked out the IP address and password
Form the above looks like the OTRS_DB_PORT parameter is not changing the default port number which is remaining as 3306.
What I doing worng?
Thanks, Pete
I've started your container with
docker run -ti \
--name otrs \
--network db \
-p 8080:80 \
-e OTRS_INSTALL=yes \
-e OTRS_DB_HOST=mariadb \
-e OTRS_DB_NAME=otrs \
-e OTRS_DB_PORT=3306 \
-e OTRS_DB_USER=otrs \
-e OTRS_DB_PASSWORD=otrs \
-e OTRS_LANGUAGE=de \
-e MYSQL_ROOT_PASSWORD=password \
juanluisbaptiste/otrs:6.0.11
the mariadb server is available and reachable in the db
network. e.g. I can ping the mariadb server from the running otrs container
docker exec -ti otrs ping -c 2 mariadb
PING mariadb (10.0.1.5) 56(84) bytes of data.
64 bytes from 10.0.1.5 (10.0.1.5): icmp_seq=1 ttl=64 time=0.047 ms
64 bytes from 10.0.1.5 (10.0.1.5): icmp_seq=2 ttl=64 time=0.060 ms
--- mariadb ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 0.047/0.053/0.060/0.009 ms
but connecting otrs failed, because he try to connect to localhost instead of using mariadb
Message: Can't connect to MySQL server on '127.0.0.1' (111)
Hi.
I am using your project source files to build image with some minor tweaks. Everything was great until recent, when I tried to upgrade to 6.14 - outgoing emails stopped sending with "SMTP authentication failed (SMTP code: 500, ErrorMessage: 500, Command unknown: 'AUTH')."
The only change is OTRS version in Dockerfile
Rolled back to 6.12 image and e-mails started working just fine.
Now for the testing:
Could you please confirm if the issue is reproducible
P.S. - I am using SMTPTLS and Office365 account
When i exec :
docker-compose -f docker-compose-prod.yml -p companyotrs up
I've got reponse:
otrs_1 | standard_init_linux.go:190: exec user process caused "no such file or directory"
It seems like CLRF to LF error i'm not sure.
I'm on windows 10, Hyper-V, docker version 18.06.1-ce
Hi,
would it be possible to add env variables for db host, user and database name?
as far as I can see this is only referenced in functions.sh.
Hello,
currently the SendmailModule
settings are static in Kernel/Config.pm:
https://github.com/juanluisbaptiste/docker-otrs/blob/master/otrs/Config.pm#L96
It would be nice if those could be removed or overwritten with environment variables, for example we would like to use SendmailModule => 'Kernel::System::Email::SMTPTLS'
with custom settings from the DB.
The otrs config params are;
SendmailModule
SendmailModule::AuthUser
SendmailModule::AuthPassword
SendmailModule::Host
SendmailModule::Port
Thanks
OTRS_DB_NAME is not set to the configuration
Currently the default Config.pm shipped with docker-otrs locks the following OTRS vars:
$Self->{'SendmailModule'} = 'Kernel::System::Email::SMTP';
$Self->{'SendmailModule::Host'} = 'postfix';
$Self->{'SendmailModule::Port'} = '25';
This makes it impossible to use eg. Kernel::System::Email::SMTPTLS
as SendmailModule or a custom SendmailModule::Host
or SendmailModule::Port
, as params set in Config.pm have priority over parameters set within the OTRS sysconfig (DB).
Some possible solutions:
Thanks
I seem to have a repeatable issue whereby setting AutoIncrement throws an error while the config file is being set up while the container boots.
otrs_1 | ERROR: OTRS-otrs.Daemon.pl - Daemon Kernel::System::Daemon::DaemonModules::SystemConfigurationSyncManager-10 Perl: 5.16.3 OS: linux Time: Tue Sep 11 12:28:49 2018
otrs_1 |
otrs_1 | Message: There was an error executing ConfigurationDeploySync: ERROR: OTRS-otrs.Daemon.pl - Daemon Kernel::System::Daemon::DaemonModules::SystemConfigurationSyncManager-10 Perl: 5.16.3 OS: linux Time: Tue Sep 11 12:28:49 2018
otrs_1 |
otrs_1 | Message: No deployments found in Database!
otrs_1 |
otrs_1 | Traceback (64):
otrs_1 | Module: Kernel::System::SysConfig::ConfigurationDeploySync Line: 3730
otrs_1 | Module: (eval) Line: 129
otrs_1 | Module: Kernel::System::Daemon::DaemonModules::SystemConfigurationSyncManager::Run Line: 116
otrs_1 | Module: (eval) Line: 316
otrs_1 | Module: main::Start Line: 316
otrs_1 | Module: /opt/otrs/bin/otrs.Daemon.pl Line: 137
otrs_1 |
otrs_1 |
otrs_1 |
otrs_1 | Traceback (64):
otrs_1 | Module: Kernel::System::Daemon::DaemonModules::BaseTaskWorker::_HandleError Line: 49
otrs_1 | Module: Kernel::System::Daemon::DaemonModules::SystemConfigurationSyncManager::Run Line: 134
otrs_1 | Module: (eval) Line: 316
otrs_1 | Module: main::Start Line: 316
otrs_1 | Module: /opt/otrs/bin/otrs.Daemon.pl Line: 137
otrs_1 |
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.