How do I stop Mercurial's "hg serve -d" service under Windows? - windows-services

I'm technically savvy but don't have extensive experience with servers/daemons (I'm a Windows guy, so...command lines intimidate me).
I started a Mercurial server using the hg serve -d command, and all was well.
Now, I want to stop it, and can't find a process to kill. Does anybody know the process name or a relatively simply CLI command to get it done?

Here's a link to stop and start the Mercurial server via command line
https://www.mercurial-scm.org/wiki/hgserve
The information you're looking for is at the bottom of the page.

You can choice one of below ways:
1: You must enter Processes tab in Window Task Manager and try to kill process which names hg.exe, its description is Mecurial Distributed SCM.
Note: I sent ps -W | grep hg to cygwin to find it. Hope this way can help you
2: Another way, you can using ToitorseHg to start and stop server instead using command line hg serve
[ Open ToitorseHg -> Repository -> Web Server ]
Good luck

Did you try accessing the "Services" GUI? Not sure if mercurial shows up there, but its worth a try...
Start -> Administrative Tools -> Services
If Administrative Tools does not show up, right click the taskbar, click properties, click "start Menu" and customize. Then check "Show Administrative Tools". This is from memory since our IT department prevents us average users from doing this :-)
Good luck

Related

Fail Connect to Running Phoenix Applications with IEx Remote Shell at Docker

Im deploy phx app using docker, running --remsh command from within the same container.
But it return could not contact remote node.
Anybody know the solution ?
Here is the snapshot
You seem to start the application as :nonode#nohost. To connect to it, you should have it started with either a short or fully qualified name.
mix release.init creates rel folder with two template files in it. Check env.sh.eex and make sure you start a release with a short name given. This should work:
export RELEASE_DISTRIBUTION=sname
export RELEASE_NODE=<%= #release.name %>
Sidenote: please post everything as plain text, not as images.
There is a problem in your command, please use --cookie instead of -cookie

PsExec is not recognized as an internal or external command

I have a job that needs to run a script on a remote computer. I'm doing so by using psexec via "Execute windows batch command":
C:\PsExec.exe \\computername -u username -p password -accepteula c:\xxx.exe
When I run the job I get the following error:
c:\PsExec.exe is not recognized as an internal or external command
** PsExec.exe is located under c:\
Any ideas?
First Define psexec.exe path in environment varaiable "PATH" or else place psexec.exe file in C:\Windows\System32\
And to Download Psexec.exe file
https://download.sysinternals.com/files/PSTools.zip
One possible explanation is the version of PsExec.exe: 32bits or 64bits.
If you have the 32 one on a 64bits machine, that command would not be recognized indeed. PsExec64.exe would.
I can see the age of this question and my answer may not be relevant to this topic since I was technically trying to solve a different problem, but maybe this will help other people who are stuck.
c:\PsExec.exe is not recognized as an internal or external command
I was trying to disable the Maintenance Configurator with PSExec (my problem is the never ending maintenance bug) and kept running into the same error as the OP BUT I got PSexec64 to run this command:
C:\PsExec64.exe -s schtasks /change /tn >"\Microsoft\Windows\TaskScheduler\Maintenance Configurator" /DISABLE
BY checking the "Run this program as an administrator" option under the Compatibility settings for "PsExec64.exe"
Don't know if this has solved my problem yet, but I think the OP would have been able to run his process if he had done this. Dear OP did you ever solve that?

Terminal not responding in Cloud9 IDE Rails

I'm working my way through the Ruby on Rails Tutorial, and suddenly the terminal is not responding to common commands.
Entering commands like "bundle exec rake test" or "rails console" creates the situation in the screenshot below and waiting hours does not change anything.
http://i59.tinypic.com/2poz5ah.png
I can type on the line but the Terminal still doesn't respond to any commands here. Ctrl+C allows me to escape the previous request and get back to the command line.
Strangely, "git status" works fine and quick.
Any ideas how to fix this?
I've tried restarting the Terminal and re-loading the workspace.
I just ran into the same problem two times (also going thru the Rails Tutorial) and here's how I went about adressing it:
Click on the workspace button in the top right corner- that's where it shows your CPU, Memory & Disk Usage (if you're on a laptop/small screen zoom out or make the screen as wide as possible to view that).
Next click on the "show process" button to see active processes.
After that I "force killed" my bash and ruby processes.
Lastly I clicked the "restart" button, which you see that when you first clicked to see the workspace info. Please note that if I went first to clicking this "restart" it had no effect... I had to force kill... THEN resart...
Viola, two times now it worked!
Not sure if this has any impact, but both times I mentally retraced my steps and realized I had several terminal windows open and willy-nilly ran the console multiple times in different terminal windows over the course of a few days. I would then run into not being able to run rails c UNLESS I have previously "properly" exited an already running console (meaning ctrl-c).
I've run into something similar while running Rails on my machine, and a full system restart does the trick. Perhaps due to the cloud based nature of Rails on Cloud9 there is some "sticky" process that stays on?
EDIT: Forgot to mention that on my machine I would also run "killall ruby" in a new terminal window. While that didn't work on Cloud9 it may be worth a try!
Anyhoo- lemme know if that does the trick!
Please do report these kind of (performance) questions to our Support desk via https://support.c9.io - we'll be able to help you quickly! Thanks.
what I did is just killed that process
ubuntu 5318 0.0 0.0 488820 16872 pts/3 Sl Dec24 0:01 spring server
kill -9 5318
You will have ur pid number. so just use it.
to get process -- use :
ps aux
Executing "bin/spring stop" would solve the issue as well. It is currently unknown why this happens and we are looking into that.

