Zammad ticketing/helpdesk on Nethserver available

The new status and supported versions of Elasticsearch are mentioned here Zammad 3.1 is there - Announcements - Zammad - Community. However, Elasticsearch is also used in combination with OnlyOffice, so some consideration must be there I guess.

I guess experimenting with Elasticsearch 6/7 can not hurt, but a ‘must’, NO, absolutely not. But then again, I am not experienced enough with Elasticsearch.

Just giving this subject a spin to see if we can progress towards Zammad 3.x series.

Thanks for any considerations!!

1 Like

Zammad 3.1 is already used when installing the module. I’ll test newer elasticsearch and report.

EDIT:

It seems to work with Elasticsearch 7.2 in a first test. Here are the install/update steps to test the new version:

yum -y install https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.2.0-x86_64.rpm
yum -y install https://mrmarkuz.goip.de/mirror/devtest/nethserver-zammad-1.0.0-5.ns7.noarch.rpm
config setprop zammad VirtualHost zammad.domain.local
yum -y install zammad
signal-event nethserver-zammad-update
4 Likes

That all seems to work without any issue… Latest Zammad, and latest Elasticsearch installed.

Massive thanks @mrmarkuz !!

3 Likes

Hello and many thanks @mrmarkuz for the rpm, it worked out of the box!

BUT only until the first restart :confused:

Currently it starts zammad and zammad-web services succesfully, but zammad-web-1 and zammad-worker-1 does not start and gives error in the log.

I figured our that the problem is somewhere with the user running the process.

#zammad run web
chroot: invalid group ‘domain’
chroot: invalid group ‘users@mydomain.com’

#su zammad
$zammad run web
…works!

Clearly, in the first one it should change to “domain users@mydomain.com” instead changing separately…

As a workaround I think it would be a solution to change the user that runs the service from root to zammad, but I am not sure where could do that?!

Or any idea where is that code that wants to cahnge the user group?

Any input welcomed!

1 Like

I couldn’t reproduce the issue. After some reboots Zammad is still running.

Please post the detailed error message.

It should run as user zammad.

