Problem Starting Cassandra Multinode cluster - cassandra

as title said I've got some problems with adding node in a cassandra cluster.
To be more specific: i have to do a relation in which i take data on how good a Cassandra cluster scales adding various node, in particular i have to launch a little cassandra script that
-load a CSV
-add and remove a entry
-do some queries
-delete the stuffs done and reset the cluster
all on 1 up to 4 clusters and record the time it takes to execute the steps.
Now: i'm on a windows laptop but i managed to start cassandra also in a linux VM, all on a single node following (tell me if i'm spamming too much links) this tutorial:
https://www.youtube.com/watch?v=s1xc1HVsRk0&list=PLalrWAGybpB-L1PGA-NfFu2uiWHEsdscD&index=1
and i've tried without success to add new nodes following thoose:
http://www.learnmodeon.com/cassandra-cluster-setup-for-linux/
https://www.youtube.com/watch?v=q3pe8XHzztM&list=PLrwkeifIVAoSSRCeqi8Rfc2smuUadww-Y&index=2&t=0s
https://manthapavankumar.wordpress.com/2015/06/20/configuring-multi-node-cassandra-cluster-on-windows-machine/
https://blog.knoldus.com/running-multinode-cassandra-cluster-on-a-single-machine/
https://subscription.packtpub.com/book/big_data_and_business_intelligence/9781849515122/1/ch01lvl1sec11/running-multiple-instances-on-a-single-machine
https://www.youtube.com/watch?v=oHMJrhMtv3c
all not working(cassandra doesn't show other nodes or they tell me to modify file that doesn't exist on my computer like conf/log4j-server.properties)both on linux[mint 19] and windows 10
the version of Cassandra i'm using is 3.11.3 on both (but i think any version should be fine for the target of this project) and the python script works on single node in around 4 minutes total for a 10000+rows csv(tell me if I have to post it)
I'm out of ideas, Thank if you have some.
edit: i can launch only 1 node at time, if i try activate a second ine i get
VerifyPortsAreAvailable : Found a port already in use. Aborting startup
In D:\Program Files\apache-cassandra-3.11.3\bin\cassandra.ps1:98 car:9
+ VerifyPortsAreAvailable
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,VerifyPortsAreAvailable
VerifyPortsAreAvailable : TCP 127.0.0.1:7000 0.0.0.0:0 LISTENING
In D:\Program Files\apache-cassandra-3.11.3\bin\cassandra.ps1:98 car:9
+ VerifyPortsAreAvailable
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,VerifyPortsAreAvailable
on Windows and
Starting cassandra as root is user or group is not recommended - please start Cassandra using a different starting system user.
on Linux

If nodes are starting but they aren't seeing each other, you probably have your seed nodes configured incorrectly in cassandra.yaml. I have already explained the correct way to set up seed nodes on another question.
Regarding log4j-server.properties, it sounds like you are looking at some old documentation. Logging is now configured in logback.xml.

Related

mutipass:launch failed: Failed to resize instance image - error executing powershell command

I always have the following error when I install a virtual machine
launch failed: Failed to resize instance image - error executing powershell command. Detail: Resize-VHD : �޷������������̵Ĵ�С��
ϵͳ�޷�������C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\multipassd\vault\instances\krun\ubuntu-20.04-serv
er-cloudimg-amd64.vhdx���Ĵ�С��
�޷������������̵Ĵ�С��
ϵͳ�޷�������C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\multipassd\vault\instances\krun\ubuntu-20.04-serv
er-cloudimg-amd64.vhdx���Ĵ�С: ��һ����������ʹ�ô��ļ��������޷����ʡ� (0x80070020)��
����λ�� ��:1 �ַ�: 1
Resize-VHD -Path C:/WINDOWS/system32/config/systemprofile/AppData/Roa ...
+ CategoryInfo : ResourceBusy: (:) [Resize-VHD], VirtualizationException
+ FullyQualifiedErrorId : ObjectInUse,Microsoft.Vhd.PowerShell.Cmdlets.ResizeVhd
Background
In my case, I changed the location of my multipass instance locations by following this post here. I then created a folder on my drive where I wanted the instances to be stored.
After doing so, multipass launch failed with your exact same error. After trying reboots, uninstall/reinstall multipass, etc. - I finally tried renaming the folder where I wanted to store my multipass instances, and this worked.
Apparently, if your destination multipass folder includes a space, some part of the script fails.
Workaround / Fix
When specifying a multipass instance destination:
MULTIPASS_STORAGE -Value "<path>"
Make sure there are NO SPACES in the "<path>" you have provided.
Hope this helps.
You have to add the HyperV module to powershell in "Turn Windows features on or off", if you don't check this the checkbox, "Resize-VHD" won't work and will fail the multipass launch.
The direct command is:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Management-PowerShell

"An error occurred while creating the pipeline." when running powershell script in Azure pipeline self-hosted agent

When I run simple powershell with only ls command in it through Azure pipeline self-hosted agent I see error:
An error occurred while creating the pipeline.
+ CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : RuntimeException
The same script runs fine locally in the same folder on the same machine (when no Azure agent is involved). The pipeline has not been changed in months.
The execution policy is set to "Unrestricted".
There is no difference whether the agent is run with admin permissions.
I checked and the files in the folders of the agent do not look blocked or read-only.
We run tests through powershell scripts and they started to fail last week, without any obvious reason. The only thing that I have installed on the same machine, is Visual Studio 2022 Preview 5, but I have restarted the machine immediately after the installation has passed successfully and the next day the tests have passed.
I had a look through similar errors here, in stackoverflow, but they were not useful, including this one PowerShell "an error occurred while creating the pipeline" #Requires -Version 3.0
Do you have an idea what can cause this?
The PowerShell scripts started passing when I changed the Azure Powershell pipeline task version from 1* to 2* (the latest available for our pipelines).
I do not know why this fixed the issue, as I think the difference between these 2 version is that version 2* can be executed on agents that have operating system that is not Windows.

