ejabberd 19.05 not working with mod_log_chat - ejabberd

installed ejabberd от FreeBSD
then install mod_log_chat (ejabberdctl modules_update_specs -> ejabberdctl module_install mod_log_chat) and see error when starting ejabberd:
[error] Supervisor ejabberd_sup had child ejabberd_gen_mod_sup started with gen_mod:start_link() at undefined exit with reason {'EXIT',{undef,[{econf,any,[],[]},{mod_log_chat,mod_opt_type,1,[{file,"/root/.ejabberd-modules/sources/ejabberd-contrib/mod_log_chat/src/mod_log_chat.erl"},{line,282}]},{gen_mod,'-get_validators/2-fun-1-',3,[{file,"src/gen_mod.erl"},{line,512}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{gen_mod,get_validators,2,[{file,"src/gen_mod.erl"},{line,499}]},{gen_mod,validate_opts,3,[{file,"src/gen_mod.erl"},{line,557}]},{gen_mod,start_module,5,[{file,"src/gen_mod.erl"},{line,209}]},{lists,foreach,...}]}} in context start_error
02:36:32.939 [critical] Failed to start ejabberd application: {error,{shutdown,{failed_to_start_child,ejabberd_gen_mod_sup,{'EXIT',{undef,[{econf,any,[],[]},{mod_log_chat,mod_opt_type,1,[{file,"/root/.ejabberd-modules/sources/ejabberd-contrib/mod_log_chat/src/mod_log_chat.erl"},{line,282}]},{gen_mod,'-get_validators/2-fun-1-',3,[{file,"src/gen_mod.erl"},{line,512}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{gen_mod,get_validators,2,[{file,"src/gen_mod.erl"},{line,499}]},{gen_mod,validate_opts,3,[{file,"src/gen_mod.erl"},{line,557}]},{gen_mod,start_module,5,[{file,"src/gen_mod.erl"},{line,209}]},{lists,foreach,2,[{file,"lists.erl"},{line,1338}]}]}}}}}

Right, mod_log_chat requires ejabberd 19.08 or higher since this commit: https://github.com/processone/ejabberd-contrib/commit/857d350a7119d63fc85555cc66df7ff923b91e39
That was not documented in the module README.txt file...
You have two solutions:
Upgrade your ejabberd 19.05 to 19.08 or higher
or Downgrade your mod_log_chat source code to a version older than the mentioned one.

Related

Cannot install any ejabberd contrib module

I'm trying to instal ejabberd-contrib modules. Using this guide,
However when I run ejabberdctl modules_update_specs nothing is returned.
And when I try install any of the individual modules:
ejabberdctl module_install mod_pottymouth
Failed RPC connection to the node ejabberd#localhost: {'EXIT',
{undef,
[{bitarray,new,
[16777216,false],
[]},
{etbloom,
'-bloom/3-lc$^0/1-0-',
2,
[{file,
"/var/lib/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/mod_pottymouth/deps/etbloom/src/etbloom.erl"},
{line,77}]},
{etbloom,bloom,3,
[{file,
"/var/lib/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/mod_pottymouth/deps/etbloom/src/etbloom.erl"},
{line,77}]},
{etbloom,sbf,4,
[{file,
"/var/lib/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/mod_pottymouth/deps/etbloom/src/etbloom.erl"},
{line,98}]},
{bloom_gen_server,
init,1,
[{file,
"/var/lib/ejabberd/.ejabberd-modules/sources/ejabberd-contrib/mod_pottymouth/src/bloom_gen_server.erl"},
{line,28}]},
{gen_server,init_it,
2,
[{file,
"gen_server.erl"},
{line,374}]},
{gen_server,init_it,
6,
[{file,
"gen_server.erl"},
{line,342}]},
{proc_lib,
init_p_do_apply,3,
[{file,
"proc_lib.erl"},
{line,249}]}]}}
Commands to start an ejabberd node:
start Start an ejabberd node in server mode
debug Attach an interactive Erlang shell to a running ejabberd node
iexdebug Attach an interactive Elixir shell to a running ejabberd node
live Start an ejabberd node in live (interactive) mode
iexlive Start an ejabberd node in live (interactive) mode, within an Elixir shell
foreground Start an ejabberd node in server mode (attached)
ejabberdctl status
The node ejabberd#localhost is started with status: started
How can I fix this?
However when I run ejabberdctl modules_update_specs nothing is returned.
Then it probably worked correctly, otherwise it would have returned some error, and echo would return 1. Example that it worked correctly and created the path:
$ ejabberdctl modules_update_specs
$ echo $?
0
$ ls $HOME/.ejabberd-modules/
sources
And when I try install any of the individual modules:
Installing ANY module produces an error? For example, if you try installing mod_rest, does it work? Notice this reports a warning about documentation, which is not important:
$ ejabberdctl module_install mod_rest
/home/badlop/.ejabberd-modules/sources/ejabberd-contrib/mod_rest/src/mod_rest.erl:27: Warning: undefined callback function mod_doc/0 (behaviour 'gen_mod')
$ ls $HOME/.ejabberd-modules/
mod_rest sources
{'EXIT', {undef, [{bitarray,new,
Yes, this is a known problem when installing mod_pottymouth. The workaround for installing that module is described in the README.txt file of that module. I've followed those instructions now, and the module compiled and installed correctly.

MySQL Server 8.0.12 - An authentication plugin must be specified for new users

I am trying to install MySQL Server (on Windows) using MYSQL community edition v8.0.12 in silent mode.
I first run
msiexec /i "mysql-installer-community-8.0.12.0.msi" /qn
Then
MySQLInstallerConsole community install -silent server;8.0.12;x64:*:type=config;
openfirewall=true;generallog=true;binlog=true;serverid=3306;enable_tcpip=true;port=3306;
rootpasswd=Unkn0wN;installdir="C:\MySQL\MySQL Server 8.0":type=user;username=foo;
password=bar;role=DBManager
MySQLInstallerConsole.exe execution log:
=================== Start Initialization ===================
MySQL Installer is running in Community mode
Attempting to update manifest.
Initializing product requirements
Loading product catalog
Checking for product catalog snippets
Checking for product packages in the bundle
Categorizing product catalog
Finding all installed packages.
Your product catalog was last updated at 9/16/2018 5:20:01 PM
=================== End Initialization ===================
MySQL Server 8.0.12 - An authentication plugin must be specified for new users.
The error is: "MySQL Server 8.0.12 - An authentication plugin must be specified for new users."
Oracle doesn't seem to have updated the MySQLInstallerConsole reference parameters on its website, does anyone know how i can specify an auth plugin for MySQLInstallerConsole ?
For now i am just working around it by not creating user foo.
MySQLInstallerConsole community install -silent server;8.0.12;x64:*:type=config;
openfirewall=true;generallog=true;binlog=true;serverid=3306;enable_tcpip=true;port=3306;
rootpasswd=Unkn0wN;installdir="C:\MySQL\MySQL Server 8.0";datadir="C:\MySQL\data"
I discovered that using the auth_plugin setting with caching_sha2_password allowed for creating a user.
As of MySQL 8.0, caching_sha2_password is both the preferred and the default authentication plugin.
MySQLInstallerConsole community install -silent server;8.0.21;x64:*:^
type=config;openfirewall=false;generallog=true;binlog=true;^
serverid=3306;enable_tcpip=true;port=3306;rootpasswd=Unkn0wN;^
installdir="C:\MySQL\MySQL80";datadir="C:\MySQL\Data":^
type=user;username=foo;password=bar;role=DBManager;auth_plugin=caching_sha2_password
I've also been successful at installing other products like so
MySQLInstallerConsole community install -silent ^
workbench;8.0.21;x64:* ^
shell;8.0.21;x64:* ^
connector/ODBC;8.0.21;x64:* ^
connector/J;8.0.21;x86:* ^
connector/C++;8.0.21;x64:* ^
connector/NET;8.0.21;x86:*
Some references:
https://dev.mysql.com/doc/refman/8.0/en/authentication-plugins.html
https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password

Failed to start zabbix3.0 in centos7

I met a issue when I install zabbix3.0 by packages on centos7.
When I done on mysql , php , apache and configuration in zabbix.conf.
I run systemctl start zabbix-server.service.It didn't work!and show :
Job for zabbix-server.service failed. See 'systemctl status zabbix-server.service' and 'journalctl -xn' for details.Then , my colleague told me to install trousers and gnutls,and then ,zabbix-server worked.What is the use of these two software?If they are necessary,Why not put them in the package of zabbix?
You won't start Zabbix Server 3.0 on CentOS 7 because you don't have "Disabled" SELinux.
You can disabled SELinux right here: /etc/selinux/config.
After that, you must reboot your server with reboot or shutdown -r now.
After reboot, confirm that the getenforce command returns Disabled.
Most likely, you didn't install those packages, but upgraded them. They are linked in through the Jabber/XMPP support.
This was a bug in RedHat packages that took some time to resolve, see this bugreport : https://bugzilla.redhat.com/show_bug.cgi?id=1071171
And this is the Zabbix issue tracking the same problem : https://support.zabbix.com/browse/ZBX-7790

libvirt error when trying to 'hot' attach-disk on guest with "Channel qemu-ga"

I have KVM virtual machine running CentOS 7 as guest OS. I'm trying to attach an additional disk to it on the run (without shutting it down) using this command:
$ sudo virsh attach-disk centos --source /var/lib/libvirt/images/newdisk.img --target sdb --persistent
But receive an error:
error: Failed to attach disk
error: internal error: cannot update AppArmor profile 'libvirt-d2e7bbb8-c7b3-44ec-b0ea-27539e0df732'
If I do the same with Debian guest - everything is ok.
What is difference, how to solve that?
UPDATE:
I have a comment!
I compared two VM's xml and saw that CentOS have QEMU-agent in his configuration:
<channel type="unix">
<source mode="bind" path="/var/lib/libvirt/qemu/channel/target/centos_auto.org.qemu.guest_agent.0"></source>
<target name="org.qemu.guest_agent.0" type="virtio"></target>
<address bus="0" controller="0" port="1" type="virtio-serial"></address>
</channel>
Then I removed "channel qemu-ga", restarted VM and checked "hot add" feature. It worked.
I tested it on other VMs (CentOS, Fedora, Debian) and saw the same.
As a result:
If enable qemu-agent i cannot use hot plug.
If use "hot plug" i must forget about agent.
Is it my mistake in configuration or these features can't work together?
Host-OS: Ubuntu 15.10
QEMU emulator: now 2.4.92 (tested 2.3 and 2.4.1)
VMM: 1.3.0
This is a clear bug in the apparmor security driver for libvirt. The existence of the QEMU guest agent config in the XML should have no impact on ability to hotplug disks to a guest. This bug should be reported to the libvirt upstream, or Ubuntu bug trackers.

Error on launching a local version of a website

I tried to install Jekyll On Windows 7. I followed this guide http://www.testically.org/2012/02/02/installing-jekyll-and-ruby-on-windows/
So I first downloaded Ruby and added \;C:\Ruby193\bin to the path variable.
I then downloaded DevKit and added \;C:\Users\jimmy\Downloads\teeheeband\bin\ to the path variable as well.
I then opened my command and did the following (in order)
cd ;C:\Users\jimmy\Downloads\teeheeband
ruby dk.rb init
ruby dk.rb install
the following are the codes that appeared on my screen when I did the above steps.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\jimmy>cd ;C:\Users\jimmy\Downloads\teeheeband
C:\Users\jimmy\Downloads\teeheeband>ruby dk.rb init
[INFO] found RubyInstaller v1.9.3 at C:/Ruby193
Initialization complete! Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit.
C:\Users\jimmy\Downloads\teeheeband>ruby dk.rb install
[INFO] Skipping existing gem override for 'C:/Ruby193'
[WARN] Skipping existing DevKit helper library for 'C:/Ruby193'
C:\Users\jimmy\Downloads\teeheeband>gem install jekyll
Successfully installed jekyll-0.12.0
1 gem installed
Installing ri documentation for jekyll-0.12.0...
Installing RDoc documentation for jekyll-0.12.0...
C:\Users\jimmy\Downloads\teeheeband>
Once I did the above, I downloaded github and cloned the repo that I wanted to work on. I then went to Gitshell and did the following
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
C:\Users\jimmy\Documents\GitHub> cd prog694.github.com
C:\Users\jimmy\Documents\GitHub\prog694.github.com [new-branch]> jekyll --server
--auto
Configuration from C:/Users/jimmy/Documents/GitHub/prog694.github.com/_config.ym
l
Auto-regenerating enabled: C:/Users/jimmy/Documents/GitHub/prog694.github.com ->
C:/Users/jimmy/Documents/GitHub/prog694.github.com/_site
[2013-02-03 20:19:00] regeneration: 402 files changed
[2013-02-03 20:19:01] INFO WEBrick 1.3.1
[2013-02-03 20:19:01] INFO ruby 1.9.3 (2013-01-15) [i386-mingw32]
[2013-02-03 20:19:01] INFO WEBrick::HTTPServer#start: pid=4036 port=4000
[2013-02-03 20:20:24] ERROR no access permission to `/'
jimmy-PC - - [03/Feb/2013:20:20:24 Atlantic Standard Time] "GET / HTTP/1.1" 403
283
- -> /
[2013-02-03 20:20:24] ERROR `/favicon.ico' not found.
jimmy-PC - - [03/Feb/2013:20:20:24 Atlantic Standard Time] "GET /favicon.ico HTT
P/1.1" 404 281
- -> /favicon.ico
Finally I opened a browser and tried to run a local copy of the website via : localhost:4000
I failed and got this message
Forbidden
no access permission to `/'
WEBrick/1.3.1 (Ruby/1.9.3/2013-01-15) at 127.0.0.1:4000
so I used h**p://127.0.0.1:4000/( replace t with **)
failed again
Forbidden
no access permission to `/'
WEBrick/1.3.1 (Ruby/1.9.3/2013-01-15) at 127.0.0.1:4000
All I want is to be able to open and run a local version of this website. Any help would be greatly appreciated.
Check if your port 4000 is not used by something else, or if you have a firewall enable access to it.
I'd highly disrecomend Windows for jekyll (or any ruby gem/app), installing and using it in Linux would be much easier.