How do I stop CouchDB from running on startup? - database

I installed CouchDB on Windows7 a while back to try it out. But it's always running on port 5984 on startup. How do I stop this?
Edit: Nevermind I found an uninstaller!

You can also disable the Windows Service for Apache CouchDB. If you'd prefer to just run it when you need it.

Related

CakePHP: command cake server hangs on xampp

I have a basic XAMPP install on windows 10, and I've installed cakePHP, with no errors.
When I run bin/cake server in the xampp terminal, it tells me it's started on localhost:8765, and that I can press CTRL-C to return. It hangs here, shell goes unresponsive, and trying to hit localhost:8765 in the browser hangs indefinitely.
I can view the apache page at localhost:80, with no issue. Any help would be greatly appreciated.
Im almost definetly sure, that you have debugging turned on somewhere, and PHP script hangs on first line. Do you have any IDE opened during that procedure? If so, close it, restart php server and try again. It should work now.
I had similar WTFs working with PHPStorm, that unwanted debugging sessions was paused on "script first line" exposing behavior you have described.

Xdebug connects to IDE when it shouldn't

I have remote_autostart disabled and no cookie present:
Still, Xdebug is connecting to my IDE (PhpStorm) at 192.168.22.101:9000 and zero-config debugging works. Why? How do I disable it? (It looks like autostart is somehow enabled and the PHP app is slow.)
My first bet would be that this is not the php.ini you're looking for. If you have CLI and normal php.ini, make sure you have this set up in both. Integrated PHP server counter-intuitively uses web php.ini instead of CLI one.
Next step would be to check whether it's actually xdebug that's causing the issue. I'd do that by disabling the extension alltogether.
Note that xdebug can slow down you app in some cases no matter what just by being enabled.
Next I'd check that xdebug profiler information is not generated. If the app is slow in general it's the profiler. If it just hangs for few seconds and then runs normally it's waiting for remote debugger. Might be a good idea to measure (even by simple means like putting dump on first and last line of code) speed of the app to rule out this possibility.
I have been having exactly the same issue for a few days now. remote_autostart is set to off but it still triggers even on my own <?php phpinfo(); script. The debugging session even starts when using an incognito browser session.
Notice the odd IDE key btw, it is set automatically.
Update: Even with xdebug.default_enable on off, it still activates Xdebug in my IDE.

Flash drive webserver

Hopefully someone here can help me out.
Currently I have a small AngularJS app. I want to put this on an USB drive and make it very easy to run. The idea is someone can just plug in the drive click a file and run the app. I've been thinking about using node for this and then make a little script that would start the server and app. So people can click the script and the app runs. The problem is however (afaik) you need to have node installed on the computer which can't be done.
The client hasn't got his webserver running and still want to run the app. So please don't tell me why would you make an angular app and wanna run it without webserver.
Hopefully anyone has any solution or idea to make this work.
So in short:
AngularJS Application on USB
Plug in the USB, click a file and run the app in the browser.
Thanks for reading and thinking with me.
Have you considered running a standard web server on the USB Stick?
I see that you have suggested Node, but another alternative could be to use XAMPP?
XAMPP is a completely free, easy to install Apache distribution containing MariaDB, PHP, and Perl. The XAMPP open source package has been set up to be incredibly easy to install and to use.

Neo4j usually crashes when I close ssh connection

I am using Neo4j in my graduation project.Everything works fine in neo4j database.But, I have problem about the crashing database.I tried to fix that problem in the following segment of command:
/var/lib/neo4j/bin/neo4j console
When I run this command neo4j is working fine but when I close ssh connection, It will crash again.How can I fix that problem?
Thanks, Kind regards
Use bin/neo4j start to start it in the background
Actually you should install it as a service on your system. Something like
sudo bin/neo4j install
Then it keeps running after you started it until you stop it again.

Clean couchdb and restart

What is command to clean CouchDB please ? And if I want to disable and re-start my CouchDB what is command?
Thanks
CouchDB can be started/stopped/restarted from the /etc/init.d/couchdb or /etc/rc.d/couchdb startup script.
(This startup script file might be located somewhere else on your system.)
You would do something like this:
To stop: /etc/init.d/couchdb stop
To restart: /etc/init.d/couchdb restart
As far as cleaning goes, I think you mean compaction. This is easiest to do via Futon, which is located here by default: http://localhost:5984/_utils
Login to Futon as an admin, navigate to your database, and there will be links to compact the database.
This can be somewhat dependent on OS and its version. On Ubuntu 14.04, for example (which is transitioning away from sysvinit), /etc/init.d/couchdb commands don't work for me. I have to do:
sudo service couchdb restart
So use the curl method posted by user2744667 (with root/admin privileges), or use the standard method for restarting daemons/services for your OS.
Finally, as a last resort, you could kill the process. This is not the recommended way to do it, and it is not "clean" as you indicated in the question. You will likely find that CouchDB is agressive about respawning itself. But if you are in a homicidal mood, all that kill-ing could be just the thing.
You can restart CouchDb as per the documentation here
Example with curl:
curl -X POST http://localhost:5984/_restart -H"Content-Type: application/json"
On Windows, you don't need to run a GUI like services.msc ... Typing this is usually faster:
c:\> net stop "Apache CouchDb"
c:\> net start "Apache CouchDb"
on Windows, if you installed it as a service, open services.msc, find the Apache couchDB service, and restart.
As I write this, the most recent existing answers are seven years old. Here's some fresher ways of doing this.
On Windows, CouchDB uses nssm.exe for managing the service. A copy of that executable is at <couch-installation-dir>\bin\nssm.exe. If you installed Couch to C:\CouchDB then restarting it is:
C:\CouchDB\bin\nssm restart "Apache CouchDB"
It doesn't have to be that nssm.exe, of course.
Still on Windows, using PowerShell you can restart the service the normal PowerShell way:
ps1 $ restart-service "Apache CouchDB"
Couch being Couch, there's also a plain old HTTP way to trigger a restart. If you have an admin user called admin with password xx then you can do this:
curl http://admin:xx#127.0.0.1:5984/_node/couchdb#localhost/_restart -X POST
The node may not be called couchdb#localhost. To find out, use:
$ curl http://admin:admin#127.0.0.1:5984/_membership/
{"all_nodes":["couchdb#localhost"],"cluster_nodes":["couchdb#localhost"]}

Resources