how to use ejabberdctrl set_vcard with non latin words in values? - ejabberd

version that I use:
ejabberd 16.01 is running in that node
Filling values of set_vcard/set_vcard2 with non latin symbols (for example, in russian - НА РУССКОМ) cause errors.
this construction works fine:
ejabberdctl set_vcard user27 jabber.mydomain.local FN "27 operator"
ejabberdctl set_vcard user27 jabber.mydomain.local NICKNAME "27 operator"
but if I want fill it with Cyrillic words like this:
ejabberdctl set_vcard user27 jabber.mydomain.local FN "27 Оператор"
ejabberdctl set_vcard user27 jabber.mydomain.local NICKNAME "27 Оператор"
it not works, in current version of ejabberd, but in earlier versions this command line worked fine.
error output:
Problem 'error {case_clause,
{'EXIT',
{{badmatch,{error,{fread,character}}},
[{ejabberd_ctl,format_arg2,2,
[{file,"src/ejabberd_ctl.erl"},{line,336}]},
{ejabberd_ctl,format_arg,2,
[{file,"src/ejabberd_ctl.erl"},{line,327}]},
{ejabberd_ctl,'-format_args/2-fun-0-',2,
[{file,"src/ejabberd_ctl.erl"},{line,318}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1262}]},
{ejabberd_ctl,call_command,3,
[{file,"src/ejabberd_ctl.erl"},{line,293}]},
{ejabberd_ctl,try_call_command,3,
[{file,"src/ejabberd_ctl.erl"},{line,271}]},
{ejabberd_ctl,process2,3,
[{file,"src/ejabberd_ctl.erl"},{line,220}]},
{ejabberd_ctl,process,1,
[{file,"src/ejabberd_ctl.erl"},{line,205}]}]}}}' occurred executing the command.
Stacktrace: [{ejabberd_ctl,call_command,3,
[{file,"src/ejabberd_ctl.erl"},{line,293}]},
{ejabberd_ctl,try_call_command,3,
[{file,"src/ejabberd_ctl.erl"},{line,271}]},
{ejabberd_ctl,process2,3,
[{file,"src/ejabberd_ctl.erl"},{line,220}]},
{ejabberd_ctl,process,1,
[{file,"src/ejabberd_ctl.erl"},{line,205}]},
{rpc,'-handle_call_call/6-fun-0-',5,
[{file,"rpc.erl"},{line,206}]}]
Problem 'error {case_clause,
{'EXIT',
{{badmatch,{error,{fread,character}}},
[{ejabberd_ctl,format_arg2,2,
[{file,"src/ejabberd_ctl.erl"},{line,336}]},
{ejabberd_ctl,format_arg,2,
[{file,"src/ejabberd_ctl.erl"},{line,327}]},
{ejabberd_ctl,'-format_args/2-fun-0-',2,
[{file,"src/ejabberd_ctl.erl"},{line,318}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1262}]},
{ejabberd_ctl,call_command,3,
[{file,"src/ejabberd_ctl.erl"},{line,293}]},
{ejabberd_ctl,try_call_command,3,
[{file,"src/ejabberd_ctl.erl"},{line,271}]},
{ejabberd_ctl,process2,3,
[{file,"src/ejabberd_ctl.erl"},{line,220}]},
{ejabberd_ctl,process,1,
[{file,"src/ejabberd_ctl.erl"},{line,205}]}]}}}' occurred executing the command.
Stacktrace: [{ejabberd_ctl,call_command,3,
[{file,"src/ejabberd_ctl.erl"},{line,293}]},
{ejabberd_ctl,try_call_command,3,
[{file,"src/ejabberd_ctl.erl"},{line,271}]},
{ejabberd_ctl,process2,3,
[{file,"src/ejabberd_ctl.erl"},{line,220}]},
{ejabberd_ctl,process,1,
[{file,"src/ejabberd_ctl.erl"},{line,205}]},
{rpc,'-handle_call_call/6-fun-0-',5,
[{file,"rpc.erl"},{line,206}]}]
Please, tell how solve this problem?

It works for me using ejabberd 18.01 and 19.08. I cannot try older ejabberd versions because they do not compile with my current Erlang.
$ ejabberdctl get_vcard user27 jabber.mydomain.local FN
error_no_vcard_found
$ ejabberdctl set_vcard user27 jabber.mydomain.local FN "27 Оператор"
$ ejabberdctl get_vcard user27 jabber.mydomain.local FN
27 Оператор
Please, tell how solve this problem?
Install a newer ejabberd version, which probably has that problem solved. I don't know which exact version solved it. You can install ejabberd in a test machine, check if that feature works correctly, and then focus in installing it in your online server.

Related

Error while running "podman run"; error adding pod to CNI network "podman": unexpected end of JSON input