NEsted Virtualization not working on Azure VM

I'm trying to start a nested VM on Windows2016 VM deployed on azure ( Size used allows Nested Virtualization ) and after all guides followed I'm not sure what i could be missing since i Do have Hyper V installed:
Role manager:
Services:
Error when i try to start the VM:
Start-VM : 'sfm-azure-01' failed to start.
Failed to start the virtual machine 'sfm-azure-01' because one of the Hyper-V components is not running.
'sfm-azure-01' failed to start. (Virtual machine ID BA61E565-9B2B-4180-B79D-FD3F16882314)
The Virtual Machine Management Service failed to start the virtual machine 'sfm-azure-01' because one of the Hyper-V components is
not running (Virtual machine ID BA61E565-9B2B-4180-B79D-FD3F16882314).
At line:1 char:1
+ Start-VM -Name sfm-azure-01
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Start-VM], VirtualizationException
+ FullyQualifiedErrorId : OperationFailed,Microsoft.HyperV.PowerShell.Commands.StartVM
References used: https://learn.microsoft.com/azure/virtual-machines/windows/nested-virtualization
Did you try this script for enabling nest virtualisation.
It looks like it checks all the prerequisites.
https://github.com/charlieding/Virtualization-Documentation/tree/live/hyperv-tools/Nested

Service Fabric Start-ServiceFabricClusterConfigurationUpgrade constantly times out

I have a Service Fabric standalone cluster where I can connect to it with Connect-ServiceFabricCluster just fine, but whenever I run other commands such as Start-ServiceFabricClusterConfigurationUpgrade, it keeps timing out. I've tried running commands with longer timeouts (as long as 10 min) with the same results. Any ideas what I might be doing wrong?
This works..
PS C:\WINDOWS\system32> Connect-ServiceFabricCluster -ConnectionEndpoint "localhost:19000"
True
ConnectionEndpoint : {localhost:19000}
...
But these commands time out...
PS C:\WINDOWS\system32> Get-ServiceFabricClusterConfiguration -TimeoutSec 300
Get-ServiceFabricClusterConfiguration : Operation timed out.
At line:1 char:1
+ Get-ServiceFabricClusterConfiguration -TimeoutSec 300
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationTimeout: (Microsoft.Servi...usterConnection:ClusterConnection) [Get-ServiceFabr
icClusterConfiguration], TimeoutException
+ FullyQualifiedErrorId : GetClusterConfigurationErrorId,Microsoft.ServiceFabric.Powershell.GetClusterConfiguratio
n
Start-ServiceFabricClusterConfigurationUpgrade -ClusterConfigPath ClusterConfig.Unsecure.DevCluster.v2.json
Start-ServiceFabricClusterConfigurationUpgrade : Operation timed out.
At line:1 char:1
+ Start-ServiceFabricClusterConfigurationUpgrade -ClusterConfigPath Clu ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationTimeout: (Microsoft.Servi...usterConnection:ClusterConnection) [Start-ServiceFa
...gurationUpgrade], TimeoutException
+ FullyQualifiedErrorId : StartClusterConfigurationUpgradeErrorId,Microsoft.ServiceFabric.Powershell.StartClusterC
onfigurationUpgrade
I believe this a single node dev cluster? If so, it can't be upgraded and needs to be recreated instead.
You can upgrade your cluster to the new version only if you're using a
production-style node configuration, where each Service Fabric node is
allocated on a separate physical or virtual machine. If you have a
development cluster, where more than one Service Fabric node is on a
single physical or virtual machine, you must re-create the cluster
with the new version.
To fix:
Create backups for all desired service partitions.
Update the client tooling using the web platform installer.
Remove the old cluster and recreate it using the Local Cluster Manager tool (in the tray, if on Windows).
Redeploy applications.
Restore service backups.

Titan start fails: management.properties not found

I downloaded and unziped the titan.zip and used the command ./titan.sh -v start. Now I get the output:
./titan.sh -v start
Forking Cassandra...
OpenJDK 64-Bit Server VM warning: The UseParNewGC flag is deprecated and will likely be removed in a future release
Running nodetool statusthrift.Error: Config file not found: /usr/lib64/jvm/java-1.9.0-openjdk-1.9.0/jre/conf/management/management.properties
...... timeout exceeded (60 seconds)
See /home/hausi/Documents/titan-0.5.4-hadoop2/bin/../log/cassandra.log for Cassandra log output.
The file management.properties does not exist on my machine. I could find any information about. Is it necessary to run Titan? How can I create it?
Little of topic bonus question: Since the company behind Titan was bought, will the database developmend be stopped?
It looks like you are running JDK9?
/usr/lib64/jvm/java-1.9.0-openjdk-1.9.0/jre/conf/management/management.properties
If I'm not misreading that, I think the answer is to downgrade to JDK7 or JDK8.
Since the company behind Titan was bought, will the database development be stopped?
The short answer is "no" and that development will continue. Please read:
https://groups.google.com/d/msg/aureliusgraphs/WTNYYpUyrvw/pZh02Q2LlpsJ

Resources