RabbitMq FreeBsd - Shared object "libdl.so.1" not found, required by "beam.smp" - rabbitmq

I just install rabbitmq-3.7.8 on my FreeBsd mashine.
But if I run rabbitmqctl start, then getting error is
Shared object "libdl.so.1" not found, required by "beam.smp"
uname -v
FreeBSD 11.1-RELEASE-p4 #0: Tue Nov 14 06:12:40 UTC 2017
What is that mean?
Thanks for any answer!

You are using 11.1 which is discontinued. I strongly recommended that you upgrade to 11.2.
freebsd-update upgrade -r 11.2-RELEASE
freebsd-update install
reboot
freebsd-update install
Check again your OS version.
uname -r
It should return 11.2-RELEASE
pkg update -f
pkg upgrade -f
All your packages will be reinstalled, then check again if rabbitmqctl starts.

11.1 went End-of-Life slightly less than two months before your post.
If you're not ready to upgrade yet, but have access to a machine running 11.2, you can probably copy /usr/lib/libdl.so.1 from the newer machine into /usr/lib on the older machine, and limp along like that until you're ready to upgrade.

Related

Redis ERR unknown command 'BZPOPMIN'

I installed Redis version 4.0.9 in a Ubuntu Linux Subsystem on Windows 10 by following these instructions (i.e. sudo apt-get install redis-server).
I am following this tutorial on Django channels, and I ran the following code:
>>> import channels.layers
>>> channel_layer = channels.layers.get_channel_layer()
>>> from asgiref.sync import async_to_sync
>>> async_to_sync(channel_layer.send)('test_channel', {'type': 'hello'})
>>> async_to_sync(channel_layer.receive)('test_channel')
When the last line above is executed, I get this error:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\Users\xyz\Anaconda3\envs\django\lib\site-packages\asgiref\sync.py", line 120, in __call__
return call_result.result()
File "C:\Users\xyz\Anaconda3\envs\django\lib\concurrent\futures\_base.py", line 425, in result
return self.__get_result()
File "C:\Users\xyz\Anaconda3\envs\django\lib\concurrent\futures\_base.py", line 384, in __get_result
raise self._exception
File "C:\Users\xyz\Anaconda3\envs\django\lib\site-packages\asgiref\sync.py", line 180, in main_wrap
result = await self.awaitable(*args, **kwargs)
File "C:\Users\xyz\Anaconda3\envs\django\lib\site-packages\channels_redis\core.py", line 485, in receive
return (await self.receive_single(channel))[1]
File "C:\Users\xyz\Anaconda3\envs\django\lib\site-packages\channels_redis\core.py", line 508, in receive_single
index, channel_key, timeout=self.brpop_timeout
File "C:\Users\xyz\Anaconda3\envs\django\lib\site-packages\channels_redis\core.py", line 345, in _brpop_with_clean
result = await connection.bzpopmin(channel, timeout=timeout)
aioredis.errors.ReplyError: ERR unknown command 'BZPOPMIN'
On this page, someone suggested using Redis version 5. How do I install Redis version 5 on Windows 10? Any other ideas on how to solve this issue?
I think the problem is in the compatibility with version of the channels-redis package! I had already tested channels some time ago and it worked beautifully with channels-redis version 2.4.2, recently they are in version 3.0.1 and this version doesn't work properly yet I don't know why.
Try install the version 2.4.2 with pip:
pip install channels-redis==2.4.2
Use redis 5.0.9. It worked for for the same error.
Get it from github.com/tporadowski/redis/releases
There is no official support for Redis in Windows OS.
However, Microsoft develops and maintains microsoftarchive/redis. Also it is no longer supported (older versions are availble). I had long search on this about installing version 5 in windows 10. But no luck.
Better you can go for Memurai. Memurai is 100% compatible with the Redis protocol (also supported version 5 too). It is free for development and testing.
EDIT : From Itamar comment, u can also use this as alternative for Memurai
Just download the latest version of Redis for Windows https://github.com/tporadowski/redis/releases from here it will work.
you don't need to downgrade the version of your channels-redis etc. This problem with Redis not with any python packages at all.
You need to install the latest version(6+) of redis:
$ sudo add-apt-repository ppa:redislabs/redis
$ sudo apt-get update
$ sudo apt-get install redis
then restart the redis-server.
This is how i resolve this issue.
Ubuntu 18 installs redis 4 but ubuntu 20 installs redis 5. You can find your redis version by typing redis-cli -v. So i uninstall ubuntu 18 from my windows subsystem for linux (WSL) and reinstall ubuntu 20. It worked just fine.
Same problem on Ubuntu 16.04
Similarly, I was following the chat application tutorial on Django Channels website and had the same error:
aioredis.errors.ReplyError: ERR unknown command 'BZPOPMIN'
The problem occurred when I used these versions:
redis-server==3.0.6
channels==3.0.3
channels-redis==3.2.0
Thanks to #marvin-correia for his answer I figured out the problem's reason is the version of the channels-redis package! So as he suggested, I installed channel-redis version 2.4.2 and the error has gone.
pip install channels-redis==2.4.2
Also, I've to note that channels package downgraded to channels==2.4.0 automatically.
Problem is with the version.
Try older one
I found "2,3,4" any version with it stable and properly working.
https://github.com/tporadowski/redis/releases
To add to #Marvin answer, for me it was similar (some versioning problem probably), I reinstalled django_channels and django to the exact version as specified in the tutorial (3.0, 2.2) and it worked. Not sure what exactly worked but recommend checking it:)
I will also confirm Marvins answer. Hopefully this will help someone out but also leaving this here for notes.
Development:
(this setup works) considering data is sent to and form http://localhost:8000
Setup
Windows 10 Running WSL with Ubuntu 20.04
Python==3.10
Django==4.0
Redis==5.0.7
channels-redis==3.3.1
Production
setup
Python==3.8
Ubuntu==16.04
Redis-server==3.0.6
chanels-redis==2.4.2
channels==3.0.3
When I downgraded, channels-redis, it automcatically downgraded channels as well. Then you can force the upgrade to channels==3.0.3, but it will raise an incompatibility error. Also, if 2 files will most likely to be updated to run Django 4.0
1 being here
https://github.com/django/channels/issues/1609
I was getting this error on a Windows machine, I would suggest you to use Redis on a docker image instead of using Redis server on a windows machine.
One of the way to run a redis server via a docker image and map the port 6379 is to:
start docker desktop
In your terminal type the below command.
docker run -p 6379:6379 -d redis:5

