Windows could not start Elastic search service locally - elasticsearch

I was getting this windows service error due to a recent Java update on my local machine.

I was finally able to resolve it by following the steps below:
Go to 'System Environment Variables'
Verify 'JAVA_HOME' is pointing to the correct location. If not, change it.
C:\Program Files\Java\jdk-13.0.1
Go to the 'bin' folder for elastic-search-7.4.2 and run below commands to remove and reinstall the service.
C:\elasticsearch-7.4.2\bin elasticsearch-service.bat remove
C:\elasticsearch-7.4.2\bin elasticsearch-service.bat install

Related

kubectl not working on my windows 10 machine

When I try to run any kubectl command including kubectl version, I get a pop-up saying "This app can't run on your PC, To find a version for your PC, check with the software publisher" when this is closed, the terminal shows "access denied"
The weird thing is, when I run the "kubectl version" command in the directory where I have downloaded kubectl.exe, it works fine.
I have even added this path to my PATH variables.
thank you for the answer, #rally
apparently, in my machine, it was an issue of administrative rights during installation. My workplace's IT added the permission and it worked for me.
Adding this answer here so that if anyone else comes across this problem they can try this solution as well.
Not knowing what exactly you downloaded, i would suggest you to delete everying in the folder and follow the instructions for installing kubectl for Windows from here:
https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/
Note: downloading the .exe is not enough. You need a kubeconfig file "config", which contains the configuration to access your cluster.
kubectl looks for this file in a hidden folder under your user profile directory. c:\users<me>.kube.
Just to let you try, i would suggest you to activate Kubernetes in your Docker-Desktop installation. I guess you have this installed. If not install it from the Dockersite. https://www.docker.com/products/docker-desktop/
Activating Kubernetes inside Docker-desktop, will install also kubectl and save the config in the .kube folder.
After the installation finished, in a new terminal:
kubectl get node
You should see the 1 node in the kubernetes-docker-desktop cluster.
Now if you want to access another cluster, you need the kubeconfig-file for that cluster. If you have it, just rename the config in the .kube folder (to not loose it) and put the other config inside.
If the new config file is correct you should be able to access that cluster.
The config file can be structured to hold more than one cluster configuration and you can switch between them using a so called context.
Here you can get the information how to do that, according to your needs:
https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/
Hope this can help you, starting with KUbernetes.

Git installation failed [duplicate]

I am new here and i will try to explain my question kindly ignore any mistakes.
I am using git version git-2.8.2
It worked fine for one day then this problem occurs.
I am using gcloud repository.
First I tried gcloud clone command then this error occurs
Then to make sure git is there I tired git command then this error occurs
Then I double check by opening git Bash but same error was there too.
I tried reinstalling changing directory. but nothing works.
I face the same problem after I try to avoid memory leak in Windows 10. If you happened to change the regedit like me, just type regedit in the search then go to
HKEY_LOCAL_MACHINE -> SYSTEM -> ControlSet001 -> Services -> Null
change the value of Start to 1.
I accidentally bumped into the same problem when I was sorting out the services running on my computer with Windows 10.
fatal: open /dev/null or dup failed: No such file or directory
The reason was that I deleted the service named 'Null' that had no description as I thought that was a virus service.
Thus, when I found my git unable to operate, I reckoned the deleted service.
According to a solution provided on some site I tried to run the service again using cmd.exe
sc config Null start= system
sc start Null
but it said the service hadn't been existed in the list.
Thankfully, there are some kind folks who shares the information of the default services running on Windows 10 and the description necessary for the successful bringing back the service.
So as to get the service back in the list:
press Win + R
type regedit
go to HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services section
Create Null folder and all the params it needs.
Restart your computer.
Now you got your Null service back and your git back as well.
Hope this helps.
I solved my problem accidentally. I would like to share it with everyone.
It was not a problem of git or gcloud or source tree.
Actually I have forcefully stooped windows update from installing which causes this problem.
Now when I install windows updates again this problem is fixed now.
Maybe this helps someone.
the similar situation in chrooted linux tree is fixable following way:
cd inside the folder where you are preparing the chroot dir, then
mount -o bind /dev dev/
then only chroot inside
I had this weird bug just now. I went back a dir and tried git init, it worked there.
I re-ran zsh and tried again in the dir it errored in originally and it worked. shrugs

How do I configure Composer to use a different path on Windows when my Application Data folder is remote?

