Could not validate a connection to Elasticsearch. No alive nodes found in your cluster - magento2

Platform: Magento 2 (V2.4.0) |
Server: Linux Centos
When I run the command below,
COMPOSER_MEMORY_LIMIT=-1 php bin/magento setup:static-content:deploy -f
I get the error,
Could not validate a connection to Elasticsearch. No alive nodes found in your cluster
When I run,
systemctl restart elasticsearch.service
I get the error,
Failed to restart elasticsearch.service: Unit not found.
And when I run the command,
systemctl status elasticsearch
I get the error,
Unit elasticsearch.service could not be found
However, I can see Elasticsearch folder and files in the following path:
vendor/elasticsearch/elasticsearch
Any suggestions?
Thank you!

Hi try using these commands, i use them on my ubuntu instance
sudo -i service elasticsearch start
service elasticsearch restart
sudo -i service elasticsearch stop

Related

Cinder Db Sync Timeout Error in OpenStack Installation

I am trying to install OpenStack on CentOS 7 using PackStack. The commands I am using for installation are:
sudo systemctl disable NetworkManager
sudo systemctl stop NetworkManager
sudo systemctl disable firewalld
sudo systemctl stop firewalld
sudo systemctl enable network
sudo systemctl start network
sudo yum update -y
sudo yum install centos-release-openstack-train
sudo yum install -y openstack-packstack
After this I am editing Neutron Db Sync timeout form 300 to 900, by using the command:
sudo nano /usr/share/openstack-puppet/modules/neutron/manifests/db/sync.pp
The last command I am using for installation is
sudo packstack --allinone
All installation goes well, but in the end getting the following error:
ERROR : Error appeared during Puppet run: 10.0.2.15_controller.pp
Error: /Stage[main]/Cinder::Db::Sync/Exec[cinder-manage db_sync]: Failed to call refresh: Command exceeded timeout
You will find full trace in log /var/tmp/packstack/20210527-145513-WSj_DO/manifests/10.0.2.15_controller.pp.log
Please check log file /var/tmp/packstack/20210527-145513-WSj_DO/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-20210527-145514.txt
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
The content of /var/tmp/packstack/20210527-145513-WSj_DO/manifests/10.0.2.15_controller.pp.log is uploaded here:
The content of /var/tmp/packstack/20210527-145513-WSj_DO/openstack-setup is uploaded here
Can someone help me out to resolve this error? Thanks in advance.

Failed to restart mongod.service : Unit mongod.service not found

There are a lot of variations for this question, on different forums. I tried a lot of things to get it to work. I am using AWS EC2 and MEAN by Bitnami, I tried connecting using Node JS and I realized that my monogodb service is not running. I checked it by running on the terminal (connected using Putty)
service mongod status
This is the error I get
mongodb.service Loaded:not-found (Reason: No such file or directory)
Active: inactive(dead)
To try my luck, I tried
sudo service mongod restart
And I get this error:
Failed to restart mongod.service : Unit mongod.service not found
Now, just to probe more I tried looking if I have this service installed.
I ran this command: ls /lib/systemd/system
And it gave a huge list, but I couldn't find mongod.service anywhere.
My Ubuntu Ver: 16.04
I am guessing it's not present or maybe I am looking for the wrong stuff. Please let me know how do I get the service to run. I am sort of new to MongoDB and Bitnami.
Each Bitnami MEAN stack includes a control script that lets you easily stop, start and restart services.
The script is located at /opt/bitnami/ctlscript.sh.
To start all services:
sudo /opt/bitnami/ctlscript.sh start
To start a single service:
sudo /opt/bitnami/ctlscript.sh start <service name>
So to answer your question:
sudo /opt/bitnami/ctlscript.sh start mongod
You can obtain a list of available services and operations by running the script without any arguments:
sudo /opt/bitnami/ctlscript.sh

How do run Mongo on Ubuntu Server, getting error

I have been trying to install MongoDB and have been following instructions on the Mongo docs, I am trying to start Mongo and I get this error
It appears as if it says that the "addr already in use"? I restarted my server and this still comes up I am unsure what to do next.
Stop the active mongod server and try it again:
sudo service mongod stop
sudo mongod

flocker-docker-plugin not working on centos7.2

I am trying to integrate flocker with docker, for that I found plugin flocker-docker-plugin. I installed it by using the commands on my flocker agents.-
$ yum install -y clusterhq-flocker-docker-plugin
$ systemctl enable flocker-docker-plugin
$ systemctl restart flocker-docker-plugin
It shows flocker-docker-plugin is running. However after few seconds when I checked status by using $ systemctl status flocker-docker-plugin, I got error saying
flocker-docker-plugin.service: main process exited, code=killed, status=11/SEGV
Based on the information you have given there could be multiple reasons for this error:
Check if you can reach the flocker control service and more so if your node-agents can reach the control-service.
Check if the flocker-dataset-agent and the flocker-container-agent are running on your nodes.
Check if you have provided certificates for the flocker-docker-plugin as mentioned on their site (https://docs.clusterhq.com/en/latest/docker-integration/generate-api-plugin.html).
While installing flocker i also got the same error as we have just installed the docker plugin and by default it does't start's up.
First use the command systemctl start flocker-docker-plugin and then check the running status of flocker using systemctl status flocker-docker-plugin
Make sure the control service and dataset agent are running correctly first, you can find logs by looking in /var/log/flocker/, journalctl -u flocker-dataset-agent or running flocker-diagnostics.
Read through any error in these logs such as communication with control service issues, certificates issues, agent.yml config issues etc, or feel free to post them for more help.
You can also find flocker-docker-plugin logs the same way to see specific errors that may be occurring.
Here is more information about how to debug flocker.

How do I make it so Mongo runs automatically all the time on my Azure server?

I have two Azure virtual machines. On one I have a Mongo server, on the other I just have a service I created which listens to Twitters streaming API and filters tweets.
Neither of these two services work unless I manually activate them and keep my console window open. For example, to run Mongo I need to ssh into my virtual machine and type: mongod --config /etc/mongod.conf. This starts the Mongo server successfully, but if at anytime I close my browser the service stops.
I believe the reason this is occurring is because when I login the system is allocating me a process by which I can navigate around the system and perform commands. When I type mongod --config /etc/mongod.conf I believe I am using that process to run Mongo. I am not sure how to make Mongo run without doing this though.
How do I make it so Mongo runs automatically all the time on my Azure server?
EDIT:
I tried running Mongo as a daemon but I receive an error:
$ mongod --fork --logpath /var/log/mongodb.log
>>>about to fork child process, waiting until server is ready for connections.
>>>forked process: 63470
>>>ERROR: child process failed, exited with error number 1
This issue has nothing to do with Azure; it's all about how you install MongoDB.
If you install mongodb as a service, via apt-get (or whatever other means your version of linux requires), then it will run independent of you being logged in. You shouldn't be running an always-on service through your command shell.
Here are instructions for installing under Ubuntu. You'll see that, once you set up the prerequisite public key and list file, you then run:
sudo apt-get install -y mongodb-org
You can then start and stop the service via
sudo service mongod start
and
sudo service mongod stop
You can enable mongo to autostart on boot by typing this command in your console:
sudo systemctl enable mongod
Then test it by this command:
sudo service mongod status