DataStax AMI installed in VPC hangs at Installation started - datastax-enterprise

I experienced this issue today with ami-ada2b6c4 creating a new instance in a VPC without a public IP - logged in via SSH and the terminal hangs on Installation started.
I used Ctrl-C to interrupt and this printed on the terminal:
Installation started ^CTraceback (most recent call last):
File "datastax_ami/ds4_motd.py", line 239, in <module>
run()
File "datastax_ami/ds4_motd.py", line 228, in run
waiting_for_status()
File "datastax_ami/ds4_motd.py", line 100, in waiting_for_status
time.sleep(5)
KeyboardInterrupt
I followed a link to github posted by joaquin for a similar problem and added an entry to /etc/hosts. Logged off the instance and then reconnected. this time, got a different error.
Raiding complete
Waiting for nodetool...
The cluster is now in it's finalization phase. This should only take a moment...
Note: You can also use CTRL+C to view the logs if desired:
AMI log: ~/datastax_ami/ami.log
Cassandra log: /var/log/cassandra/system.log
Note: Ownership information does not include topology; for complete information, specify a keyspace
Datacenter: Solr
================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Owns Host ID Token Rack
UN 10.0.10.92 53 KB 100.0% c010f1d3-3d74-4c2b-ae88-9e3fecfc447c -9223372036854755808 rack1
Opscenter: http://10.0.10.92:8888/
Please wait 60 seconds if this is the cluster's first start...
Tools:
Run: datastax_tools
Demos:
Run: datastax_demos
Support:
Run: datastax_support
------------------------------------
DataStax AMI for DataStax Enterprise
and DataStax Community
AMI version 2.5
DataStax Enterprise version 4.5.2-1
------------------------------------
These notices occurred during the startup of this instance:
[ERROR] 10/15/14-18:16:08 git pull:
error: Failed connect to github.com:443; Connection timed out while accessing https://github.com/riptano/ComboAMI.git/info/refs
The security group does allow access to the internet - I was able to sudo apt-get update, for example.

A couple of learnings from my experience. Joaquin from Datastax was very helpful with his suggestions.
I passed in userdata using the advanced config in AWS Management GUI -
--clustername EIP_ami --totalnodes 3 --version enterprise --username some.guy_some.com --password changeme --searchnodes 3
but didn't change the number of instances to 3 in the GUI so only one node was created. this may have contributed to the problem.
After interrupting the initial hanging installation -
added this entry to /etc/hosts:
127.0.1.1 ip-10-0-1-234
added an elastic IP to the instance and rebooted
I got to the 2nd error:
These notices occurred during the startup of this instance:
[ERROR] 10/15/14-18:16:08 git pull:
error: Failed connect to github.com:443; Connection timed out while accessing https://github.com/riptano/ComboAMI.git/info/refs
When I got to a bash prompt, I tested the git pull manually per Joaquin's advice:
ubuntu#ip-10-0-1-234:~/datastax_ami$ git pull
Already up-to-date.
per Joaquin:
Yes, that error message will stick around for the life of the machine.
Perhaps the git pull issue was a fluke.
Nodetool status says the node is up and acting normally. So, the learning here is to ignore the errors - none of them seem to affect the creation or operation of the node.

Related

Could not Install Craft CMS on Local Machine and on VPS

