nvm management node version - pm2

I used the nvm management node version, installed two versions, one is 6.10.1, one is 7.7.4, but in koa2 project, nvm use 7, use pm2 open cluster mode, can not start normally. Pm2 logs error: /root/.nvm/versions/node/v6.10.1/bin/node: bad option: --harmony-async-await. However, I am in the pm2 process file defined in the "interpreter": "/ root / .nvm / versions / node / v7.7.4 / bin / node", why not I specified the version of the node?

You can't specify node (interpreter) versions when running pm2 in cluster mode. Try it without cluster mode.
#see https://github.com/Unitech/PM2/issues/1034

Related

How does Serenity choose what Chromedriver to use?

I recently cloned the latest version of serenity-cucumber-starter from https://github.com/serenity-bdd/serenity-cucumber-starter. I took the action-classes branch (as I want to use that as a starting point rather than the screenplay (master) branch) and ran mvn clean verify as instructed in the readme. I got an unusual situation wherein the webdrivermanager that comes with serenity recognised and downloaded the correct version of chromedriver based on my installed chrome but serenity proceeded to start a different version of chromedriver.
Here are the logs:
11:36:55.771 [pool-2-thread-1] INFO n.s.c.w.d.ChromeDriverProvider - Using automatically driver download
11:36:56.248 [pool-2-thread-1] INFO i.g.bonigarcia.wdm.WebDriverManager - Using chromedriver 107.0.5304.62 (since Chrome 107 is installed in your machine)
11:36:56.258 [pool-2-thread-1] INFO i.g.bonigarcia.wdm.WebDriverManager - Exporting webdriver.chrome.driver as /Users/user69/.m2/repository/webdriver/chromedriver/mac64/107.0.5304.62/chromedriver
11:36:56.772 [pool-2-thread-1] INFO n.s.c.w.d.ProvideNewDriver - Instantiating driver
11:36:56.774 [pool-2-thread-1] INFO n.s.c.w.d.ProvideNewDriver - Driver capabilities: Capabilities {acceptInsecureCerts: false, browserName: chrome, chrome.switches: --start-maximized;--test-ty..., goog:chromeOptions: {args: [--start-maximized, --test-type, --no-sandbox, --ignore-certificate-errors;\n, --disable-popup-blocking, --disable-default-apps, --disable-extensions-file-a..., --incognito, --disable-infobars, --disable-gpu, --headless], extensions: []}, loggingPrefs: org.openqa.selenium.logging...}
Starting ChromeDriver 90.0.4430.24 (4c6d850f087da467d926e8eddb76550aed655991-refs/branch-heads/4430#{#429}) on port 48795
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Of course because the wrong version of ChromeDriver starts the tests fail to run with the following:
Caused by: net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate new WebDriver instance of type class org.openqa.selenium.chrome.ChromeDriver (session not created: This version of ChromeDriver only supports Chrome version 90
Current browser version is 107.0.5304.110 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
After webdrivermanager correctly identifies and downloads the correct version of chromedriver how can I instruct serenity to actually use the downloaded version rather than starting some other version?
The bonigarcia library uses the following commands to identify your installed browser version and that's the version it will automatically download.
https://github.com/bonigarcia/webdrivermanager/blob/master/src/main/resources/commands.properties
You may override the driver version serenity is using with the wdm.* properties listed under the advanced configuration section here. https://bonigarcia.dev/webdrivermanager/#advanced-configuration
E.g. pass as environment variable when using maven "mvn clean verify -Dwdm.chromeDriverVersion=107"
But, under normal circumstances you don't need to do so, if automatic driver resolution works.

Gnome Boxes on Fedora 33 fails to open

I attempt to load gnome-boxes from the terminal (I'm running Fedora 33) and get the following error
$ gnome-boxes
(gnome-boxes:3194): Gtk-WARNING **: 12:34:57.343: GtkFlowBox with a model will ignore sort and filter functions
(gnome-boxes:3194): Gtk-WARNING **: 12:34:57.344: GtkListBox with a model will ignore sort and filter functions
(gnome-boxes:3194): Boxes-WARNING **: 12:34:57.904: libvirt-machine.vala:83: Failed to disable 3D Acceleration
(gnome-boxes:3194): Boxes-WARNING **: 12:34:57.913: libvirt-broker.vala:70: Failed to update domain 'fedora33-wor-2': Failed to set domain configuration: XML error: Invalid PCI address 0000:04:00.0. slot must be >= 1
(gnome-boxes:3194): Boxes-CRITICAL **: 12:34:57.916: boxes_vm_importer_get_source_media: assertion 'self != NULL' failed
Segmentation fault (core dumped)
My system:
$uname -a
Linux localhost.localdomain 5.9.16-200.fc33.x86_64 #1 SMP Mon Dec 21 14:08:22 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
I don't whether it's related but I recently updated from kernel 5.9.11 directly to 5.9.16 (haven't used the PC in question for some weeks) and before gnome-boxes was working as normal.
Please advise how I can restore gnome-boxes - I have some virtual machines that I need to access...
I faced this issue when I force stopped Gnome-Boxes while cloning a VM.
Deleting the conflicting VM will resolve your issue(in your case 'fedora33-wor-2').
To delete the VM in fedora, install "libvirt-client" which provides "virsh" using the command
dnf install libvirt-client
then double check the available VM's using
virsh list --all
Delete the VM using command,
virsh undefine VM_Name
#channel-fun solved the problem of staring up gnome-boxes.
But the real problem is in cloning procedure. The XML describing the new machine is malformed.
virt-clone --original fedora33-ser --auto-clone
works properly.
I know this is an old thread, but I had the same problem recently.
I shut down gnome boxes whilst it was cloning a vm, and shutdown the machine.
I then couldn't open boxes, as it would just crash.
I was able to delete the VM itself, and then deleted the XML file associated with it.
To delete the VM itself, go to :
$HOME/.var/app/org.gnome.Boxes/data/gnome-boxes/images (which in my case is a symbolic link to a data drive)
and delete the VM with the name that you were cloning to (or safer, just move it somewhere).
To delete the XML file associated with it:
$HOME/.var/app/org.gnome.Boxes/config/libvirt/qemu/
and delete (or safer move) the file that is named VM_NAME.xml.
Then boxes should open ok, at least it worked for me.
Extending on Channel Fun's answer for Ubuntu repos the package is libvirt-clients (note the plural s):
sudo apt install libvirt-clients
Check the available VM's using:
virsh list --all
Delete the VM using:
virsh undefine VM_Name
If you receive the error:
error: Refusing to undefine while domain managed save image exists
Then you can explicitly remove that also using the --managed-save flag:
virsh undefine VM_Name --managed-save

Snap apps giving "error while loading shared libraries" and "cannot open shared object file: No such file or directory" when opened

Some snap apps (namely discord and telegram-desktop), stopped opening when I turned my laptop on this morning (Fedora 31 64bit), and when opened from terminal discord shows this:
~/ discord
WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement
/snap/discord/109/usr/share/discord/Discord: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory
and telegram-desktop shows this:
~/ telegram-desktop
WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement
/snap/telegram-desktop/1561/bin/telegram-desktop: error while loading shared libraries: libQt5Widgets.so.5: cannot open shared object file: No such file or directory
both packages are installed, and I'm a bit stumped after searching threads and forums for most of the morning, nothing I tried worked, reinstalling them, trying different versions of the libraries and then the apps, installing 32bit versions, and on and on. Any help, prompts, ideas, or just general rambling about what the issue could be is much appreciated.
TLDR: Snap apps giving "error while loading shared libraries" and "cannot open shared object file: No such file or directory" when opened. Packages that are missing are installed correctly, so I'm stumped.
The warning is not your issue.
The real problem is simply you miss some dependencies in your snaps: for some reason snap is not installing all the requiered depdencies, while it should.
In an Ubuntu I have telegram-desktop and it works fine and I did this check:
snap list
to list the actual snaps.
And next I did check all the interdependencies by looking at the connections with:
snap connections telegram-desktop
this on my Utbuntu machine yields:
Interface Plug Slot Notes
alsa telegram-desktop:alsa - -
audio-playback telegram-desktop:audio-playback :audio-playback -
audio-record telegram-desktop:audio-record - -
content[gtk-3-themes] telegram-desktop:gtk-3-themes gtk-common-themes:gtk-3-themes -
content[icon-themes] telegram-desktop:icon-themes gtk-common-themes:icon-themes -
content[kde-frameworks-5-core18-all] telegram-desktop:kde-frameworks-5-plug kde-frameworks-5-core18:kde-frameworks-5-core18-slot -
content[sound-themes] telegram-desktop:sound-themes gtk-common-themes:sound-themes -
desktop telegram-desktop:desktop :desktop -
desktop-legacy telegram-desktop:desktop-legacy :desktop-legacy -
gsettings telegram-desktop:gsettings :gsettings -
home telegram-desktop:home :home -
network telegram-desktop:network :network -
network-manager telegram-desktop:network-manager - -
opengl telegram-desktop:opengl :opengl -
pulseaudio telegram-desktop:pulseaudio :pulseaudio -
removable-media telegram-desktop:removable-media - -
unity7 telegram-desktop:unity7 :unity7 -
wayland telegram-desktop:wayland :wayland -
x11 telegram-desktop:x11 :x11 -
next I have found that the library libQt5Widgets.so.5 you are missing is provided by kde-frameworks-5-core18
sudo find /snap -name libQt5Widgets.so
/snap/kde-frameworks-5-core18/32/usr/lib/x86_64-linux-gnu/libQt5Widgets.so
I don't know if on fedora you could use:
snap install kde-frameworks-5-core18
to fix your missing dependency.
On the other side on Fedora and similar distros you could try to use flatpak instaead of snap: flatpak comes as default app-package manager for the Fedora family.
First you need to add flathub as a flatpak remote repository:
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
next you can search:
flatpak search discord
flatpak search telegram
and next install the apps:
sudo flatpak install com.discordapp.Discord
sudo flatpak install org.telegram.desktop
I tested this on a CentOS virtual machine (I dont' have a fedora ready to test, but CentOS is close enough) and I got them both correctly working.
Hey I'm not an expert at all, but I've been facing the same issue, and it seems that doing a "snap refresh" fixed the problem on my ubuntu. I'm not sure if it's relevant or not, but it might help

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

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.