Cannot start child instances in Apache Karaf - apache-karaf

I may have a problem creating 'instances' in Apache Karaf 2.3.0.
karaf#root> admin:create FOO
...<some verbose lines on file copy activity>...
karaf#root> admin:list
This is what I got:
SSH Port RMI Ports State Pid Name
[ 8101] [1099/44444 ] [Started ] [ 5168] root
[ 8107] [1105/44450 ] [Stopped ] [ 0] FOO
karaf#root>
I tried admin:start FOO but nothing happens.
Karaf.log didn't indicate any errors.
Am I missing something? I was following 'Getting Started' guide on karaf.apache.org.
Could it be a bug?

You need to start the new instance
admin:start FOO
Cheers

Related

Installing Xray and configure with Jfrog Artifactory using Docker compose

We were trying to Integrate Xray with our Jfrog Artifactory. In Amazon Linux 2 we are trying to install with docker compose,while we run the config.sh
After running the bellow docker compose commands
start rabbitmq: docker-compose -p xray-rabbitmq -f docker-compose-rabbitmq.yaml up -d
start postgresql: docker-compose -p xray-postgres -f docker-compose-postgres.yaml up -d
start: docker-compose -p xray up -d
xray router is getting restarting after 20sec with following error:
We have checked whether any selinux, firewalld, or iptables are blocking,but all are in disable state.
Can someone help us to resolve the issue?
Now Private IP is able to reach Artifactory server,we have created Xray in same VPC of Artifactory.
Now all containers of Xray are running in Xray server,but now we have a different issue.
In xray server container we are getting the below logs
2021-08-12T13:41:17.601Z [jfxr ] [INFO ] [469946e5f04dd2c6] [updates_service:486 ] [main ] Initializing JFrog vendor
2021-08-12T13:41:17.700Z [jfxr ] [ERROR] [ ] [bin_mgr_cache:50 ] [main ] Failed to get binary managerid:failed on GetAllBinaryManagerIds query
--- at /go/src/jfrog.com/xray/internal/dbaccess/dao/binary_managers_dao.go:367 (binMgrDao.GetBinaryManagerId) ---
Caused by: not found
2021-08-12T13:41:17.701Z [jfxr ] [ERROR] [ ] [bin_mgr_cache:59 ] [main ] Failed to get binary manager'' version, err :failed to fetch binary manager
--- at /go/src/jfrog.com/xray/internal/dbaccess/dao/binary_managers_dao.go:290 (binMgrDao.GetBinMgrByID) ---
Caused by: not found
2021-08-12T13:41:17.701Z [jfxr ] [WARN ] [ ] [indexed_resources_cache:36 ] [main ] Failed to get binary managerfor cache:failed to fetch binary manager
--- at /go/src/jfrog.com/xray/internal/dbaccess/dao/binary_managers_dao.go:290 (binMgrDao.GetBinMgrByID) ---
Caused by: not found
Any idea on this?
#praseeb It appears you are giving JFrogURL as the node IP of xray. It should be the reachable URL of artifactory from the xray machine, Please pick it from Admin > Security > Settings as indicated.
I had similar issue with some custom Docker Compose files.
It was a network issue, the containers (server, indexer, analysis, persist) did not start in the same network as the router. This occurs because I use docker-compose [...] --no-start.
With the --no-start option, the network_mode: service:router was ignored and the containers goes to the default bridge network. So they cannot communicate with the router on local ports (8046, etc).

Openstack/Packstack install error on CentOS 7