I'm new to podman, and I just trying to run containers on it.
(podman version 3.4.0, installed by brew, intel Core MAC)
However, when I trying to run "podman run {image-name}", below errors were thrown.
$ podman run -ti -d --name web httpd 125
Error: error configuring network namespace for container b0e70d672cb66005833c0a300c8661b88eab49e942c240d69d17587e0b75c47b: error adding pod web_2_web_2 to CNI network "podman": unexpected end of JSON input
$ podman run centos:7
Error: error preparing container a6d0bc1ad217cd8207935561dc8ff7bd33672da3fa513917f9965cb39520c449 for attach: error configuring network namespace for container a6d0bc1ad217cd8207935561dc8ff7bd33672da3fa513917f9965cb39520c449: error adding pod quirky_snyder_quirky_snyder to CNI network "podman": unexpected end of JSON input
By reading https://issueexplorer.com/issue/containers/podman/11452, I removed ~/.docker/, but the solution doesn't work in my case.
Of course, the error message says there was "unexpected end of JSON input", but I don't know how to fix it. Could anyone guess why podman didn't work even running these base images, or how to debug it?
Thanks in advance.
on macos, current machine version 3.3.1 has this problem. I had this problem on server version 3.3.1 and I do not encounter it on server version 3.4.0. You can check server version with podman version.
Try removing current machine and installing a newer one
podman machine stop
podman machine rm
podman machine init --image-path next
podman machine start
Check server version again with podman version.
Try running your image again.

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.

OS X ejabberd configure error: SQLite3 library >= 3.6.19 was not found

I tried to install ejabberd in my local Mac OS X machine, but while configuring sqlite using following command as mentioned in steps. I'm stuck at the following issue.
./configure --prefix=$HOME/my-ejabberd --enable-sqlite
Error received
checking for SQLite3 library >= 3.6.19... yes
cat: /include/sqlite3.h: No such file or directory
./configure: line 4172: test: !=: unary operator expected
configure: WARNING: Cannot find SQLITE_VERSION macro in sqlite3.h header to retrieve SQLite version!
configure: error: SQLite3 library >= 3.6.19 was not found
Steps I followed from - https://docs.ejabberd.im/developer/install-osx/
If you just want to install vanilla Ejabberd then you can simply do brew install ejabberd.
According to the issue, you can also try:
./configure --prefix=$HOME/my-ejabberd --enable-sqlite --with-sqlite3=/usr/local/opt/sqlite
P.S. I have filed the issue on Github Ejabberd.

PDO Exception : Could not find driver. [duplicate]

Does the MySQL-server and PHP5-MySQLi version have to match in order for a connection to be possible? I'm currently receiving the error below: I am running BSD.
"Fatal error: Uncaught exception 'PDOException' with message 'could not find driver'..."
Here is the the connection info:
$info = "mysql:dbname=myDB;host=localhost";
$user = "dbUser";
$pw = "somePW";
return(new PDO($info, $user, $pw));
Here is my MySQL information:
mysql-server-5.5.24
php5-mysqli-5.4.3
I had this same issue on my CentOS install. I had tried to install imagick and hosed my install. When I removed all of my php files and reinstalled something wasn't working right.
I ran:
yum install php-pdo
yum install php-pdo_mysql
After doing those two lines I ran
service httpd restart
and everything came back up and running.
PDO uses database specific drivers to connect to database systems. It looks like you are missing the pdo_mysql driver that is required to connect to a MySQL database. There is some details on installing the driver on the pdo_mysql manual page, or there may be a BSD package that you can use (I am afraid I'm not familiar enough with BSD to offer specific advice).
Thanks to zerkms and John C for pointing me in the right direction. Below are the commands I used to install the driver:
#cd /usr/ports/databases/php5-pdo_mysql
#make install clean
#apachectl restart

Error when trying to add subdomain or add databases with cPanel

cPanel is throwing up an error everytime I try to add or edit an existing subdomain. The same error is showing up when I try to add a new database.
Cpanel::AdminBin::_get_cpwrapd_connection could not connect to /usr/local/cpanel/var/cpwrapd.sock
PHPMyAdmin, FTP and SSH are all working perfectly, so the problem is something to do with cPanel. The server is a VPS with GoDaddy. I was installing a program running on Ruby 1.8.7, and this error started showing up after I installed the program. I have tried /scripts/installruby but that's giving me this error:
The internal error was:
(RegexpError) Stack overflow in regexp matcher: /.*((?>\/\*.*?\*\/\s+))
([\w\.\s]+\s* = \s+)?rb_define_(class|module).*?"(Mongrel)"/mx
ERROR: While generating documentation for mongrel-1.1.5
... MESSAGE: Stack overflow in regexp matcher: /.*((?>\/\*.*?\*\/\s+))
([\w\.\s]+\s* = \s+)?rb_define_(class|module).*?"(Mongrel)"/mx
... RDOC args: --ri --op /usr/local/rvm/gems/ruby-1.8.7-p374/doc/mongrel-1.1.5/ri --line-numbers --title Mongrel --main README lib ext CHANGELOG COPYING lib/mongrel/camping.rb lib/mongrel/cgi.rb lib/mongrel/command.rb lib/mongrel/configurator.rb lib/mongrel/const.rb lib/mongrel/debug.rb lib/mongrel/gems.rb lib/mongrel/handlers.rb lib/mongrel/header_out.rb lib/mongrel/http_request.rb lib/mongrel/http_response.rb lib/mongrel/init.rb lib/mongrel/rails.rb lib/mongrel/stats.rb lib/mongrel/tcphack.rb lib/mongrel/uri_classifier.rb lib/mongrel.rb LICENSE README --title mongrel-1.1.5 Documentation --quiet
die [installruby] Failed command: /usr/bin/gem install mongrel-1.1.5.gem --local
exit level [die] [pid=5273] (Failed command: /usr/bin/gem install mongrel-1.1.5.gem --local)
I solved the problem by rebooting cPanel, using /etc/init.d/cpanel restart