Continuing the discussion from More Webtop Questions (signatures, chat, public folder):
If you get these errors, please enter the whole line in a terminal and check the output for errors.
No, the documentation should provide all you need.
No need to point to the Nethserver ejabberd. If configured as described in the docs, it should just work.
Maybe. Is the ejabberd service running?
systemctl status ejabberd
Does it work if you connect from another client (to check if itâs an ejabberd or webtop issue) ?
Iâd try the other things first but if nothing works, reinstalling an app is always worth a try.
Hello @mrmarkuz,
There is something wrong with my ejabberd running on my nethserver. The service was not running. I tried pressing start in the GUI but it would fail with the following command:
echo â{âactionâ:âstartâ,ânameâ:âejabberdâ}â | /usr/bin/setsid /usr/bin/sudo /usr/libexec/nethserver/api/system-services/update | jq
So I issued this command in the terminal and the service would again Fail with the following:
{
âidâ: â1602563010â,
âtypeâ: âEventFailedâ,
âmessageâ: âAction failedâ
}
I then searched on the forums and found a reference from nethserver support that perhaps the database was corrupted so I cleaned it up using these commands:
service ejabberd stop
rm -rf /var/lib/ejabberd/spool/*
service ejabberd start
This finally allowed my ejabberd service to successfully start.
So I tried accessing the WebTop Chat again but when I login I once again have the same error that Webtop canât access the chat server.
So then I went into ejabberd application and turned it off. I then turned it back on again and received an error that ejabberd could not start. The command it was issuing was this:
echo â{âconfigurationâ:{âpropsâ:{âstatusâ:âenabledâ,âWebAdminâ:âdisabledâ,âS2Sâ:âdisabledâ,âModMamStatusâ:âdisabledâ,âModMamPurgeDBStatusâ:âdisabledâ,âModMamPurgeDBIntervalâ:â30â,âModHttpUploadStatusâ:âdisabledâ,âModHttpUploadQuotaStatusâ:âenabledâ,âModHttpUploadQuotaMaxDayâ:â30â,âShaperFastâ:â1000000â,âShaperNormalâ:â500000â}}}â | /usr/bin/setsid /usr/bin/sudo /usr/libexec/nethserver/api/nethserver-ejabberd/update | jq
This resulted in the following results showing an error at the end. Iâm not sure what all these errors mean.
{
âstepsâ: 2,
âpidâ: 7320,
âargsâ: ââ,
âeventâ: ânethserver-ejabberd-saveâ
}
{
âstepâ: 1,
âpidâ: 7320,
âactionâ: âS05generic_template_expandâ,
âeventâ: ânethserver-ejabberd-saveâ,
âstateâ: ârunningâ
}
{
âprogressâ: â0.50â,
âtimeâ: â0.103037â,
âexitâ: 0,
âeventâ: ânethserver-ejabberd-saveâ,
âstateâ: âdoneâ,
âstepâ: 1,
âpidâ: 7320,
âactionâ: âS05generic_template_expandâ
}
{
âstepâ: 2,
âpidâ: 7320,
âactionâ: âS90adjust-servicesâ,
âeventâ: ânethserver-ejabberd-saveâ,
âstateâ: ârunningâ
}
{
âprogressâ: â1.00â,
âtimeâ: â104.432497â,
âexitâ: 256,
âeventâ: ânethserver-ejabberd-saveâ,
âstateâ: âdoneâ,
âstepâ: 2,
âpidâ: 7320,
âactionâ: âS90adjust-servicesâ
}
{
âpidâ: 7320,
âstatusâ: âfailedâ,
âeventâ: ânethserver-ejabberd-saveâ
}
{
âtypeâ: âEventErrorâ,
âidâ: 1602564012,
âmessageâ: âupdate_action_failedâ
}
Can you or someone from @support_team assist with why Iâm having so much trouble with my ejabberd?
Thank you.
The nethserver-ejabberd-save event is fired to save the configuration and during this action thereâs an error. You can also run it on CLI with signal-event nethserver-ejabberd-save
.
Please check /var/log/messages
for errors (it should be near the nethserver-ejabberd-save event).
Letâs check the ejabberd config:
config show ejabberd
Please also check if there are some forgotten custom templates in /etc/e-smith/templates-custom/...
.
Hello @mrmarkuz,
Iâve issued the above command and run a tail on /var/log/messages. Here are the results I can see related to the ejabberd-save event:
Oct 13 14:22:29 swasdomain esmith::event[31530]: Event: nethserver-ejabberd-save
Oct 13 14:22:29 swasdomain esmith::event[31530]: expanding /etc/ejabberd/ejabberd.yml
Oct 13 14:22:29 swasdomain esmith::event[31530]: Action: /etc/e-smith/events/actions/generic_templat e_expand SUCCESS [0.148432]
Oct 13 14:22:29 swasdomain systemd: Reloading.
Oct 13 14:23:31 swasdomain systemd: ejabberd.service: control process exited, code=exited status=1
Oct 13 14:23:31 swasdomain systemd: Failed to start ejabberd XMPP Server.
Oct 13 14:23:31 swasdomain systemd: Unit ejabberd.service entered failed state.
Oct 13 14:23:31 swasdomain systemd: ejabberd.service failed.
Oct 13 14:23:31 swasdomain esmith::event[31530]: Job for ejabberd.service failed because the control process exited with error code. See âsystemctl status ejabberd.serviceâ and âjournalctl -xeâ for details.
Oct 13 14:23:31 swasdomain esmith::event[31530]: [INFO] service ejabberd restart
Oct 13 14:23:31 swasdomain systemd: Stopped ejabberd XMPP Server.
Oct 13 14:23:31 swasdomain systemd: Starting ejabberd XMPP ServerâŚ
Oct 13 14:24:37 swasdomain systemd: ejabberd.service: control process exited, code=exited status=1
Oct 13 14:24:37 swasdomain systemd: Failed to start ejabberd XMPP Server.
Oct 13 14:24:37 swasdomain systemd: Unit ejabberd.service entered failed state.
Oct 13 14:24:37 swasdomain systemd: ejabberd.service failed.
Oct 13 14:24:37 swasdomain esmith::event[31530]: Job for ejabberd.service failed because the control process exited with error code. See âsystemctl status ejabberd.serviceâ and âjournalctl -xeâ for details.
Oct 13 14:24:37 swasdomain esmith::event[31530]: [WARNING] restart service ejabberd failed!
Oct 13 14:24:37 swasdomain systemd: Reloading.
Oct 13 14:24:38 swasdomain esmith::event[31530]: [INFO] service httpd reload
Oct 13 14:24:38 swasdomain systemd: Reloading The Apache HTTP Server.
Oct 13 14:24:38 swasdomain systemd: Reloaded The Apache HTTP Server.
Oct 13 14:24:38 swasdomain esmith::event[31530]: Action: /etc/e-smith/events/actions/adjust-services FAILED: 1 [128.339488]
Oct 13 14:24:38 swasdomain esmith::event[31530]: Event: nethserver-ejabberd-save FAILED
Oct 13 14:24:43 swasdomain systemd: ejabberd.service holdoff time over, scheduling restart.
Oct 13 14:24:43 swasdomain systemd: Stopped ejabberd XMPP Server.
Oct 13 14:24:43 swasdomain systemd: Starting ejabberd XMPP ServerâŚ
Here are the contents of ejabberd config file:
[root@swasdomain ~]# config show ejabberd
ejabberd=service
ModHttpUploadQuotaMaxDay=30
ModHttpUploadQuotaStatus=enabled
ModHttpUploadStatus=disabled
ModMamPurgeDBInterval=30
ModMamPurgeDBStatus=disabled
ModMamStatus=disabled
S2S=disabled
ShaperFast=1000000
ShaperNormal=500000
TCPPorts=5222,5223,5269,5280,5443
WebAdmin=disabled
access=green,red
status=enabled
My â/etc/e-smith/templates-custom/â folder is empty so no forgoteen custom templates exist.
Thank you.
The config looks good.
Please also check /var/log/ejabberd/*
for errors.
Hello @mrmarkuz,
Now weâre onto something here. I see the following messages in my /var/log/ejabberd/error.log:
2020-10-13 18:01:17.251 [error] <0.365.0>@ejabberd_pkix:log_errors:401 Failed to read PEM file /etc/ejabberd/ejabberd.pem: at line 61: no matching private key found for this certificate
2020-10-13 18:01:17.251 [critical] <0.365.0>@ejabberd_pkix:stop_ejabberd:352 ejabberd initialization was aborted due to invalid certificates configuration
And in /var/log/ejabberd/ejabberd.log I see similar messages:
2020-10-13 18:02:27.480 [notice] <0.120.0>@lager_file_backend:152 Changed loghwm of /var/log/ejabberd/error.log to 100
2020-10-13 18:02:27.480 [notice] <0.120.0>@lager_file_backend:152 Changed loghwm of /var/log/ejabberd/ejabberd.log to 100
2020-10-13 18:02:27.625 [info] <0.106.0>@ejabberd_config:load:82 Loading configuration from /etc/ejabberd/ejabberd.yml
2020-10-13 18:02:27.815 [warning] <0.106.0>@gen_mod:warn_soft_dep_fail:582 Module mod_mam is recommended for module mod_muc but is not found in the config
2020-10-13 18:02:27.840 [info] <0.106.0>@ejabberd_config:load:89 Configuration loaded successfully
2020-10-13 18:02:29.354 [info] <0.341.0>@gen_mod:start_modules:130 Loading modules for swaslab.local
2020-10-13 18:02:29.676 [info] <0.106.0>@ejabberd_cluster_mnesia:wait_for_sync:123 Waiting for Mnesia synchronization to complete
2020-10-13 18:02:29.734 [error] <0.365.0>@ejabberd_pkix:log_errors:401 Failed to read PEM file /etc/ejabberd/ejabberd.pem: at line 61: no matching private key found for this certificate
2020-10-13 18:02:29.734 [warning] <0.365.0>@ejabberd_pkix:log_warnings:393 Invalid certificate in /etc/ejabberd/ejabberd.pem: at line 28: certificate is signed by unknown CA
2020-10-13 18:02:29.734 [critical] <0.365.0>@ejabberd_pkix:stop_ejabberd:352 ejabberd initialization was aborted due to invalid certificates configuration
Iâve been using my own company certs which Iâve uploaded to Nethserver (valid until may 2021). What would be the issue with my ejabberd using the certs Iâve added to Nethserver?
Thank you.
[quote=âgreavette, post:7, topic:16694â]
Iâve been using my own company certs which Iâve uploaded to Nethserver
[/quote]/etc/
Did you set it as default?
If yes please compare the /etc/ejabberd/ejabber.pem
with /etc/pki/tls/localhost.crt
and /etc/pki/tls/private/localhost.key
A pem certificate can be the crt plus the key file, see https://stackoverflow.com/questions/991758/how-to-get-pem-file-from-key-and-crt-files
Maybe itâs enough to set the wanted certificate as default in Cockpit again and then restart ejabberd. Sometimes the process of setting certs for the apps is interrupted.
Hello @mrmarkuz,
Once again your patience has helped me find my issue. The cert used for ejabberd was the localhost cert on Nethserver which is not what I uploaded or use on my HAProxy server. Iâve modified the ejabber.pem file to be what I need and my ejabberd connection issues have now been fixed. Service starts and stays running. My WebTop now has a chat fuction that works.
I even have the ejabberd Admin working now as wel. I had to figure out that after creating the jabberadmins group I login with my @.com. I had tried logging in with just my domain userid without the @domain afterwards but this wouldnât work.
Thanks!
Hey @mrmarkuz or @alefattorini,
Whereâs the solve box on this post? I wanted to complete it so others can see a solution was found. But since this post was split from my original I donât see a solve box any longer.
Thank you.
Three dots on the post to be marked as solution.
Hi @dnutan,
Do you mean these three dots?
When I expand these three dots on the post I want to mark as solving my issue I only see the following:
Thank you.
Maybe some moderator should add a support tagâŚ
Yes, but you do not see it as only the original thread owner (now I see this thread was opened by Alessio) and moderators can mark it as solved.
Tell me which post do you want to be marked as solution so I can do if for you.
Thank you Marc for your help!
Please add solve to the 8th post (Markus) - Testing the integration of the chat services from WebTop.
The post where he has me check the pem cert files for ejabberd to make sure they are correct.
Thanks!
Sorry my fault I forgot to change the owner