Jenkins accessing Window Server

I have the following problem: I have an ANT-task in Jenkins-CI that (apparently) needs access to OSX' window server (it needs to show a window). After doing some research, it appears that only the currently logged in user and the 'root' user (or SUDO) can access OSX' window server.
The ANT task (Adobe ADL) is one that actually 'runs' a build, so it has to popup a screen.
I'm on a macBook running OSX 10.7.something (Lion), Jenkins 1.487, Ant 1.8.4.
What i have tried so far:
to start with, tried the 'barebone' < exec > task to invoke ADL. Works, but getting error that means that Jenkins running as daemon (with homedir /Users/shared/Jenkins/Home) cannot access OSX' Window Server.
Run Jenkins as myself, by changing USER_NAME, GROUP_NAME, JENKINS_HOME in the jenkins launchd.conf file: https://wiki.jenkins-ci.org/display/JENKINS/Thanks+for+using+OSX+Installer
this gives a lot of errors/trouble, which i tried to solve in communication with the creator of the Jenkins CI but, unfortunately to no avail.
Try to have Ant run an < exec > task (running a shell script) in which i try to sudo with a password using this sneaky way of passing a password to the stdinput: echo < password > | sudo -S < command > which is really bad, but as i'm running Jenkins locally (not reachable from the outside of my LAN) it's np.
Tried to have Ant run an < exec > task, using a 'redirector' with as inputstring my password. also superbad, but yea, i just want it to work. which it did not.
Tried a Jenkins SSH plugin: didn't work. I could, however, SSH to my own localhost using terminal, thing is, i don't know what the Jenkins SSH was trying to do (how can i figure that out anyway?) so i don't know why it wouldn't work.
Tried to have Ant run an SSHEXEC task (which, after some hours, finally worked. Ant for mac is borked, something with optional .jar tasks not being re-named correctly or something) but i'm getting a "com.jcraft.jsch.JSchException: Auth fail" which i googled for, and can't seem to resolve. only applicable solution is to have sshd accept password auths, did that, still got the same error.
I think what i want to accomplish was NOT worth the 2 days that i spent so far on this problem, although i learned a lot. However, i just want this to work and will not accept defeat, yet :)
My question: have you had to solve a similar problem, how did you go about it? are there any other methods i can try to solve this problem? Is there a method mentioned that should JUST _WORK_ and i did something wrong?
[edit] I have decided to go with the Jenkins standalone app, as i think (for me) this is a nicer solution in total, as my laptop is not a build server. Also, the Jenkins app can start at startup so it actually acts as a local server.
Just a quick guess: if you don't want the interactivity of the script, and the script can do without it, you can try to set the headless mode on the java command-line:
-Djava.awt.headless=true
I have decided to go with the Jenkins standalone app, as i think (for me) this is a nicer solution anyway, as my laptop is not a (headless) build server. Also, the Jenkins app can start at startup so it acts as a server too.

Do I need to re-make and re-install couchdb everytime I want to test a change to the source?

I am trying to contribute more with couchdb code, but I have really no idea how it is done the right way.
I have cloned the source from apache git repository and built it with
./configure
make && sudo make install
Then I wanted to change a file from the source called couch_httpd_show.erl
Do I need to run make && sudo make install again for every change I make to the source code and want to see how it behaves?
I am sure there's a more practical way to do it, because this approach is a bit time and patience consuming right?
Yes, there is a shortcut.
./configure
make dev
./utils/run
This builds and runs CouchDB entirely in the current directory. Instead of running as a background daemon, CouchDB will run in the foreground and output log messages to the terminal. It uses some local directories to store stuff: ./tmp/log for logs, ./tmp/lib for databases, and (if I remember correctly) ./etc/couch/local_dev.ini for configuration.
If you run this instead:
./utils/run -i
then you will also have an interactive Erlang prompt, which you can use to help debug.
When I work on CouchDB, I run this in the shell:
make dev && ./utils/run -i
After I change some code, I press ^C, up-arrow, return.
When I joined Couchio, I was responsible for production CouchDB deployments. I asked Chris Anderson for advice about something and he said, "Sorry, ask Jan. I've been just using utils/run for years!"
You can rebuild that one file and drop the output beam in place and restart.
erlc <file.erl>
& then copy the .beam file into place. To restart couchdb use either init:restart(). in the erlang shell or POST /_restart to CouchDB.
Although you might want to consider using the commandline erlang & javascript test suite also to ensure you didn't break anything.

Resources