How to deal with "Starting neo4j failed: Address localhost:7687 is already in use"? - neo4j

I am using Neo4j Community Edition 3.1.1 on Mac OS X Sierra. Whenever I try to start Neo4j locally via
neo4j start
I get the following:
Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#a8ba98d' was successfully initialized, but failed to start.
Please see attached cause exception.
with the following exception at the tail of /usr/local/Cellar/neo4j/3.1.1/libexec/logs/neo4j.log
Caused by: org.neo4j.helpers.PortBindException: Address localhost:7687 is already in use, cannot bind to it.
I tried running
lsof -i -n -P | grep 7687
but it came back empty.
Please advise.

Note: I'd leave this as a comment, but don't have the required rep.
Are you sure that you have only one version of Neo4j installed?
Is your installation clean, without any traces of previous installations?
Is your JDK version >= 8?
Have you made other changes to your conf file?
Do you have the desktop app installed? des it work without issues?
Your lsof could be returning an empty value as some pids are only visible to root. Try:
sudo netstat -antlp
This should return all open ports, check if anything corresponds to 7687.
Also try running neo4j as a service. I believe it's launchctl on Mac (I use systemctl on Linux) and check if the error persists.
Cheers

I had the same exact issue, notice how neo4js is trying to get to localhost:7687?
I checked my /etc/hosts file and sure enough, I had a bogus entry for localhost (from previous testing).
I changed /etc/hosts entry back to
localhost 127.0.0.1
Saved, then ran again.
Neo4j started up fine after that.

Related

how to connect to bolt with cypher-shell not on localhost

Really want to connect to bolt from an spark slave also but figured if I can get it working with cypher-shell the rest will fall into place. So I can do this:
cypher-shell -a localhost
Connects fine
if I do this on the box which is the actual ip:
cypher-shell -a 172.20.0.71:7687
Get a connection refused, I thought all I had to do was in the conf do:
dbms.connector.bolt.address=0.0.0.0:7687
That didn't seem to work is there something else I am missing?
(Or at least the above didn't seem to work I did restart my neo4j instance so it should of picked up the changes to conf). Connecting just with defaults on cypher-shell does give this still though:
Connected to Neo4j 3.3.0 at bolt://localhost:7687 as user neo4j.
Type :help for a list of available commands or :exit to exit the shell.
Note that Cypher queries must end with a semicolon.
So maybe it didn't fully restart and pick up the changes to the neo4j.conf ? Or more likely I am missing something else to get this to work as I think it should. Where I can connect from another ip or locally to bolt via the actual ip address?
You need to uncomment this in your neo4j.conf :
dbms.connectors.default_listen_address=0.0.0.0
Restart the server, and then with cypher-shell :
cypher-shell -a bolt://172.20.0.71:7687

Fresh installation of RabbitMQ doesn't listen on port 5672 in Windows

After installing RabbitMQ (rabbitmq-server-3.6.0) and Erlang (esl-erlang_18.2-1-windows_i386) I am not able to see the port 5672 in list of listening ports in by netstat -an command but in task manager under services category I am able to see RabbitMQ with Running status.
After installing RabbitMQ I had created two environment variables. they are:
RABBITMQ_SERVICE to C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.0
and
RABBITMQ_BASE to C:\Program Files\RabbitMQ Server
Later I reinstalled Rabbitmq and Erlang but not from scratch as I was not able to delete files completely.
Is my server up? Or is my installation wrong? Or do I have to anything in excess.
I completely have no idea on it or what is going on.
yes, this was solved. I didn't have permission to install new software on my machine. Though it showed as installed successfully because of permission issues I was not able to use the tool. once permission issues got resolved everything was fine :).
I also faced the same issue. I have got right permissions to install software. Still while installing rabbit-mq it was giving an error Port 5672 is not listening
After more investigation, I found that there was already running process on this port. I ran below commands:
netstat -ano | findstr ":5672"
taskkill /F /PID 18644
This resolved my issue.

cqlsh connection error: Could not connect to localhost:9160

I am totally new to Cassandra and met the following error when using cqlsh:
cqlsh
Connection error: Could not connect to localhost:9160
I read the solutions from the following link and tried them all. But none of them works for me.
How to connect Cassandra to localhost using cqlsh?
I am working on CentOS6.5 and installed Cassandra2.0 using yum intall dsc20.
I ran into the same issue running the same OS and same install method. While the cassandra service claims that it's starting ok, if you run service cassandra status it would tell me that the process was dead. Here are the steps I took to fix it:
Viewing the log file at /var/log/cassandra/cassandra.log gave told me that my heap size was too small. Manually set the heap size in /etc/cassandra/conf/cassandra-env.sh:
MAX_HEAP_SIZE="1G"
HEAP_NEWSIZE="256M"
Tips on setting the heap size for your system can be found here
Next, the error log claimed the stack size was too small. Once again in /etc/cassandra/conf/cassandra-env.sh find a line that looks like JVM_OPTS="$JVM_OPTS -Xss128k" and raise that number to JVM_OPTS="$JVM_OPTS -Xss256k"
Lastly, the log complained that the local url was misformed and threw a java exception. I found the answer to the last part here. Basically, you want to manually bind your server's hostname in your /etc/hosts file.
127.0.0.1 localhost localhost.localdomain server1.example.com
Hope this helps~
Change:
/etc/cassandra/cassandra.yaml
Whether to start the thrift rpc server.
start_rpc: false
to
start_rpc: true

Neo4j Server Closing for no Reason?

I have a small database that was working fine just a day ago, but now, when I try to start it, the console claims that it succeeds in opening, but the web server hangs.
lsof -i | grep 7474
states that neo4j is listening to the port, and "close_wait"-ing, which I'm told means that the server side shut it down.
The only new error I get is that logback.groovy is missing, along with logback-test.xml, which is very odd, because I set logging to false in the neo4j config file.
Any idea what could be happening? Any one else encounter this problem?
Check messages.log for more detail about the shutdown reason.

Problem stopping/starting MySQL Workbench

I've installed the MySQL workbench version 5.2.34 and having problems creating a local connection. I'm getting an error saying "Can't Connect to MySQL Server on 127.0.0.1'(10061)" when i try connecting to Localhost on Port 3306. I tried restarting the service but i don't have the option to stop/start/pause or resume using Windows 7. The status is just set to "starting". I also tried "net stop mysql" from the command line in DOS but get the following error: "The service is starting or stopping. Please try again later"
Does anyone know if this is another bug in the Workbench or is there a quick solution to get around this?
You can restart mysql from services. Also, check error log (by default, on Windows 7 machine it's under ...ProgramData\MySQL\MySQL Server [version]\data
Sounds like a problem with MySQL itself starting up. You may have to kill the mysqld process if nothing else gets it into a started or stopped state, and then investigate the .err logs in your data directory.
This solution uses the window's mysql installer which you have used to install your MySQL.
Even though this post is very old, I have wasted around 2 hours and hence want to post this so that it can save someone else's time.
I have tried every other way of restartring the service, but mysql service just wont start.
Start your windows mysql installer. For me it was "mysql-installer-community-8.0.20.0"
Then remove/uninstall the SQL Server and remove all configurations
Manually delete the SQL Server folder from "C:\Program Files\MySQL\MySQL Server 8.0."
Start your mysql installer again and install the SQL Server again
You can check now that the MySqL Server has started.

Resources