openGauss has been installed when gs_install is installed repeatedly? - open-gauss

[omm#db1 ~]$ gs_install -X /opt/software/openGauss/cluster_config.xml --gsinit-parameter="--locale=zh_CN.utf8"
Parsing the configuration file.
Check preinstall on every node.
Successfully checked preinstall on every node.
Creating the backup directory.
Successfully created the backup directory.
begin deploy..
Installing the cluster.
begin prepare Install Cluster..
Checking the installation environment on all nodes.
[GAUSS-51400] : Failed to execute the command: source /home/omm/.bashrc;python3 '/opt/huawei/install/om/script/local/CheckInstall.py' -U omm:dbgrp -R /opt/huawei/install/app -l /var/log/omm/omm/om/gs_local.log -X /opt/software/openGauss/cluster_config.xml.Error:
Checking old installation.
[GAUSS-51806] : The cluster has been installed.

Related

Freeradius Not Starting . Error "Unable to open file "/etc/freeradius/3.0/radiusd.conf": No such file or directory"

So i mistakenly deleted the freeradius directory in "/etc/freeradius/3.0" on Ubuntu 20.04. After re-installing version 3.0.23 from tar file in freeradius website. I noticed directory structure is totally different and main files are in "[/etc/freeradius/installation directory/etc/raddb]" instead of just "/etc/freeradius/3.0". But i can still run freeradius in debugmode and all but after doing some configurations on clients.conf file and restarting the server i get the error Job for freeradius.service failed because the control process exited with error code.
See "systemctl status freeradius.service" and "journalctl -xe" for details. and when i run the journalctl -xe command.I get the error.
freeradius error . But as i can see its looking for the radiusd.conf file in the wrong directory structure even thou i compiled and installed from source tar file.
Try this site:
https://phoenixnap.com/kb/uninstall-packages-programs-ubuntu#:~:text=To%20remove%20an%20application%2C%20highlight%20it%20%3E%20right-click,to%20Remove%20Package%20on%20Ubuntu%20From%20Command%20Line
I did the
dpkg-query -l | grep radius
Returned with:
rc freeradius 3.0.20+dfsg-3build1 amd64 high-performance and highly configurable RADIUS server
rc freeradius-common 3.0.20+dfsg-3build1 all FreeRADIUS common files
rc freeradius-config 3.0.20+dfsg-3build1 amd64 FreeRADIUS default config files
Then for each of the three I did
apt-get remove --purge freeradius
apt-get remove --purge freeradius-common
apt-get remove --purge freeradius-config
Then
apt install freeradius freeradius-mysql freeradius-utils
And the default directories returned in the /etc/freeradius/3.0/ directory.
Happy I am!

How to run nvm command from bash file in GCP Cloud Shell (global install)?

What we're trying to do
We are using Cloud Shell Editor (IDE) on GCP.
According to the documentation for Environment customization script:
Cloud Shell automatically runs the script,
$HOME/.customize_environment, when your instance boots up. Unlike
.profile or .bashrc, this script runs once when Cloud Shell boots
(rather than once for each shell login).
This script runs as root and you can install any packages that you
want to exist in each Cloud Shell session using Debian package
management commands.
For example, if you'd like to have erlang installed on Cloud Shell,
your .customize_environment file will look like this:
#!/bin/sh
apt-get update
apt-get -y install erlang
We are trying to pre-install node versions and automate configuration for our developers using nvm.
Where we have issues
We've looked into several articles on making nvm callable from within a bash script file (the .customize_environment file):
nvm command not available in bash script
Can't use nvm from bash script
Node Version Manager install - nvm command not found
None of these answers seem to resolve our issue.
GCP nvm details
Cloud Shell pre-installs nvm (globally); it is located at /usr/local/nvm/nvm.sh.
There is no ~/.nvm folder.
I can run nvm without issue from Cloud Shell (command line) directly.
I cannot run nvm (nor using the for path) from a bash file.
Closest attempt
Running the following comes close, but I'm limited on privileges that you can't sudo around due to Cloud Shell limitations:
. /usr/local/nvm/nvm.sh
nvm install 14
Results in:
Downloading and installing node v14.15.4...
mkdir: cannot create directory ‘/usr/local/nvm/.cache/bin/node-v14.15.4-linux-x64’: Permission denied
creating directory /usr/local/nvm/.cache/bin/node-v14.15.4-linux-x64/files failed
Downloading https://nodejs.org/dist/v14.15.4/node-v14.15.4-linux-x64.tar.xz...
Warning: Failed to create the file
Warning: /usr/local/nvm/.cache/bin/node-v14.15.4-linux-x64/node-v14.15.4-linux-
Warning: x64.tar.xz: No such file or directory
curl: (23) Failed writing body (0 != 966)
Binary download from https://nodejs.org/dist/v14.15.4/node-v14.15.4-linux-x64.tar.xz failed, trying source.
grep: /usr/local/nvm/.cache/bin/node-v14.15.4-linux-x64/node-v14.15.4-linux-x64.tar.xz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
Detected that you have 4 CPU core(s)
Running with 3 threads to speed up the build
mkdir: cannot create directory ‘/usr/local/nvm/.cache/src’: Permission denied
creating directory /usr/local/nvm/.cache/src/node-v14.15.4/files failed
Downloading https://nodejs.org/dist/v14.15.4/node-v14.15.4.tar.xz...
Warning: Failed to create the file
Warning: /usr/local/nvm/.cache/src/node-v14.15.4/node-v14.15.4.tar.xz: No such
Warning: file or directory
curl: (23) Failed writing body (0 != 965)
Binary download from https://nodejs.org/dist/v14.15.4/node-v14.15.4.tar.xz failed, trying source.
grep: /usr/local/nvm/.cache/src/node-v14.15.4/node-v14.15.4.tar.xz: No such file or directory
Provided file to checksum does not exist.
Important lines: mkdir: cannot create directory ‘...’: Permission denied
I can't sudo around it, run usermod (e.g. usermod -a -G staff $(whoami)), even though Google's documentation says I should be able to:
When you set up a Cloud Shell session, you get a regular Unix user account with a username based on your email address. With this access, you have full root privileges on your allocated VM and can even run sudo commands, if you need to.
Question
How can we use nvm within a bash script file in GCP's Cloud Shell?
I managed to resolve this with the help of comments by #Kolban and #HarshManvar.
I assume this solution would also work for any other scripts that aren't working with direct calls from .customize_environment.
The example below is influenced by the answer found here. The code installs a specific node version.
Note: nvm is globally installed in Cloud Shell by default.
#!/usr/bin/bash
sudo su -c '. /usr/local/nvm/nvm.sh && nvm install 14'

Rundeck debconf-set-selection:

I'm using Rundeck 3.2.6-20200427 and set up a job for installing packages.
Because rundeck runs noninteractive I need to preset some parameters for installing packages (in my case iptables-persistent).
Before installing the package I run that command (for now only this parameter, I will use more parameters if I got that working):
echo iptables-persistent iptables-persistent/autosave_v4 boolean false | sudo debconf-set-selections
Unfortunatelly I got that error if I run rundeck-command
09:09:08 debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
09:09:08 Failed: NonZeroResultCode: Remote command failed with exit status 1
I'm absolute sure that there are no other task or running dpkg related process.
~$ lsof /var/cache/debconf/config.dat
~$
If I try to run that command directly, it works without any error. So I don't understand, why it is not working with rundeck.
I tried that on freshly installed host where I try to install packages (Ubuntu Server 20.04).
Here is my job definition: https://pastebin.com/YSu545tX
I found out that in the node-file, there was a typo so the job was running on wrong host and there were an apt-process, which was stuck.
There I checked with that command:
~$ sudo fuser -v /var/cache/debconf/config.dat
USER PID ACCESS COMMAND
/var/cache/debconf/config.dat:
root 5563 F.... frontend
Then I killed that process and corrected the node-file. Now it works.
I meet the same problem, but both 'fuser' and 'lsof' show nothing. finally finds out is dpkg lock that file, and use
ps aux | grep dpkg
to find that process and kill it.

grub2-mkconfig is taking fedora path instead of centos while installing centos7 via kickstart file and in UEFI mode

I am trying to install centos7 ISO using kickstart and ISO installation is working fine but during post installation setup procedure getting error when installing Bootloader.
BootLoaderError: failed to write boot loader configuration
Log shows,
efibootmgr -c -w -L CentOS 7 -d /dev/sda -p 1 -l \EFI\fedora\shimx64.efi
..
..
.
.
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
/sbin/grub2-mkconfig : line 244: /boot/efi/EFI/fedora/grub.cfg.new: No such file or directory
Any pointers why it is taking fedora inside the efibootmgr path and grub-mkconfig path. It should take centos instead of fedora.
I already checked that there is directory of centos at path /boot/efi/EFI/centos/
Thanks in advance.

Build Hyperledger Fabric with Docker on Mac

I'm trying to build Hyperledger Fabric images with Docker on Mac.
I installed prerequisites and git cloned fabric 1.4 and fabric-ca 1.4.
and I typed make docker inside of fabric directory.
When I did same on unbuntu virtual box, it had no problem.
However, I got error on Mac.(Mac Mojave 10.14.3)
Error log:
Building docker peer-image
docker build -t hyperledger/fabric-peer .build/image/peer
Sending build context to Docker daemon 33.35MB
Step 1/7 : FROM hyperledger/fabric-baseos:amd64-0.4.14 --->
75f5fb1a0e0c
Step 2/7 : ENV FABRIC_CFG_PATH /etc/hyperledger/fabric ---> Using cache
---> 07fffab66f6c
Step 3/7 : RUN mkdir -p /var/hyperledger/production $FABRIC_CFG_PATH
---> Using cache
---> 12db028c5850
Step 4/7 : COPY payload/peer /usr/local/bin
---> Using cache
---> 1182063498b1
Step 5/7 : ADD payload/sampleconfig.tar.bz2 $FABRIC_CFG_PATH
failed to copy files: Error processing tar file(bzip2 data invalid: bad
magic value in continuation file):
make: *** [.build/image/peer/.dummy-amd64-1.4.1-snapshot-348c677c1]
Error 1
I searched every web sites, but I cannot solve it.
Is there anyone know about this error ? I already tried: brew install gnu-tar --with-default-names and brew install lib tool.
brew install gnu-tar
brew install libtool
export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"

Resources