ejabberd 15.07: no sasl log file anymore - ejabberd

I compiled ejabberd 15.07 (make install, using a prefix for destination).
I am under Linux Mint 16 (based on Ubuntu 13.10) with the distro's erlang package (version R16B01).
I also tested on Ubuntu 12.04 using Erlang OTP 18.0 (erlang compiled myself and ejabberd compiled using --with-erlang, distro's packages are not installed).
ejabberd works perfectly fine in both environments except that the erlang.log file is not created, basically no erlang SASL logs at all.
I upgraded from distro's ejabberd v2.1.10 where that file used to contain a bunch of supervisor logs or component crash/restarts.
Looking at ejabberdctl script, it actually does set the sasl_error_logger file like it always did in the past (e.g. in versions 2.x).
If I do
gperrot#tristan ~/apps/ejabberd/sbin $ su -c 'erl -sasl sasl_error_logger \{file,\"/home/gperrot/apps/ejabberd/var/log/ejabberd/erlang.log\"\}'
Erlang R16B01 (erts-5.10.2) [source] [64-bit] [smp:4:4] [async-threads:10] [kernel-poll:false]
Eshell V5.10.2 (abort with ^G)
1> application:start(sasl).
ok
I can get a erlang.log file created with some content.
I used bash -x ejabberdctl start to check the command it uses:
sh -c '/usr/bin/erl -sname ejabberd#localhost -noinput -detached -pa /home/gperrot/apps/ejabberd/lib/ejabberd/ebin -mnesia dir "\"/home/gperrot/apps/ejabberd/var/lib/ejabberd\"" -ejabberd log_rate_limit 100 log_rotate_size 10485760 log_rotate_count 1 log_rotate_date '\''""'\'' -s ejabberd -sasl sasl_error_logger \{file,\"/home/gperrot/apps/ejabberd/var/log/ejabberd/erlang.log\"\} +K true -smp auto +P 250000 start ""'
File path is set properly, same user running, same file permissions.
I don't understand why I get no erlang.log file managed by ejabberd.
SASL is correctly started:
gperrot#tristan ~/apps/ejabberd/sbin $ ejabberdctl debug
(ejabberd#localhost)1> application:start(sasl).
{error,{already_started,sasl}}
And in ejabberd.log I also get
2015-09-04 17:29:51.252 [info] <0.7.0> Application sasl started on node ejabberd#localhost
But not erlang.log file.
Any idea why?

Related

Deploy Flask Application using python 3.7

I follow this guideline to deploy my python application.
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-flask.html
I got this bug when use command eb deploy:
2021/09/10 17:26:49.653297 [INFO] extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/
2021/09/10 17:26:49.653315 [INFO] Running command /bin/sh -c /usr/bin/unzip -q -o /opt/elasticbeanstalk/deployment/app_source_bundle -d /var/app/staging/
2021/09/10 17:26:49.656613 [INFO] finished extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/ successfully
2021/09/10 17:26:49.657975 [ERROR] An error occurred during execution of command [app-deploy] - [StageApplication]. Stop running the command. Error: chown /var/app/staging/env/lib/python3.7/collections: no such file or directory
2021/09/10 17:26:49.657984 [INFO] Executing cleanup logic
2021/09/10 17:26:49.658080 [INFO] CommandService Response: {"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"Engine execution has encountered an error.","returncode":1,"events":[{"msg":"Instance deployment failed. For details, see 'eb-engine.log'.","timestamp":1631294809,"severity":"ERROR"}]}]}
its so annoy because it can not find python 3.7 to run. can anyone give me a hand to by pass this mess?
application.py
# app.py
from flask import Flask
application = Flask(__name__)
#application.route("/")
def hello():
return "Hello World!"
if __name__ == '__main__':
application.run()
requirements.txt
click==7.1.2
Flask==1.1.2
itsdangerous==1.1.0
Jinja2==2.11.2
MarkupSafe==1.1.1
Werkzeug==1.0.1
This happened to me while following the tutorial as well.
The problem, in my case, was that my virtual environment folder venv was getting swept up in the deploy and breaking it.
I thought that I could put the path in .ebignore to prevent this, but I did not read the .ebignore documentation clearly:
If .ebignore isn't present, but .gitignore is, the EB CLI ignores files specified in .gitignore. If .ebignore is present, the EB CLI doesn't read .gitignore.
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-configuration.html#eb-cli3-ebignore
In my case, I just removed the .ebignore file completely, added a line for venv into my .gitignore file, ran eb deploy again and everything worked.

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.

KVMs not running after qemu-kvm upgrade in CentOS 8.1, RHEL 8.1

This is the error i encountered when i updated my CentOS 8.1/RHEL 8.1 machines and all the KVMs are showing the error below:
error: internal error: process exited while connecting to monitor: 2020-06-09T12:41:10.410896Z qemu-kvm: -machine pc-q35-rhel8.1.0,accel=kvm,usb=off,vmport=off,smm=on,dump-guest-core=off: unsupported machine type
Use -machine help to list supported machines
Note: The problem states the machine type Q35 is not well stated/configured in your virtual Kernel based machines RUNNING on RHEL 8/ CentOS 8
[Step 1:] cat /etc/libvirt/qemu/*.xml | grep \<name&apos;\| machine&apos;
This will list the machine type in all of the KVMs installed.
[Output Snippet]
machine pc-q35-rhel8.1.0
[Step 2:] cd /etc/libvirt/qemu; ll
This will list all the xml files in connection with your KVMs
[Step 3:] At /etc/libvirt/qemu Use virsh edit <KVM file> ###Don&apos;t include .xml###
Navigate to machine
[Output Snippet]
<os>
<type arch=&apos;x86_64&apos; machine=&apos;pc-q35-rhel8.1.0&apos;>hvm</type>
<loader readonly=&apos;yes&apos; secure=&apos;yes&apos; type=&apos;pflash&apos;>/usr/share/OVMF/OVMF_CODE.secboot.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/Loadbalancer_VARS.fd</nvram>
<boot dev=&apos;hd&apos;/>
</os>
Change machine=&apos;pc-q35-rhel8.1.0&apos; to machine=&apos;q35&apos;
shift + zz to save and quit
[Step 4:]
systemctl restart libvirtd && systemctl status -l libvirtd
virsh list --all
virsh start --domain <KVM>
Check the status of your running KVMs
virsh list --state-running
Now the issue should be resolved and your KVMs should be humming away.
Note though if head back in and check on the configuration xml file with virsh edit, you&apos;ll note that q35 converts to pc-q35-rhel7.6.0 automatically.
But this shouldn&apos;t be an issue.
Cheers :)

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.