[root@testserver ~]# ps aux | grep zammad
zammad     1134  1.1  2.2 518840 179208 ?       Ssl  17:45   0:07 script/websocket-server.rb -b 127.0.0.1 -p 6042 start
zammad     1147  1.3  2.7 1058684 215944 ?      Ssl  17:45   0:08 script/scheduler.rb start -t
zammad     1156  1.5  2.7 1063620 220664 ?      Ssl  17:45   0:09 puma 3.12.2 (tcp://127.0.0.1:3001) [zammad]
postgres   2331  0.0  0.0 237212  7388 ?        Ss   17:46   0:00 postgres: zammad zammad [local] idle
...

But it works from root too but puma service still runs as user zammad:

[root@testserver ~]# systemctl stop zammad
[root@testserver ~]# zammad run web
=> Booting Puma
=> Rails 5.2.4.1 application starting in production
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.12.2 (ruby 2.5.5-p157), codename: Llamas in Pajamas
* Min threads: 5, max threads: 30
* Environment: production
* Listening on tcp://127.0.0.1:3001
Use Ctrl-C to stop

[root@testserver ~]# su zammad
[zammad@testserver root]$ zammad run web
=> Booting Puma
=> Rails 5.2.4.1 application starting in production
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.12.2 (ruby 2.5.5-p157), codename: Llamas in Pajamas
* Min threads: 5, max threads: 30
* Environment: production
* Listening on tcp://127.0.0.1:3001
Use Ctrl-C to stop

[root@testserver ~]# ps aux | grep zammad
zammad     3916 41.2  2.2 1066572 182588 pts/0  Sl   18:10   0:05 puma 3.12.2 (tcp://127.0.0.1:3001) [zammad]

Did you use the install instructions from the wiki ?

Maybe you need to do a configuration update:

signal-event nethserver-zammad-update

Please check the services not running with

systemctl status zammad-web-1 zammad-worker-1 -l

Thank four you reply!

[root@server ~]# ps aux | grep zammad
root     10117  0.0  0.0 112712   964 pts/0    S+   21:44   0:00 grep --color=auto zammad

If I run su zammad, then zammad run web, then from another console:

zammad   10331  0.0  0.0 115444  2084 pts/0    S+   21:46   0:00 bash
zammad   10674  2.4  2.1 1267560 220588 pts/0  Tl   21:47   0:07 puma 3.12.2 (tcp://127.0.0.1:3001) [zammad]
postgres 12459  0.0  0.1 239372 13960 ?        Ss   21:47   0:00 postgres: zammad zammad [local] idle
postgres 12464  0.0  0.1 238924 10932 ?        Ss   21:47   0:00 postgres: zammad zammad [local] idle

Status shows error for restart even at boot:

[root@server ~]# systemctl status zammad-web-1 zammad-worker-1 -l
● zammad-web-1.service
   Loaded: loaded (/etc/systemd/system/zammad-web-1.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Sun 2020-01-19 21:33:11 CET; 7min ago
 Main PID: 1619 (code=exited, status=125)

Jan 19 21:33:11 server.mydomain.com systemd[1]: zammad-web-1.service: main process exited, code=exited, status=125/n/a
Jan 19 21:33:11 server.mydomain.com systemd[1]: Unit zammad-web-1.service entered failed state.
Jan 19 21:33:11 server.mydomain.com systemd[1]: zammad-web-1.service failed.
Jan 19 21:33:11 server.mydomain.com systemd[1]: zammad-web-1.service holdoff time over, scheduling restart.
Jan 19 21:33:11 server.mydomain.com systemd[1]: Stopped zammad-web-1.service.
Jan 19 21:33:11 server.mydomain.com systemd[1]: start request repeated too quickly for zammad-web-1.service
Jan 19 21:33:11 server.mydomain.com systemd[1]: Failed to start zammad-web-1.service.
Jan 19 21:33:11 server.mydomain.com systemd[1]: Unit zammad-web-1.service entered failed state.
Jan 19 21:33:11 server.mydomain.com systemd[1]: zammad-web-1.service failed.

● zammad-worker-1.service
   Loaded: loaded (/etc/systemd/system/zammad-worker-1.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Sun 2020-01-19 21:33:11 CET; 7min ago
 Main PID: 1621 (code=exited, status=125)

Jan 19 21:33:11 server.mydomain.com systemd[1]: zammad-worker-1.service: main process exited, code=exited, status=125/n/a
Jan 19 21:33:11 server.mydomain.com systemd[1]: Unit zammad-worker-1.service entered failed state.
Jan 19 21:33:11 server.mydomain.com systemd[1]: zammad-worker-1.service failed.
Jan 19 21:33:11 server.mydomain.com systemd[1]: zammad-worker-1.service holdoff time over, scheduling restart.
Jan 19 21:33:11 server.mydomain.com systemd[1]: Stopped zammad-worker-1.service.
Jan 19 21:33:11 server.mydomain.com systemd[1]: start request repeated too quickly for zammad-worker-1.service
Jan 19 21:33:11 server.mydomain.com systemd[1]: Failed to start zammad-worker-1.service.
Jan 19 21:33:11 server.mydomain.com systemd[1]: Unit zammad-worker-1.service entered failed state.
Jan 19 21:33:11 server.mydomain.com systemd[1]: zammad-worker-1.service failed.

The real reason found in the log:

chroot: invalid group ffe2ff80ff98users@mydomain.comffe2ff80ff99   zammad-web-1.service 
chroot: invalid group ffe2ff80ff98domainffe2ff80ff99                            zammad-web-1.service 

Yes, I followed the wiki, here is the install history:

82  2020-01-04 14:23:19 yum -y install https://mrmarkuz.goip.de/mirror/mrmarkuz/7/noarch/nethserver-mrmarkuz-0.0.1-3.ns7.noarch.rpm
83  2020-01-04 14:23:43 yum install nethserver-zammad
84  2020-01-04 14:29:06 config setprop zammad VirtualHost ticket.mydomain.com
85  2020-01-04 14:29:20 yum install zammad
86  2020-01-04 14:36:10 signal-event nethserver-zammad-update
106  2020-01-04 15:36:13 curl -X GET http://localhost:3001
107  2020-01-04 17:38:00 /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment
108  2020-01-04 17:38:54 sysctl -w vm.max_map_count=262144
109  2020-01-04 17:39:49 systemctl stop elasticsearch
110  2020-01-04 17:39:55 systemctl start elasticsearch
111  2020-01-04 17:40:20 zammad run rails r "Setting.set('es_url', 'http://localhost:9200')"

And now I remember that at this point I’ve got the same error message with domain users group while running the zammad command as root (but did not have time to check it until now). But this was still before the first reboot, so zammad was running while I’ve got the error.

Now tried to remove both zammad and elasticsearch and install them again - strangely now elasticsearch is also enabled but not starting (side note: I tried ES7+dev rpm above in the meantime, possibly that messed up).

[root@server ~]# systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2020-01-19 21:50:18 CET; 3s ago
     Docs: http://www.elastic.co
  Process: 14513 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet -Edefault.path.logs=${LOG_DIR} -Edefault.path.data=${DATA_DIR} -Edefault.path.conf=${CONF_DIR} (code=exited, status=1/FAILURE)
  Process: 14511 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
 Main PID: 14513 (code=exited, status=1/FAILURE)

Jan 19 21:50:17 server.mydomain.com systemd[1]: Starting Elasticsearch...
Jan 19 21:50:17 server.mydomain.com systemd[1]: Started Elasticsearch.
Jan 19 21:50:18 server.mydomain.com systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Jan 19 21:50:18 server.mydomain.com systemd[1]: Unit elasticsearch.service entered failed state.
Jan 19 21:50:18 server.mydomain.com systemd[1]: elasticsearch.service failed.

I am not sure what does it tires to do with the domain users group anyway.
I have set LDAP integration, but I cannot recall any setting regarding to the domain users group.

It is possible that there is something else that causes this problem, but all the other services are running as the right user (not root).

Anyhow, it will be postponed again as I will be afk the whole week (but will check this thread, and if there is any reply, I will try it).

Worst case I will install another VM for zammad but wanted to have every e-mail related stuff on one server.

Did you remove the Zammad postgres database too?

su - postgres -c 'psql -c "drop database zammad"'

I never tried it but I am going to test that…

1 Like

Last night removed them again and also deleted every folder/file with zammad and elasticsearch in the name. Forgot the postgres database, but now deleted that one too.

There is a chance that LDAP messed something up - “domain users@mydomain.com” exists only in the AD.
As you can see in the history, 15:36 was the time when I tested the connection (got interrupted after the install 14:36) and it was working, I guess it has started as zammad. Then I’ve basically set up zammad and the LDAP integration. 2 hours later I started to check the elasticsearch (as zammad said it is missing), and at that point I’ve got the invalid group error already.

Anyhow, I will try it again a week later.

1 Like

I followed the wiki and not even let me install the repository, it still works?

Yes, it still works but you used an (old testing) direct download link.

First install the repo:

yum -y install https://mrmarkuz.goip.de/mirror/mrmarkuz/7/noarch/nethserver-mrmarkuz-0.0.1-3.ns7.noarch.rpm

See NethServer wiki.

Then follow these instructions to install Zammad.

1 Like

i’ve followed all the instructions and i can´t not get it works, i enter to the subdomain and i only see the index of nethserver.

I don’t know what i am missing :confused:

Could you please post your virtualhost list?

You don’t need to create a virtualhost for Zammad, it’s done by the package.
Please remove the virtualhost and try again.

1 Like

i did it but i still can’t enter to zammad, i will reinstall NS7 and try again all the process, thanks.

You may try the following before reinstalling:

config setprop zammad VirtualHost YOURVHOST
signal-event nethserver-zammad-update
1 Like

thanks, i’ll try in a moment and return with results, thanks again

still the same, really i don’t know what i am doing wrong, i’ll try reinstalling and trying again from start, thanks for the help.

1 Like

i give up, i just reinstalling and stills the same, i will try to install zammad standalone in ubuntu.

Thanks again.

Alright (feedback, don’t make the same mistake): so as it turned out, my problem was that I created a “zammad” AD user (zammad@xyz.com), and gave it access to the group that has the shared mailbox I wanted to use…
And so it was a member of “domain users@xyz.com” too as a default. Now there was another “zammad” user created by default, so the server got confused (I guess it possibly would not be a problem without the space in the group name).
Now I deleted the user and it works well after the restart.
I guess I will make a new AD user called “unique-zammad-ad-connection-user” :smiley:

1 Like