I'm trying to setup SOLR Cloud to work with my Sitecore 9.0 (Update-1) instance. I'm using 3 different VMs with [1-Zookeeper + 1-SOLR 6.6.2] configured on all machines.
we use following parameters for creating solrcloud service using NSSM
"start -cloud -p 8983 -z (servername):2181 -noprompt"
If I see in services.msc it is running all the time.
But when I see event logs it shows service stopped and started every minute.
same command working fine if executed from CMD.
Does the command I use is correct to create Solrcloud Nssm service?
One of my workmates had this issue. Solution to this is adding -f parameter. This page describes its purpose.
Related
I am following this blog to set up database environment for one of the cordapp.
https://www.corda.net/blog/cordapp-database-setup-development-perspective/
I have successfully pulled the postgre image in docker and also executed that. The container is up and also I logged in as superuser. Now, I am trying to execute the below scripts to create users using the below command but I am not sure whether it's working fine or not.
cat party_a.sql | docker exec -i postgres_for_corda psql -h localhost -p 5432 -U postgres
Can anyone please share some command through which I can check whether this particular user has been created or not. If it's not created then what are the steps I need to follow?
I think the problem here is that the computer is trying to run docker commands from the postgres shell (as the postgres user).
You'll need to open up a new terminal window in order to run commands as your normal user.
If you want to check if a user exists in postgres, take a look at this great cheat sheet: https://www.postgresqltutorial.com/postgresql-cheat-sheet/
the command you're looking for is this:
\du
I'm unableto add new custom attributes to the existing object in the Apache DS LDAP Server.
I have followed the below link and creating the schema.
http://directory.apache.org/apacheds/basic-ug/2.3.2-enabling-schema.html
The schema has been added in the apacheds but it is not showing while creating users.
Note:I'm unable to restart apacheDS. If I tried to restart the apacheds server it won't start again.
You've to restart ApacheDS after changes on the scheme were made. Without restart, no custom scheme is avaliable.
Linux
Use the init.d script:
sudo /etc/init.d/apacheds-${version}-default stop
${version}is the installed ApacheDS version. If you're not sure about this, try this command to find out how your init-script is named:
ls -lh /etc/init.d | grep apacheds
Windows
Open the services console by pressing [Ctrl] + [R] and enter services.msc. Search for an entry called ApacheDS - default and restart it by right click > restart service.
Note that in both cases default is the name of your ApacheDS instance. The software can run different instances, e.g. to run a second test instance. Per default we've only one instance called default. Use this name, if you didn't made any custom instances.
If this didn't solve your problem, please provide more information about the issue. The logs are a good point to start. Find more info about logging in ApacheDS here: http://directory.apache.org/apacheds/basic-ug/1.4.4-configure-logging.html
Is there a way to run a command in puppet master that will bring changes to the hosts right away?
I have used different scripts using crontab to schedule my tasks and it changes whenever I have specified, but I am trying to learn if there is a way I can just hit the command in puppet master and boom! bring changes in the hosts(clients) immediately.
Let's say I want to change password in "cofig.properties" file in my 5 hosts. What would be the best way to do it from master without scheduling?
At work we
push git versioned control repos to a puppetmaster using a jenkins job,
then we use r10k to retrieve the control repo puppet module & hiera dependencies,
then we connect remotely using SSH to each node we want to update to run the relevant "puppet apply" command
It works smoothly.
I've solved that problem in my infrastructure by using Puppet for Configuration Management and SaltStack for orchestration.
I have the Puppet Agent apply a SaltStack module to automatically configure each node as a minion of my Salt Master (which is also my Puppet Master), then I just SSH into my master server and tell SaltStack to run the Puppet Agent on nodes that match my criteria.
There are several SaltStack modules on the Puppet Forge.
You could certainly use other tools, such as RunDeck, or even Puppet's own MCollective, but I personally found them to be more complicated to work with.
Standard procedure to start with
meteor app -p 3000&
This works, except when I close the ssh connection, application is no more running? I have no clue why this is happening.
Awakening Edit:
I use PM2 for traditional node apps, but if I have to setup process monitors, logs, database all by myself. I could just go back to reactjs and socketio and rock it with node.
Consider use mup package from Arunoda to easily deploy and run your app in production.
You could launch meteor with nohup (no hang-up) which serves this purpose.
nohup meteor --production &
But it's not a good idea to run a site in production with meteor anyway.
What should I do to run meteor forever ?
You can use forever, a Node.js tool designed to run node apps as services.
I also want to point that forever is getting old and I've heard of better recent alternatives but it seems to still be a pretty common tool. You could also use systemd which integrates better with the UNIX service ecosystem but that's anoter story.
But first, you'll have to "demeteorize" your meteor application like this :
cd my-project-meteor
meteor bundle --directory ../my-project-node
this is going to take some time
cd ../my-project-node/programs/server
npm install
this is going to take some time too
So now you have a plain node app, that you can run with node main.js
Let me mention that it might be a good idea to use the node version used by meteor which is 0.10.29 as of meteor 0.9.1 You can install it traditionally or you could use the node version that is shipped with the meteor tool.
sudo ln -s ~/.meteor/packages/meteor-tool/1.0.27/meteor-tool-os.linux.x86_64/dev_bundle/bin/node /usr/bin/node
sudo ln -s ~/.meteor/packages/meteor-tool/1.0.27/meteor-tool-os.linux.x86_64/dev_bundle/bin/npm /usr/bin/npm
Note that this way of "installing" node + npm on your system is problematic because :
it assumes you're doing only meteor related stuff.
it is dependant on the release process of the meteor tool (you'll need to rerun these commends if the meteor tool is updated).
You can install the forever tool using npm :
-g means globally : give access to forever to all users on the system
sudo npm install -g forever
To launch your node app as a service, you can use the following command, which sets correctly some environment variables and run the app using forever :
sudo export PORT=80 MONGO_URL=mongodb://localhost/my-project-mongodb ROOT_URL=http://localhost forever start my-project-node/main.js
You can monitor it using forever stop my-project-node/main.js
Also, what's the point of using 3rd party database service like https://mongolab.com/?
When using the meteor tool, it launches a mongod process automatically for you, and the underlying node process executed by meteor representing your app connects to this mongo instance.
When we want to launch our meteor app as a node app, we have to handle the mongo stuff ourself, which kinda answer the question : why not using another service to handle it for us, they know better, right ?
Doesn't it slow down the website, because now application has to connect to their database instead of local database ?
Of course, relying on a 3rd party database service has its inconvenients, and this is one of them. Network communications will always be slower than interprocess communications taking place on localhost (this is especially true on these SSD backed cheap VPS you can find nowadays).
And how exactly do I connect to mongolab for example ?
By setting an appropriate value to the environment variable MONGO_URL, the database service provider will give you an url that corresponds to your online mongodb, this is what you need to pass to the node process in command line if you want meteor to connect to your distant database and work as usual.
If you want to launch a dedicated local mongod instance to let your application connect to it, well this is another topic but you'll have to follow these steps :
first install mongodb correctly on your server, using the reference documentation for the OS version. By correctly I mean choose the same version as meteor is using currently (2.4.9) and let it run as a service so that it will actually restart when your server reboots.
test that mongod is running by launching a client with the mongo command.
pass the correct MONGO_URL when launching your app with forever (something like mongodb://localhost/my-project-mongodb)
Understand now why meteor deploy is amazing :D
Answer copy from here
How can I install Elastic Kibana (which is just a batch file) as a windows service?
It probably needs to depend on the ElasticSearch process as well (this assumes I'm running it on the same server)
The following command will create the service with a name of "ElasticSearch Kibana 4.0.1" and make it depend on ElasticSearch so it doesn't try to start too soon.
sc create "ElasticSearch Kibana 4.0.1" binPath= "{path to batch file}" depend= "elasticsearch-service-x64"
The kibana.bat file delivered with Kibana 4.6.1 was not suited to use with sc create directly for me (Service start failed).
I used nssm like this
nssm install kibana461
UI: choose kibana.bat as Application Path
UI: select a log file to write to on "I/O" tab for stdout and stderr
UI: on the "Dependencies" tab enter elasticsearch241 (or whatever you called it)
UI: "Install Service"
sc start kibana461
Rather than creating a dependency, I made a delayed start.
First use the sc command (from jhilden).
sc create "Elasticsearch Kibana 4.4.2" binPath= "C:\kibana-4.4.2-windows\bin\kibana.bat"
Open services.msc and find your new service.
Right click the service and select Properties.
Change to Automatic (Delayed Start).
If you haven't already, change Elasticsearch to Automatic.
This will ensure elasticsearch will start when the machine starts, and kibana will start sometime soon after (approx 2 minutes from this question).
I found this video very helpful.
Use NSSM (Non-sucking Service Manager) to install Kibana as a Service.
https://www.youtube.com/watch?v=L-0A2cqTn-w