For the past few days, I've been trying to install Openstack with Packstack on Centos 7 running through Oracle's Virtual Box on my linux distro. I've downloaded the CentOS 7 DVD image, and installed the server with gui type (including some some features that I now can't remember) and ran these commands as root:
systemctl disable firewalld
systemctl stop firewalld
systemctl disable NetworkManager
systemctl stop NetworkManager
systemctl enable network
systemctl start network
At first, internet worked fine. After disabling and stopping the NetworkManager service, I couldn't access the internet anymore; I've edited the config file /etc/sysconfig/network-scripts/ifcfg-enp0s3 so that now it looks like this:
TYPE=Ethernet
PROXY_METHOD=no
DNS=yes
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s3
NM_CONTROLLED=no
UUID=1ce94676-c997-4772-9253-a3ac48a7814f
DEVICE=enp0s3
ONBOOT=yes
HWADDR=08:00:27:A5:FA:0F
DNS1=208.67.222.222
DNS2=208.67.220.220
PEERDNS=no
DOMAIN=localdomain
And the /etc/resolv.conf file (which was empty btw) and added the lines:
nameserver 208.67.222.222
nameserver 208.67.220.220
search localdomain
After this, internet seems to be working fine on the VM, so I began installing packstack with the following commands (as root as always):
yum install -y centos-release-openstack-train
dnf update -y //dnf wasn't present, so I installed it.
dnf install -y openstack-packstack
There had been no issues to this point. Sorry for the long post, I'm trying to include everything I did.
Now, when I run (as root) packstack --allinone to install packstack I get the following output:
[root#localhost smaug]# packstack --allinone
Welcome to the Packstack setup utility
The installation log file is available at: /var/tmp/packstack/20210701-104910-If_Lz5/openstack-setup.log
Installing:
Clean Up [ DONE ]
Discovering ip protocol version [ DONE ]
Setting up ssh keys [ DONE ]
Preparing servers [ DONE ]
Pre installing Puppet and discovering hosts' details [ DONE ]
Preparing pre-install entries [ DONE ]
Setting up CACERT [ DONE ]
Preparing AMQP entries [ DONE ]
Preparing MariaDB entries [ DONE ]
Fixing Keystone LDAP config parameters to be undef if empty[ DONE ]
Preparing Keystone entries [ DONE ]
Preparing Glance entries [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ DONE ]
Preparing Cinder entries [ DONE ]
Preparing Nova API entries [ DONE ]
Creating ssh keys for Nova migration [ DONE ]
Gathering ssh host keys for Nova migration [ DONE ]
Preparing Nova Compute entries [ DONE ]
Preparing Nova Scheduler entries [ DONE ]
Preparing Nova VNC Proxy entries [ DONE ]
Preparing OpenStack Network-related Nova entries [ DONE ]
Preparing Nova Common entries [ DONE ]
Preparing Neutron API entries [ DONE ]
Preparing Neutron L3 entries [ DONE ]
Preparing Neutron L2 Agent entries [ DONE ]
Preparing Neutron DHCP Agent entries [ DONE ]
Preparing Neutron Metering Agent entries [ DONE ]
Checking if NetworkManager is enabled and running [ DONE ]
Preparing OpenStack Client entries [ DONE ]
Preparing Horizon entries [ DONE ]
Preparing Swift builder entries [ DONE ]
Preparing Swift proxy entries [ DONE ]
Preparing Swift storage entries [ DONE ]
Preparing Gnocchi entries [ DONE ]
Preparing Redis entries [ DONE ]
Preparing Ceilometer entries [ DONE ]
Preparing Aodh entries [ DONE ]
Preparing Puppet manifests [ DONE ]
Copying Puppet modules and manifests [ DONE ]
Applying 192.168.112.221_controller.pp
192.168.112.221_controller.pp: [ ERROR ]
Applying Puppet manifests [ ERROR ]
ERROR : Error appeared during Puppet run: 192.168.112.221_controller.pp
Notice: /Stage[main]/Nova::Db::Sync/Exec[nova-db-sync]/returns: Error: (pymysql.err.OperationalError) (1045, u"Access denied for user 'nova'#'192.168.112.221' (using password: YES)") (Background on this error at: http://sqlalche.me/e/e3q8)
You will find full trace in log /var/tmp/packstack/20210701-104910-If_Lz5/manifests/192.168.112.221_controller.pp.log
Please check log file /var/tmp/packstack/20210701-104910-If_Lz5/openstack-setup.log for more information
Additional information:
* Parameter CONFIG_NEUTRON_L2_AGENT: You have chosen OVN Neutron backend. Note that this backend does not support the VPNaaS or FWaaS services. Geneve will be used as the encapsulation method for tenant networks
* A new answerfile was created in: /root/packstack-answers-20210701-104911.txt
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
* File /root/keystonerc_admin has been created on OpenStack client host 192.168.112.221. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://192.168.112.221/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
It seems a DBAPI Operational Error, as pointed by http://sqlalche.me/e/e3q8, but that seemed off for some reason (I didn't even complete the installation of openstack through packstack and the error message points to a kind of runtime error to my knowledge). Investigating the log file /var/tmp/packstack/20210701-104910-If_Lz5/manifests/192.168.112.221_controller.pp.log gave the following result:
[1;33mWarning: /Stage[main]/Aodh::Deps/Anchor[aodh::service::end]: Skipping because of failed dependencies[0m
[1;33mWarning: /Stage[main]/Placement::Deps/Anchor[placement::service::end]: Skipping because of failed dependencies[0m
[1;33mWarning: /Stage[main]/Keystone::Cron::Fernet_rotate/Cron[keystone-manage fernet_rotate]: Skipping because of failed dependencies[0m
[1;31mError: Failed to apply catalog: Execution of '/usr/bin/openstack domain list --quiet --format csv' returned 1: Unable to establish connection to http://127.0.0.1:5000/v3/domains?: HTTPConnectionPool(host='127.0.0.1', port=5000): Max retries exceeded with url: /v3/domains (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7ff001fce090>: Failed to establish a new connection: [Errno 111] Connection refused',)) (tried 36, for a total of 170 seconds)[0m
If I try to connect with telnet localhost 5000 I'm greeted by the following:
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
However, everything seems fine if I connect normally without specifying the port.
If the connection is refused,I thought, then port 5000 is not open/nothing is listening on it. And so tried to open it and move on with the installation.
Here lies the arcanum: no matter what I do, the connection is always refused.
I tried to open the port to the loopback and the main internet device (enp0s3), but nothing. I tried, even if it dind't make sense, to restart the firewalld service to add the port with firewall-cmd --zone=public --add-port=5000/tcp --permanent and still the connection was refused with telnet.
iptables-save | grep 5000 yields the following:
-A INPUT -i lo -p tcp -m tcp --dport 5000 -j ACCEPT
-A INPUT -i enp0s3 -p tcp -m tcp --dport 5000 -j ACCEPT
-A INPUT -p tcp -m multiport --dports 5000 -m comment --comment "001 keystone incoming keystone" -j ACCEPT
Looking at this, there seems to be rules that allow communication on port 5000, but the connection is refused still and the install of openstack keeps halting.
To add some more info lsof -i :5000, ss -antup | grep 5000 and netstat -lntu | grep 5000 do not produce any output, so this means (If I understand correctly) that no process is listening on that port and/or that port is still closed.
I'm confused on what to do, can you help?
Thanks,

Ansible Ad-Hoc command with ssh keys

I would like to setup ansible on my Mac. I've done something similar in GNS3 and it worked but here there are more factors I need to take into account. so I have the Ansible installed. I added hostnames in /etc/hosts and I can ping using the hostnames I provided there.
I have created ansible folder which I am going to use and put ansible.cfg inside:
[defaults]
hostfile = ./hosts
host_key_checking = false
timeout = 5
inventory = ./hosts
In the same folder I have hosts file:
[tp-lab]
lab-acc0
When I try to run the following command: ansible tx-edge-acc0 -m ping
I am getting the following errors:
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
[WARNING]: Unhandled error in Python interpreter discovery for host tx-edge-acc0: unexpected output from Python interpreter discovery
[WARNING]: sftp transfer mechanism failed on [tx-edge-acc0]. Use ANSIBLE_DEBUG=1 to see detailed information
[WARNING]: scp transfer mechanism failed on [tx-edge-acc0]. Use ANSIBLE_DEBUG=1 to see detailed information
[WARNING]: Platform unknown on host tx-edge-acc0 is using the discovered Python interpreter at /usr/bin/python, but future installation of another Python interpreter could change the meaning of that path. See
https://docs.ansible.com/ansible/2.10/reference_appendices/interpreter_discovery.html for more information.
tx-edge-acc0 | FAILED! => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"module_stderr": "Shared connection to tx-edge-acc0 closed.\r\n",
"module_stdout": "\r\nerror: unknown command: /bin/sh\r\n",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 0
Any idea what might the problem here? much appreciated
At first glance it seems that you ansible controller does not load configuration files (especially ansible.cfg) when playbook is fired.
(From documentation) Ansible searches for configuration files in the following order, processing the first file it finds and ignoring the rest:
$ANSIBLE_CONFIG if the environment variable is set.
ansible.cfg if it’s in the current directory.
~/.ansible.cfg if it’s in the user’s home directory.
/etc/ansible/ansible.cfg, the default config file.
Edit: For peace of mind it is good to use full paths
EDIT Based on comments
$ cat /home/ansible/ansible.cfg
[defaults]
host_key_checking = False
inventory = /home/ansible/hosts # <-- use full path to inventory file
$ cat /home/ansible/hosts
[servers]
server-a
server-b
Command & output:
# Supplying inventory host group!
$ ansible servers -m ping
server-a | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"ping": "pong"
}
server-b | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"ping": "pong"
}

~/.ssh/id_rsa.pub not found error while installing capistrano as ansible playbook

I try to install https://github.com/roots/bedrock-ansible to get a bedrock deployment (http://roots.io/wordpress-stack/) running.
When I run "vagrant up", after some time I get the error:
TASK: [capistrano-setup | Setup deploy group] *********************************
skipping: [default]
TASK: [capistrano-setup | Setup deploy user] **********************************
skipping: [default]
TASK: [capistrano-setup | Adding public key to server] ************************
fatal: [default] => could not locate file in lookup: ~/.ssh/id_rsa.pub
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit #/Users/johannes/site.retry
default : ok=46 changed=16 unreachable=1 failed=0
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
I do not have a clou how i can fix this. Do you have an idea?
It seems the role is trying to find your local public key. It should be in the location in the error message '~/.ssh/id_rsa.pub', but it's not. So either you don't have one, or you keep it in another location.
If you're not familiar with generating SSH keys you probably don't have one. I personally like the GitHub help page for this: https://help.github.com/articles/generating-ssh-keys/
(you only have to perform steps 1 and 2).
If you do have SSH keys, but in a different location, the capistrano-install role in bedrock uses some variables:
deploy_user: deploy
deploy_keys:
- "~/.ssh/id_rsa.pub"
So you can set (multiple) public key files in the deploy_keys list and they will be added to the deploy_user's authorized keys.
All this is needed because Capistrano will use the deploy user to connect to the remote server later. http://blakesmith.me/2010/02/08/understanding-public-key-private-key-concepts.html

Failed to bind to '127.0.0.1:6600': Address already in use

I'm using ubuntu 12.10 for my MPI(message passing interface) configuration I have installed mpd after installation I have start mpd, it is started normally no error message display but when I'm trying to run the command "mpd &" it gives me error message "Failed to bind to '127.0.0.1:6600': Address already in use" I have tried many solutions but the result is same.
root#ub0:~# service mpd start
Starting Music Player Daemon mpd
[ OK ] root#ub0:~# service mpd restart
Stopping Music Player Daemon mpd
[ OK ] Starting Music Player Daemon mpd
[ OK ] root#ub0:~# mpd &
[1] 2881 root#ub0:~# Failed to bind to '127.0.0.1:6600': Address
already in use
[1]+ Exit 1 mpd
root#ub0:~#
If you're using an old enough version of MPICH, the launcher is called MPD, which appears to conflict with something else you have installed on your system. I could try to help you with that, but the best answer is that you're using a very old version of MPICH and you should update. 3.1.1 came out yesterday. Give that a shot.

Resources