Multiple issues trying to install PyBOSSA

I am trying to set up PyBOSSA on an AWS EC2 instance running Ubuntu 18.04 LTS. I am following the official instructions and have encountered three errors so far.
sudo apt-get install -y git postgresql postgresql-all postgresql-server-dev-all libpq-dev python-psycopg2 libsasl2-dev libldap2-dev libssl-dev python-virtualenv python-dev build-essential libjpeg-dev libssl-dev libffi-dev dbus libdbus-1-dev libdbus-glib-1-dev libldap2-dev libsasl2-dev python-pip python3-pip redis-server
cd ~
git clone --recursive https://github.com/Scifabric/pybossa
cd pybossa
virtualenv -p python3 env (I'm using Python3 explicitly as my system also has Python 2.7 installed).
source env/bin/activate
pip install -U pip
pip install -r ~/pybossa/requirements.txt
At this point, I start getting error messages... I have copied the stdout and stderr into a file, which I have uploaded here.
I'm not sure if the errors there are what have caused my later errors, but I pushed on through the instructions anyway in hopes it'd work...
cp settings_local.py.tmpl settings_local.py
cp alembic.ini.template alembic.ini
redis-server contrib/sentinel.conf --sentinel
I noted that the Redis server version was 4.0.9 (the instructions say it needs to be v2.6 or greater).
The output from starting the Redis server was as follows:
30284:X 30 Mar 03:09:22.004 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
30284:X 30 Mar 03:09:22.004 # Redis version=4.0.9, bits=64, commit=00000000, modified=0, pid=30284, just started
30284:X 30 Mar 03:09:22.004 # Configuration loaded
...I gather that's ok...
rqscheduler --host 127.0.0.1
This command wasn't installed on my system. I tried to use apt to install it, but there was nothing there. I also tried apt install rq rqscheduler rq-scheduler - nothing found. I then Googled and found the website for rq-scheduler, and found that I could install it by running pip install rq-scheduler
That installed correctly. Nonetheless, running the command rqscheduler --host 127.0.0.1 in the terminal still failed: rqscheduler: command not found.
Knowing that it was a Python package, I wondered if maybe I needed to prepend python3 onto the start of the command: python3 rqscheduler --host 127.0.0.1. Response: python3: can't open file 'rqscheduler': [Errno 2] No such file or directory.
I also tried pip3 install rq-scheduler (which installed fine) and then running the command, but encountered the same error.
I would appreciate knowing how to get that running, but for the purpose of this test, I skipped setting up Regis and the scheduler, and continued with the PyBOSSA instructions:
sudo su postgres
createuser -d -P pybossa
(Password set)
createdb pybossa -O pybossa
exit
python3 cli.py db_create
...and then I got this error:
File "cli.py", line 162
'''SELECT id, created FROM task_run WHERE created LIKE ('\x%')''')
^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 54-55: truncated \xXX escape
I instead tried python cli.py db_create, just in case it'd work, and got a different error:
python cli.py db_create
ValueError: invalid \x escape
So I'm seeing three separate issues:
Installing the PyBOSSA-required Python packages.
The issue with the rqscheduler command.
The error when starting the PyBOSSA server.
What do these errors mean?
1 ) For the installation, try this:
virtualenv env
source env/bin/activate
sudo apt install python3-pip
pip3 install -r requirements.txt
Which ended with no error.
2) Try :
pip install rq-scheduler==0.9.1
or
pip3 install rq-scheduler==0.9.1
3) The \ char need to be escaped (like \\) in python.
So you may alter the cli.py line 162 (using text editor) from:
'''SELECT id, created FROM task_run WHERE created LIKE ('\x%')''')
To:
'''SELECT id, created FROM task_run WHERE created LIKE ('\\x%')''')
But it will be better to be fixed by dev on github ...
CONCLUSION
According to official documentation,
PYBOSSA for python 3 We’ve finally migrated PYBOSSA to python 3. We’re
not going to merge into master until we test it in production a bit
more, so please, help us by testing it. All you have to do is
basically, check out the python3 branch (migrate-python3) and run it.
Then, any bug, issue you find, you just report it and we will be happy
to help you.
The PYBOSSA python3 version is freshly migrated so finaly is not very stable ... I expect that it will be better to use the PYBOSSA python2.7 branch and follow exactly the documentation.
And according to official github account they try to make money with support (?...)
Get professional support You can hire us to help you with your PYBOSSA
project or server (specially for python 2.7). Go to our website, and
contact us.
The issue has now been fixed for the master branch (https://github.com/Scifabric/pybossa/pull/1986). You can fetch the new code and use it.

Can't install nautilus-dropbox on Centos 8

I try to install dropbox on Centos8, however Terminal gives strange errors. Tried different commands, same error.
Firstly downloaded *.rpm file from dropbox website, currently trying to install it.
Commands I tried:
rpm -ivh nautilus-dropbox-2020.03.04-1.fedora.x86_64.rpm
yum localinstall nautilus-dropbox-2020.03.04-1.fedora.x86_64.rpm
Error:
Last metadata expiration check: 0:18:27 ago on Thu 12 Mar 2020 03:46:17 PM EET
Error:
Problem: conflicting requests
nothing provides libgnome >= %{gnome_version} needed by nautilus-dropbox-2020.03.04-1.fc21.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
[root#localhost Downloads]
Also tried --skip-broken and --nobest - but no luck.
Also tried sudo yum install libgnome but it gives error:
Last metadata expiration check: 9:51:39 ago on Thu 12 Mar 2020 02:42:06 PM UTC.
No match for argument: libgnome
Error: Unable to find a match: libgnome
I have:
[adminuser#localhost ~]$ cat /etc/centos-release
CentOS Linux release 8.1.1911 (Core)
Tried to google this mistake, but no luck. Could you please give me any hint how I could overcome this?
Thank you
This is a bug in packaging. Contact Dropbox support and report it as a bug.
Technical details (just in case you are Dropbox employee):
During building rpm, when you use macro then it is expanded. Try yoursel:
$ rpm --eval '%{_bindir}'
/usr/bin
However, when the macro is not defined, you get original value:
$ rpm --eval '%{some_bullshit}'
%{some_bullshit}
So the macro gnome_version should likely contain some version, but this macro was not defined.
nothing provides libgnome
"libgnome" is about libgnome-2 → https://linux.dropbox.com/fedora/ → I.e. Fedora only packages. CentOS 8 has no libgnome* available.
https://www.dropbox.com/install-linux → Compile from source → CentOS 8
# dnf install nautilus-devel-3.28.1-10.el8.x86_64 python3-docutils
tar xvf nautilus-dropbox-2020.03.04.tar.bz2
cd nautilus-dropbox-2020.03.04/
./configure && make
# make install
Result : nautilus-dropbox-2020.03.04-1.el8.x86_64.rpm https://drive.google.com/file/d/1AcxlVdbWOzQvcoVOFYCiaVny9MzgC-Ea/view?usp=sharing
# rpm -Uvh nautilus-dropbox-2020.03.04-1.el8.x86_64.rpm : No issues.
First, realize that the command showing at the install page is for the headless installation. It will probably work, but my preference is to use Dropbox with nautilus integration.
This instructions assumes a installation of Dropbox with Nautilus integration.
We need to compile the installer from source.
a. Download last package
wget https://linux.dropbox.com/packages/nautilus-dropbox-2020.03.04.tar.bz2
b. Extract tarball
tar xjf ./nautilus-dropbox-2020.03.04.tar.bz2
c. Try to compile
cd nautilus-dropbox-2020.03.04; ./configure;
Then you get an Error:
Erro:
Problema: conflicting requests
- nothing provides libgnome >= %{gnome_version} needed by nautilus-dropbox-2020.03.04-1.fc21.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Now we need to install nautilus-devel and python3-docutils
NOTE: You will get configure: error: couldn't find docutils if forget python3-docutils.
This command will enable the PowerTools repository and install what is needed:
dnf --enablerepo=PowerTools install nautilus-devel python3-docutils
Now you can run ./configure && sudo make install
That's it. Go for the start menu type "Dropbox", it will start the installer.
Restore a local backup of Dropbox (optional)
If you have a local backup, turn of the network after you see the Dropbox folder created. Then copy all your files to that folder and turn it on after copy.
This solution worked for me running CentOS Linux release 8.2.2004 (Core).

Can ddev work with WSL (Windows Subsystem for Linux)?

As a person working on a Windows machine but enjoying Ubuntu as a working environment I'd like to use ddev in WSL. Is there a way to do that?
2021 Update: DDEV has WSL2 install instructions.
(2018-11-15: Updated for ddev v1.4.0)
It's pretty tweaky, but it can be done. Note that there are no tests or performance results on this, and it's not a supported technique.
Note that WSL actually behaves like linux and uses linux binaries, so you'll use the linux version of ddev.
The biggest problem is that the docker daemon is running under native Windows and WSL has a different filesystem layout, so you have to kind of trick everything on the WSL side to use paths that the Docker daemon will be able to find in native windows.
Start by setting up your WSL/Docker environment as described in this excellent article: https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly#ensure-volume-mounts-work - BUT use DOCKER_HOST=tcp://127.0.0.1:2375 instead of using "localhost" in there.
Install ddev using the Linux instructions.
Make sure all projects are already rm'd with ddev rm -a; projects already running or stopped in native Windows can't be accessed by ddev from WSL-land.
You're probably going to use the web browser on your windows side of the machine, so add the hostname of your project on the Windows side with ddev hostname <yourproject.ddev.local> 127.0.0.1
cd /c/Users//path/to/project (This is a path docker understands.)
ddev start
Visit the project with your browser.
Basically, with this technique you're using paths that the Docker daemon knows how to follow in native windows.
Anyway, it seems to work with a trivial example. Your comments are welcome and we may be able to improve support in the future if people like it.
I have it working (current 1.5.1) inside of WSL. I'm using Docker Toolbox so Docker4Windows may be different.
General setup inside of WSL (I'm using ubuntu)
install docker (apt-get install docker.io)
copy default docker machine certificates to WSL via
cp /mnt/c/Users/[YOUR WINDOWS USER]/.docker/machine/machines/default/*.pem ~/.docker
setup your environment variable inside of WSL (eg. in ~/.bashrc)
export DOCKER_HOST=tcp://192.168.99.100:2376
export DOCKER_TLS_VERIFY=1
export DOCKER_CERT_PATH=~/.docker
The actual values to use can be determined via docker-machine.exe env from the docker toolbox!
At this point you should get a complete output from docker version (don't forget to restart your shell to actually load the modified environment)
Client:
Version: 18.06.1-ce
API version: 1.38
Go version: go1.10.4
Git commit: e68fc7a
Built: Fri Oct 19 19:43:14 2018
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 18.06.1-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:28:38 2018
OS/Arch: linux/amd64
Experimental: false
Containers can't be started yet as the mount of file systems will fail!
With Docker Toolbox the docker server has the host file system available under /c/. But running from WSL the expected path is /mnt/c/
Generating a symlink is sufficient to make it available docker-machine.exe ssh default 'sudo ln -s /c /mnt/c'
This command has to be rerun after reboot or you have to make the changes permanent via the bootlocal.sh mechanism.
Test your mapping with docker run --rm -i -t -v ${PWD}:/mnt ubuntu bash from WSL.
Install docker-compose, depending on your distribution it is outdated and needs to be replaced with a current version.
Enjoy ddev

libvirt and VirtualBox / Getting Started

I'm trying to get started on libvirt with VirtualBox as a virtualization solution. I installed everything and VirtualBox itself is running when using their VBoxHeadless command.
However, libvirt fails to connect to VirtualBox:
# virsh -c vbox:///session
libvir: error : could not connect to vbox:///session
error: failed to connect to the hypervisor
I could not find any hints in the libvirt documentation that point to whether I have to make any domain specific configuration before using virsh.
Does anyone have a hint? Or even better, maybe a tutorial that works through the way of using libvirt, virsh or it's APIs (my later goal) from the ground up.
If you are doing this on Ubuntu, then the problem is their libvirt package is built without VirtualBox support.
You can rebuild the package with support very easily. Something like:
apt-get source -d libvirt
sudo apt-get build-dep libvirt
dpkg-source -x libvirt*dsc
Go into the libvirt directory and edit debian/rules so that instead of --without-vbox it says --with-vbox. You can add an entry to the top of debian/changelog so the package is compiled as a different version (e.g., append ~local1 to the version).
dpkg-buildpackage -us -uc -b -rfakeroot
You'll get new .debs built in the directory above. Use dpkg -i to install the relevant ones (libvirt0, libvirt0-bin, and whatever else you want).
Double-check whether or not you have write access to /var/run/libvirt/libvirt-sock.
The socket file should have permissions similar to:
$ sudo ls -la /var/run/libvirt/libvirt-sock
srwxrwx--- 1 root libvirtd 0 2010-08-24 14:54 /var/run/libvirt/libvirt-sock
I think it could be helpful also to increase the libvirt logging capabilities by running this in your shell:
export LIBVIRT_DEBUG=1
There is Ubuntu PPA for libvirt with VirtualBox support: https://launchpad.net/~cxl/+archive/ubuntu/libvirt