openwhisk postdeploy fails on single node ubuntu virtual machine - nginx

I am trying to run openwhisk serverless framework on a single node ubuntu vm.
I am following the instructions here.
I followed the instructions for database set up and then went over to the steps listed for ansible single node: (ansible/README.md)
Using the steps under "Deploy Using CouchDB", in the following step:
ansible-playbook -i environments/<environment> postdeploy.yml
I get an error in running installCatalog.sh
Looks like the URL 172.17.0.1 is not accesible. Where am I going wrong?
TASK [install the catalog from the catalog location] ***************************
Thursday 04 May 2017 10:41:29 +0000 (0:00:01.602) 0:00:09.063 **********
fatal: [ansible]: FAILED! => {"changed": true, "cmd": "./installCatalog.sh /home/techie/openwhisk/ansible/../ansible/files/auth.whisk.system 172.17.0.1 /whisk.system /home/techie/openwhisk/ansible/../bin/wsk", "delta": "0:00:01.840405", "end": "2017-05-04 10:41:32.380241", "failed": true, "rc": 7, "start": "2017-05-04 10:41:30.539836", "stderr": "error: Package update failed: Put 172.17.0.1/api/v1/namespaces/_/packages/websocket?overwrite=true: dial tcp 172.17.0.1:443: getsockopt: connection refused\nerror: Package update failed: Put 172.17.0.1/api/v1/namespaces/_/packages/combinators?overwrite=true: dial tcp 172.17.0.1:443: getsockopt: connection refused\nerror: Package update failed: Put 172.17.0.1/api/v1/namespaces/_/packages/watson-speechToText?overwrite=true: dial tcp 172.17.0.1:443: getsockopt: connection refused\nerror: Package update failed: Put 172.17.0.1/api/v1/namespaces/_/packages/utils?overwrite=true: dial tcp 172.17.0.1:443: getsockopt: connection refused\nerror: Package update failed:
.......
I ran docker ps after the deployment step. There were several dockers like zookeeper, kafka, etc. running. Is there supposed to be a nginx docker running too? In my set-up there was no nginx docker running.
In the config files, I have base url set to 172.17.0.1 - is this ok, or could it be something else?

I found that I needed to also run edge.yml after apigateway.yml and before postdeploy.yml to get the postdeploy script to work and then to be able to have the wsk tool work against the API endpoint.

Related

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,

Podman build command unable to pull image

I have configured Subuid and Subgid after installing Podman in RHEL7
I have created a simple Dockerfile to print hello world and was trying to build the image.
My Dockerfile
FROM alpine
CMD ["echo", "Hello World"]
To test I am running below command
Podman build -t imagename .
I see the below error received.
STEP 1: FROM alpine
Error: error creating build container: The following failures happened while trying to pull image specified by "alpine" based on search registries in /etc/containers/registries.conf:
* "localhost/alpine": Error initializing source docker://localhost/alpine:latest: error pinging docker registry localhost: Get https://localhost/v2/: dial tcp [::1]:443: connect: connection refused
* "registry.access.redhat.com/alpine": Error initializing source docker://registry.access.redhat.com/alpine:latest: error pinging docker registry registry.access.redhat.com: Get https://registry.access.redhat.com/v2/: read tcp 10.70.85.174:17758->23.54.147.129:443: read: connection reset by peer
* "registry.redhat.io/alpine": Error initializing source docker://registry.redhat.io/alpine:latest: error pinging docker registry registry.redhat.io: Get https://registry.redhat.io/v2/: read tcp 10.70.85.174:36028->104.79.150.216:443: read: connection reset by peer
* "docker.io/library/alpine": Error initializing source docker://alpine:latest: error pinging docker registry registry-1.docker.io: Get https://registry-1.docker.io/v2/: read tcp 10.70.85.174:53352->18.213.137.78:443: read: connection reset by peer
Am I missing any configuration ?
Thanks
Have you still the docket Daemon running and/or docker installed?
First stop the docker Daemon
sudo systemctl stop docker
OR
sudo service docker stop
Then uninstall docker
Ubuntu here but what ever you need you can Google :D
sudo apt-get remove docker docker-engine docker.io containerd runc
Try again,
If other fail now try a refreshed install of podman
sudo --reinstall install podman
Sources
https://www.cyberciti.biz/faq/debian-ubuntu-linux-reinstall-a-package-using-apt-get-command/
https://askubuntu.com/questions/935569/how-to-completely-uninstall-docker
https://intellipaat.com/community/43965/how-to-stop-docker
https://podman.io/getting-started/installation
I suggest that you first search your image in registries
podman search alpine
you should get a list of images available. Choose the one you want - version, name, tag etc and put that in the dockerfile.
to be sure it is accessible, do the 'pull' manually
podman pull alpine<version,tag>

GRPCwebProxy and Iroha

I have running the IROHA node on my local ubuntu machine with docker and I am able to run all commands using docker shell.
I want to have JS implementation of Iroha so I have run the dockerfile for GRPC but it is not able to connect to IROHA,
error:
WARN[1672] [core] grpc: addrConn.createTransport failed to connect to {dev.localdomain:50051 dev.localdomain:50051 <nil> 0 <nil>}. Err: connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:50051: connect: connection refused". Reconnecting... system=system
[GRPC console][2]
I resolved GrpcWebProxy by making some changes in already provided solution, now you can see it here:
https://github.com/AqeelKazmi/IrohaDockerServices

Rabbitmq: Node down

I am getting node down error on rabbitmq, this is happening sometimes.
Able to see the below error when I execute: sudo rabbitmqctl status or sudo rabbitmqctl list_queues
Error: unable to connect to node : nodedown
connected to epmd (port 4369) on host-name
epmd reports node 'rabbit' running on port 25672
can't establish TCP connection, reason: timeout
suggestion: blocked by firewall?
version: {rabbit,"RabbitMQ","3.6.9"}
os: Ubuntu 16.04
I have checked hostname which is ok with me, not changed since the installation
Also able to telnet localhost 25672
What could be the reason behind this error and possible solution?
And one more question, I am checking node status using below API
curl -s GET http://edx:edx#127.0.0.1:15672/api/healthchecks/node/
Is above API ok or not to check the health status of the node? Please suggest if there is anything else. I have set up one shell script which will call this API and if status is not ok then it will restart rabbitmq-server service. Script is executed from cron every minute.
Looks like your rabbitmq node is... down. rabbitmqctl needs a running node to perform these commands.
If you're using systemd, you can check the service status:
service rabbitmq-server status
Or just try to restart the node:
rabbitmqctl start_app
Telnet on port 25672 tells you the rabbitmqctl is running, but RabbitMQ itself does not run on that port (by default, it's listening on 5672).

ICp 2.1.0.1: Installation failed with error TASK [master: Waiting for MariaDB service to start]

I am installing ICp 2.1.0.1 and I received an error at the TASK
[master: Waiting for MariaDB service to start] msg: The MariaDB
component failed to start.
After this msg the installation completed with failed status.
We are installing ICp with 3 Masters, 3 Proxies and 2 Workers. We have 1 IP for VIP master and 1 for VIP proxy.
I tried to install multiple times and all installations got the same error.
For prior issues with that error, the correct db admin password was not used. So check the db user and password to resolve issue.
Would you validate whether each master host was able to access port 3306 on the other hosts?
If you run with .. install -vv | tee -a install-log.txt, do you get additional details as well?
The error was solved by following the steps below.
Check whether kubelet is running:
Log in to your master node.
Run the following command to check kubelet status:
systemctl status kubelet
If kubelet is not running, run the following command to get the logs:
journalctl -u kubelet &> kubelet.log
We found the error in the kubelet.log log:
Error: failed to run Kubelet: Running with swap on is not supported, please disable swap! or set --fail-swap-on flag to false.
We found this troubleshoot in this link, and the solution at the ICP issue 4651.
https://www.ibm.com/support/knowledgecenter/en/SSBS6K_2.1.0/troubleshoot/etcd_fails.html
https://github.ibm.com/IBMPrivateCloud/roadmap/issues/4651

Resources