When I install composer on Windows 10, with active directory (meaning some of my user files live off on a server elsewhere), I get the following error when attempting to install:
Installation failed, deleting ./composer.json.
[InvalidArgumentException]
$from (\AD.LOCAL\SYSTEM\Users[path]\Application Data\Composer\ad.local\system\Users[path]\Applicat
ion Data\Composer\vendor\bin/boris) and $to (\AD.LOCAL\SYSTEM\Users[path]\Application Data\Composer\vendor
[path]\boris\bin\boris) must be absolute paths.
...very likely because my "Application Data" folder is not on my local machine.
How can I get around this. Windows composer install doesn't give me much in the way of options.
(Or, alternately, if I'm misinterpreting the cause of the problem, what is actually going on and how do I fix it?)
If your issue was during the installation there is a flag that allows you to set the installation directory.
The bin file from the path in the error message vendor/bin/boris doesn't look familiar to me and I am going to assume you completed an installation and a command had failed. There is a COMPOSER_HOME environment variable that impacts where a number of items are stored. This defaults to ${APPDATA}/Composer, if there are issues writing under that path for any reason, you can change the path by setting the COMPOSER_HOME variable for your user.
Created a local windows admin account, installed the functions from that account, and then put the local admins roaming folder in my PATH. Ugly, but effective.

Using and running Tortoise svnsync in Windows via command line

I have a local repository and I have just signed up to unfuddle and want to sync my local repository to the new one I have created on there.
I was told to run the following command:
svnsync init --username USERNAME http://username.unfuddle.com/svn/username-rep http://SOURCE_REPO_URL
Firstly, I assume I can remove the username stuff if the source repository doesn't require authentication?
Secondly, when I run that command my system doesn't recognize it. I assumed svnsync needed to be added somewhere in Windows so that it could be run via it's name only (think the correct term is an environment variable)?, but not only do I not know how to do that I don't know what program to add...... I cannot find any svnsync.exe or anything locate din my TortoiseSVN folder.
What do I need to do here?
When you install TortoiseSVN you are given the option to install the Subversion binaries as well:
Once you do that, you will see svnsync.exe in the installation folder:
As long as you have C:\Program Files\TortoiseSVN\bin in your PATH variable, you will be able to call svnsync.exe from the command-line:
(You can view your PATH variable thus (on Windows 7): Start -> right-click Computer -> Properties -> Advanced system settings -> Environment variables.... DO NOT overwrite whatever is there - simply append the path to TortoiseSVN if it isn't already there. More info here.)
Hope this helps.

Starting Tomcat add-on XAMPP not working

I installed XAMPP 1.7.7, including:
Apache 2.2.21
MySQL 5.5.16
PHP 5.3.8
phpMyAdmin 3.4.5
FileZilla FTP Server 0.9.39
Tomcat 7.0.21 (with mod_proxy_ajp as connector).
My all other services work expect for Tomcat.
Things that I did right now, to fix this:
I realized that I did not had java on my computer, as on command prompt there was no path for java. So I installed JAVA 1.7.0 and also set the "Environment path".
But still its not getting started.
Any help would be appreciated.
Regards
Zeeshan
Assuming windows os,
Step 1. Create/edit an environment variable JAVA_HOME with path to jdk (important:- not to \bin but just c:\java\jdk_1_7_0 and dont put semicolon at the end).
step 2. Create/edit an environment variable JRE_HOME with path to jre (important:- again not to \bin but just the folder where bin is located and no semicolon in the end).
step 3. Create/edit an environment variable path that should be added like this,
< all the previous path stuff's >;%JAVA_HOME%/bin;.;
The xampp tomcat looks for %JAVA_HOME% or %JRE_HOME% individually, so just setting the path and classpath variables, up to the bin folder, will not work here. It works for standard Apache tomcat only.
Also, the your version of xampp have disabled the users by default. Enable it by un-commenting the user part in the x:\xampp\tomcat\conf\tomcat-users.xml
You need to execute manually following bat file
c:\xampp\catalina_start
or
put
catalina_start ,
catalina_stop
in XAMPP control panel start up
I had the exact same problem and it was caused by running a 32 bits Tomcat on a 64 bits windows. (I was using XAMPP 1.8.3 in a Windows 8 64 bits.)
First:
Make sure you have JAVA_HOME system variable pointing to your jdk folder (not the \bin);
Make sure %JAVA_HOME%\bin; is in your %PATH% system variable.
The solution:
Uninstall the Tomcat7 service if you have installed it already;
Download a 64 bit version of Tomcat 7 for windows (check this link to get the latest - I used the 7.0.42 version);
Replace the tomcat7.exe and tomcat7w.exe files of the C:\xampp\tomcat\bin folder with those present in the recently downloaded zip file.
Now you can install the service as usual (through XAMPP control panel, if you use it) and it should start just fine.
Just run the catalina.bat under the directory of C:\xampp\tomcat>
C:\xampp\tomcat>catalina.bat
CURRENT_DIR=%cd%"
set "CATALINA_HOME=%CURRENT_DIR%"
Since %cd% echo the current directory.
In environment variable add all these variable then catalina_start.bat will work
Variable Key
JAVA_HOME your java-jdk address
JRE_HOME your java-jre address
Path your java-jdk address ; your java-jre file address ; your java-jre/bin address ; our java-jdk/bin
It took me almost 5hours to find the method to let xampp-tomcat to start :'(

Resources