I have been trying to install Craft CMS (free version), but failed each time. At first I attempted to install it on a remote VPS with Ubuntu 20.04 server and MySQL database:
Installation via Composer failed:
In CreateProjectCommand.php line 438:
Could not find package public_html/craft with stability stable.
Then I attempted to install Craft CMS on VPS manually. I got as far as running the installer and entering my username, email and password, but that resulted in "Install failed. Please, check your logs for more info" message. Checked the logs and the problem was as follows:
2022-04-06 22:33:39 [-][-][-][error][craft\base\ApplicationTrait::getIsInstalled] There was a problem fetching the info row: SQLSTATE[42S02>
The SQL being executed was: SELECT *
FROM `info`
WHERE `id`=1
LIMIT 1
2022-04-06 22:33:39 [-][-][-][error][yii\db\Exception] PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'craftdb.inf>
Then on my local machine with Ubuntu 18.04 using Composer got the same error as under VPS. When attempting the manual install I did not get past the error
HTTP 503 – Service Unavailable – craft\web\ServiceUnavailableHttpException
Perhaps it is the free version problem. Or any other ideas?

How to use neo4j from a docker image on the Google Cloud Platform

I want to run neo4j from the google cloud shell and I have already ssh'd into my project.
Currently I am using the following to run neo4j:
docker run \
--publish=7474:7474 \
--volume=$HOME/neo4j/data:/data \
--volume=$HOME/neo4j/logs:/logs \
neo4j:3.0
The command works and prints the following output:
Starting Neo4j.
2017-12-13 03:22:34.661+0000 INFO ======== Neo4j 3.0.12 ========
2017-12-13 03:22:34.681+0000 INFO No SSL certificate found,
generating a self-signed certificate..
2017-12-13 03:22:35.163+0000 INFO Starting...
2017-12-13 03:22:35.631+0000 INFO Bolt enabled on 0.0.0.0:7687.
2017-12-13 03:22:37.966+0000 INFO Started.
2017-12-13 03:22:39.041+0000 INFO Remote interface available at
http://0.0.0.0:7474/
However, when I follow the link to http://0.0.0.0:7474/, it redirects to something like https://7474-dot-3282369-dot-devshell.appspot.com/?authuser=0 and I get an error:
Error: Could not connect to Cloud Shell on port 7474.
What can I do differently or what additional info would you need? Thank you.
I think you are facing one of the two following issues:
1. If you ssh'd in a different machine and the server is running there
The issue is that you accessed an instance from the Google Cloud Shell, then you started the server through docker. At this point I think that you connected (not intentionally) to the Cloud Shell on the port 7474 clicking on "Web preview" of the same Window!
But the server was running on a different machine!
Therefore the Cloud Shell informed you that is not listening on port 7474. To solve this issue you need to retrieve the public/external IP of your instance, create a firewall rule allowing the TCP:7474 traffic and connect to it from any browser with http://ip-your-machine:7474.
2. If you are running the server in the Google Cloud Shell
First of all you should not run a server on the Google Cloud Shell, it is not a normal virtual machine and you should never rely on it.
By the way I followed step by step what you did:
I accessed the Google Cloud Shell, I have run your code, I obtained the very same output, but when I have done the "Web preview" I correctly visualised the neo4j login page.
Thus, I believe that if you were running the server here you unintentionally stopped it before checking the "Web preview".
P.S.
The weird domain name you have been redirected to: https://7474-dot-3282369-dot-devshell.appspot.com is a domain name that points exactly to your Google Cloud Shell #3282369 on port 7474.
You are redirected automatically clicking on a link from the Cloud Shell, (since you cannot reach 0.0.0.0 from your computer).

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

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.

Unable to create machine in docker

I've just installed docker on my windows 7 machine. When I start Docker QuickStart, I get following error which seems to be while creating the machine:
Creating machine...
(default) Unable to get the latest Boot2Docker ISO release version: Get https:/
/api.github.com/repos/boot2docker/boot2docker/releases/latest: dial tcp 192.30.2
52.124:443: connectex: A connection attempt failed because the connected party d
id not properly respond after a period of time, or established connection failed
because connected host has failed to respond.
(default) Copying C:\Users\robot\.docker\machine\cache\boot2docker.iso to C:\Use
rs\robot\.docker\machine\machines\default\boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
Error attempting heartbeat call to plugin server: read tcp 127.0.0.1:60733->127.
0.0.1:60732: wsarecv: An existing connection was forcibly closed by the remote h
ost.
Error attempting heartbeat call to plugin server: connection is shut down
Error attempting heartbeat call to plugin server: connection is shut down
Error attempting heartbeat call to plugin server: connection is shut down
Error attempting heartbeat call to plugin server: connection is shut down
Error creating machine: Error in driver during machine creation: read tcp 127.0.
0.1:60733->127.0.0.1:60732: wsarecv: An existing connection was forcibly closed
by the remote host.
Looks like something went wrong... Press any key to continue...
There is a similar issue in docker/machine/issues/2773.
Try and see if the issue persists when creating a machine yourself instead of using quick-start:
Find where docker-machine.exe has been installed (or copy the latest released one in your %PATH%) and use that, from a regular CMD session:
First test the existing machine:
# find the name of the machine created.
docker-machine ls
docker-machine env --shell cmd <nameOfTheMachine>
docker machine ssh <nameOfTheMachine>
Then try creating a new one:
docker-machine create -d virtualbox <aNewMachine>
docker-machine env --shell cmd <aNewMachine>
docker machine ssh <aNewMachine>
I do not have a solution but found the root cause.
I had installed boot2docker and has been using for months. I had been creating all
my vbox images on the same folder all the while.
One fine day I decided to archive my machines and changed the folder in which I was creating the vbox images. It started giving this wired error. I reverted back my archive and tested again. It started working fine.
The difference I found on both the set up was, in the archived folder it was skipping the ca cert creation step and was directly creating the machine. In the new folder it was creating a cert and then creating the machine. It looks like the server doesn't like the new certs!!!!

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

Resources