Appendix
Appendix A: Apache Cassandra (Single & Multi-node Cluster) Setup & Testing Instructions for Linux (RHEL/CentOS7)
Example successful Cassandra startup log output
1. The following is an example log of normal Cassandra startup on Linux, for a single-node, to the point where it is waiting for connections from clients:
INFO [main] 2018-01-30 13:14:39,027 YamlConfigurationLoader.java:85 - Configuration location: file:/etc/cassandra/default.conf/cassandra.yaml INFO [main] 2018-01-30 13:14:39,162 Config.java:457 - Node configuration:[allocate_tokens_for_keyspace=null; authenticator=PasswordAuthenticator; authorizer =CassandraAuthorizer; auto_bootstrap=true; auto_snapshot=true; batch_size_fail_threshold_in_kb=50; batch_size_warn_threshold_in_kb=5; batchlog_replay_throttl e_in_kb=1024; broadcast_address=null; broadcast_rpc_address=null; buffer_pool_use_heap_if_exhausted=true; cas_contention_timeout_in_ms=1000; client_encryption_options=<REDACTED>; cluster_name=Test Cluster; column_index_size_in_kb=64; commit_failure_policy=stop; commitlog_compression=null; commitlog_directory=/var /lib/cassandra/commitlog; commitlog_max_compression_buffers_in_pool=3; commitlog_periodic_queue_size=-1; commitlog_segment_size_in_mb=32; commitlog_sync=peri odic; commitlog_sync_batch_window_in_ms=null; commitlog_sync_period_in_ms=10000; commitlog_total_space_in_mb=null; compaction_large_partition_warning_thresho ld_mb=100; compaction_throughput_mb_per_sec=16; concurrent_compactors=null; concurrent_counter_writes=32; concurrent_materialized_view_writes=32; concurrent_ reads=32; concurrent_replicates=null; concurrent_writes=32; counter_cache_keys_to_save=2147483647; counter_cache_save_period=7200; counter_cache_size_in_mb=n ull; counter_write_request_timeout_in_ms=5000; cross_node_timeout=false; data_file_directories=[Ljava.lang.String;@67e2d983; disk_access_mode=auto; disk_fail ure_policy=stop; disk_optimization_estimate_percentile=0.95; disk_optimization_page_cross_chance=0.1; disk_optimization_strategy=ssd; dynamic_snitch=true; dy namic_snitch_badness_threshold=0.1; dynamic_snitch_reset_interval_in_ms=600000; dynamic_snitch_update_interval_in_ms=100; enable_scripted_user_defined_functi ons=false; enable_user_defined_functions=false; enable_user_defined_functions_threads=true; encryption_options=null; endpoint_snitch=GossipingPropertyFileSni tch; file_cache_size_in_mb=512; gc_log_threshold_in_ms=200; gc_warn_threshold_in_ms=1000; hinted_handoff_disabled_datacenters=[]; hinted_handoff_enabled=true ; hinted_handoff_throttle_in_kb=1024; hints_compression=null; hints_directory=/var/lib/cassandra/hints; hints_flush_period_in_ms=10000; incremental_backups=f alse; index_interval=null; index_summary_capacity_in_mb=null; index_summary_resize_interval_in_minutes=60; initial_token=null; inter_dc_stream_throughput_out bound_megabits_per_sec=200; inter_dc_tcp_nodelay=false; internode_authenticator=null; internode_compression=all; internode_recv_buff_size_in_bytes=null; inte rnode_send_buff_size_in_bytes=null; key_cache_keys_to_save=2147483647; key_cache_save_period=14400; key_cache_size_in_mb=null; listen_address=null; listen_in terface=null; listen_interface_prefer_ipv6=false; listen_on_broadcast_address=false; max_hint_window_in_ms=10800000; max_hints_delivery_threads=2; max_hints_ file_size_in_mb=128; max_mutation_size_in_kb=null; max_streaming_retries=3; max_value_size_in_mb=256; memtable_allocation_type=heap_buffers; memtable_cleanup_threshold=null; memtable_flush_writers=null; memtable_heap_space_in_mb=null; memtable_offheap_space_in_mb=null; min_free_space_per_drive_in_mb=50; native_transport_max_concurrent_connections=-1; native_transport_max_concurrent_connections_per_ip=-1; native_transport_max_frame_size_in_mb=256; native_transport_max_threads=128; native_transport_port=9042; native_transport_port_ssl=null; num_tokens=256; otc_backlog_expiration_interval_ms=200; otc_coalescing_enough_coalesced_messages=8; otc_coalescing_strategy=TIMEHORIZON; otc_coalescing_window_us=200; partitioner=org.apache.cassandra.dht.Murmur3Partitioner; permissions_cache_max_entries=1000; permissions_update_interval_in_ms=-1; permissions_validity_in_ms=2000; phi_convict_threshold=8.0; range_request_timeout_in_ms=10000; read_request_timeout_in_ms=5000; request_scheduler=org.apache.cassandra.scheduler.NoScheduler; request_scheduler_id=null; request_scheduler_options=null; request_timeout_in_ms=10000; role_manager=CassandraRoleManager; roles_cache_max_entries=1000; roles_update_interval_in_ms=-1; roles_validity_in_ms=2000; row_cache_class_name=org.apache.cassandra.cache.OHCProvider; row_cache_keys_to_save=2147483647; row_cache_save_period=0; row_cache_size_in_mb=0; rpc_address=null; rpc_interface=null; rpc_interface_prefer_ipv6=false; rpc_keepalive=true; rpc_listen_backlog=50; rpc_max_threads=2147483647; rpc_min_threads=16; rpc_port=9160; rpc_recv_buff_size_in_bytes=null; rpc_send_buff_size_in_bytes=null; rpc_server_type=sync; saved_caches_directory=/var/lib/cassandra/saved_caches; seed_provider=org.apache.cassandra.locator.SimpleSeedProvider{seeds=127.0.0.1}; server_encryption_options=<REDACTED>; snapshot_before_compaction=false; ssl_storage_port=7001; sstable_preemptive_open_interval_in_mb=50; start_native_transport=true; start_rpc=true; storage_port=7000; stream_throughput_outbound_megabits_per_sec=200; streaming_socket_timeout_in_ms=86400000; thrift_framed_transport_size_in_mb=15; thrift_max_message_length_in_mb=16; tombstone_failure_threshold=100000; tombstone_warn_threshold=1000; tracetype_query_ttl=86400; tracetype_repair_ttl=604800; trickle_fsync=false; trickle_fsync_interval_in_kb=10240; truncate_request_timeout_in_ms=60000; unlogged_batch_across_partitions_warn_threshold=10; user_defined_function_fail_timeout=1500; user_defined_function_warn_timeout=500; user_function_timeout_policy=die; windows_timer_interval=1; write_request_timeout_in_ms=2000] INFO [main] 2018-01-30 13:14:39,163 DatabaseDescriptor.java:325 - DiskAccessMode 'auto' determined to be mmap, indexAccessMode is mmap INFO [main] 2018-01-30 13:14:39,342 DatabaseDescriptor.java:432 - Global memtable on-heap threshold is enabled at 488MB INFO [main] 2018-01-30 13:14:39,342 DatabaseDescriptor.java:436 - Global memtable off-heap threshold is enabled at 488MB INFO [main] 2018-01-30 13:14:39,354 GossipingPropertyFileSnitch.java:68 - Unable to load cassandra-topology.properties; compatibility mode disabled INFO [main] 2018-01-30 13:14:39,526 CassandraDaemon.java:434 - Hostname: cassandra.mycompany.com INFO [main] 2018-01-30 13:14:39,527 CassandraDaemon.java:441 - JVM vendor/version: OpenJDK 64-Bit Server VM/1.8.0_151 INFO [main] 2018-01-30 13:14:39,528 CassandraDaemon.java:442 - Heap size: 2046820352/2046820352 INFO [main] 2018-01-30 13:14:39,528 CassandraDaemon.java:445 - Code Cache Non-heap memory: init = 2555904(2496K) used = 3641024(3555K) committed = 3670016(3 584K) max = 251658240(245760K) INFO [main] 2018-01-30 13:14:39,529 CassandraDaemon.java:445 - Metaspace Non-heap memory: init = 0(0K) used = 16864280(16469K) committed = 17563648(17152K) max = -1(-1K) INFO [main] 2018-01-30 13:14:39,530 CassandraDaemon.java:445 - Compressed Class Space Non-heap memory: init = 0(0K) used = 1950072(1904K) committed = 209715 2(2048K) max = 1073741824(1048576K) INFO [main] 2018-01-30 13:14:39,530 CassandraDaemon.java:445 - Par Eden Space Heap memory: init = 335544320(327680K) used = 114165512(111489K) committed = 335544320(327680K) max = 335544320(327680K) INFO [main] 2018-01-30 13:14:39,531 CassandraDaemon.java:445 - Par Survivor Space Heap memory: init = 41943040(40960K) used = 0(0K) committed = 41943040(40960K) max = 41943040(40960K) INFO [main] 2018-01-30 13:14:39,531 CassandraDaemon.java:445 - CMS Old Gen Heap memory: init = 1669332992(1630208K) used = 0(0K) committed = 1669332992(1630208K) max = 1669332992(1630208K) INFO [main] 2018-01-30 13:14:39,532 CassandraDaemon.java:447 - Classpath: /etc/cassandra/conf:/usr/share/cassandra/lib/airline-0.6.jar:/usr/share/cassandra/lib/antlr-runtime-3.5.2.jar:/usr/share/cassandra/lib/asm-5.0.4.jar:/usr/share/cassandra/lib/cassandra-driver-core-3.0.1-shaded.jar:/usr/share/cassandra/lib/commons-cli-1.1.jar:/usr/share/cassandra/lib/commons-codec-1.2.jar:/usr/share/cassandra/lib/commons-lang3-3.1.jar:/usr/share/cassandra/lib/commons-math3-3.2.jar:/usr/share/cassandra/lib/compress-lzf-0.8.4.jar:/usr/share/cassandra/lib/concurrentlinkedhashmap-lru-1.4.jar:/usr/share/cassandra/lib/disruptor-3.0.1.jar:/usr/share/cassandra/lib/ecj-4.4.2.jar:/usr/share/cassandra/lib/guava-18.0.jar:/usr/share/cassandra/lib/high-scale-lib-1.0.6.jar:/usr/share/cassandra/lib/jackson-core-asl-1.9.2.jar:/usr/share/cassandra/lib/jackson-mapper-asl-1.9.2.jar:/usr/share/cassandra/lib/jamm-0.3.0.jar:/usr/share/cassandra/lib/javax.inject.jar:/usr/share/cassandra/lib/jbcrypt-0.3m.jar:/usr/share/cassandra/lib/jcl-over-slf4j-1.7.7.jar:/usr/share/cassandra/lib/jna-4.2.2.jar:/usr/share/cassandra/lib/joda-time-2.4.jar:/usr/share/cassandra/lib/json-simple-1.1.jar:/usr/share/cassandra/lib/jstackjunit-0.0.1.jar:/usr/share/cassandra/lib/libthrift-0.9.2.jar:/usr/share/cassandra/lib/log4j-over-slf4j-1.7.7.jar:/usr/share/cassandra/lib/logback-classic-1.1.3.jar:/usr/share/cassandra/lib/logback-core-1.1.3.jar:/usr/share/cassandra/lib/lz4-1.3.0.jar:/usr/share/cassandra/lib/metrics-core-3.1.0.jar:/usr/share/cassandra/lib/metrics-jvm-3.1.0.jar:/usr/share/cassandra/lib/metrics-logback-3.1.0.jar:/usr/share/cassandra/lib/netty-all-4.0.44.Final.jar:/usr/share/cassandra/lib/ohc-core-0.4.3.jar:/usr/share/cassandra/lib/ohc-core-j8-0.4.3.jar:/usr/share/cassandra/lib/reporter-config3-3.0.0.jar:/usr/share/cassandra/lib/reporter-config-base-3.0.0.jar:/usr/share/cassandra/lib/sigar-1.6.4.jar:/usr/share/cassandra/lib/slf4j-api-1.7.7.jar:/usr/share/cassandra/lib/snakeyaml-1.11.jar:/usr/share/cassandra/lib/snappy-java-1.1.1.7.jar:/usr/share/cassandra/lib/ST4-4.0.8.jar:/usr/share/cassandra/lib/stream-2.5.2.jar:/usr/share/cassandra/lib/thrift-server-0.3.7.jar:/usr/share/cassandra/apache-cassandra-3.0.15.jar:/usr/share/cassandra/apache-cassandra-thrift-3.0.15.jar:/usr/share/cassandra/stress.jar::/usr/share/cassandra/lib/jamm-0.3.0.jar INFO [main] 2018-01-30 13:14:39,533 CassandraDaemon.java:449 - JVM Arguments: [-Xloggc:/var/log/cassandra/gc.log, -XX:+UseParNewGC, -XX:+UseConcMarkSweepGC, -XX:+CMSParallelRemarkEnabled, -XX:SurvivorRatio=8, -XX:MaxTenuringThreshold=1, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:CMSWaitDuration=10000, -XX:+CMSParallelInitialMarkEnabled, -XX:+CMSEdenChunksRecordAlways, -XX:+CMSClassUnloadingEnabled, -XX:+PrintGCDetails, -XX:+PrintGCDateStamps, -XX:+PrintHeapAtGC, -XX:+PrintTenuringDistribution, -XX:+PrintGCApplicationStoppedTime, -XX:+PrintPromotionFailure, -XX:+UseGCLogFileRotation, -XX:NumberOfGCLogFiles=10, -XX:GCLogFileSize=10M, -Xms1992M, -Xmx1992M, -Xmn400M, -ea, -Xss256k, -XX:+AlwaysPreTouch, -XX:-UseBiasedLocking, -XX:StringTableSize=1000003, -XX:+UseTLAB, -XX:+ResizeTLAB, -XX:+PerfDisableSharedMem, -XX:CompileCommandFile=/etc/cassandra/conf/hotspot_compiler, -javaagent:/usr/share/cassandra/lib/jamm-0.3.0.jar, -XX:+UseThreadPriorities, -XX:ThreadPriorityPolicy=42, -XX:+HeapDumpOnOutOfMemoryError, -Djava.net.preferIPv4Stack=true, -Dcassandra.jmx.local.port=7199, -XX:+DisableExplicitGC, -Djava.library.path=/usr/share/cassandra/lib/sigar-bin, -Dlogback.configurationFile=logback.xml, -Dcassandra.logdir=/var/log/cassandra, -Dcassandra.storagedir=, -Dcassandra-pidfile=/var/run/cassandra/cassandra.pid] INFO [main] 2018-01-30 13:14:39,807 NativeLibrary.java:167 - JNA mlockall successful WARN [main] 2018-01-30 13:14:39,808 StartupChecks.java:129 - jemalloc shared library could not be preloaded to speed up memory allocations WARN [main] 2018-01-30 13:14:39,808 StartupChecks.java:161 - JMX is not enabled to receive remote connections. Please see cassandra-env.sh for more info. WARN [main] 2018-01-30 13:14:39,809 StartupChecks.java:186 - OpenJDK is not recommended. Please upgrade to the newest Oracle Java release INFO [main] 2018-01-30 13:14:39,811 SigarLibrary.java:44 - Initializing SIGAR library INFO [main] 2018-01-30 13:14:39,825 SigarLibrary.java:180 - Checked OS settings and found them configured for optimal performance. WARN [main] 2018-01-30 13:14:39,830 StartupChecks.java:254 - Maximum number of memory map areas per process (vm.max_map_count) 262144 is too low, recommended value: 1048575, you can change it with sysctl. INFO [main] 2018-01-30 13:14:40,787 ColumnFamilyStore.java:391 - Initializing system.IndexInfo INFO [main] 2018-01-30 13:14:41,817 ColumnFamilyStore.java:391 - Initializing system.batches INFO [main] 2018-01-30 13:14:41,829 ColumnFamilyStore.java:391 - Initializing system.paxos INFO [main] 2018-01-30 13:14:41,845 ColumnFamilyStore.java:391 - Initializing system.local INFO [SSTableBatchOpen:1] 2018-01-30 13:14:41,882 BufferPool.java:226 - Global buffer pool is enabled, when pool is exahusted (max is 512 mb) it will allocate on heap INFO [main] 2018-01-30 13:14:41,931 CacheService.java:115 - Initializing key cache with capacity of 97 MBs. INFO [main] 2018-01-30 13:14:41,941 CacheService.java:137 - Initializing row cache with capacity of 0 MBs INFO [main] 2018-01-30 13:14:41,944 CacheService.java:166 - Initializing counter cache with capacity of 48 MBs INFO [main] 2018-01-30 13:14:41,947 CacheService.java:177 - Scheduling counter cache save to every 7200 seconds (going to save all keys). INFO [main] 2018-01-30 13:14:41,965 ColumnFamilyStore.java:391 - Initializing system.peers INFO [main] 2018-01-30 13:14:41,986 ColumnFamilyStore.java:391 - Initializing system.peer_events INFO [main] 2018-01-30 13:14:41,993 ColumnFamilyStore.java:391 - Initializing system.range_xfers INFO [main] 2018-01-30 13:14:42,003 ColumnFamilyStore.java:391 - Initializing system.compaction_history INFO [main] 2018-01-30 13:14:42,025 ColumnFamilyStore.java:391 - Initializing system.sstable_activity INFO [main] 2018-01-30 13:14:42,043 ColumnFamilyStore.java:391 - Initializing system.size_estimates INFO [main] 2018-01-30 13:14:42,058 ColumnFamilyStore.java:391 - Initializing system.available_ranges INFO [main] 2018-01-30 13:14:42,069 ColumnFamilyStore.java:391 - Initializing system.views_builds_in_progress INFO [main] 2018-01-30 13:14:42,080 ColumnFamilyStore.java:391 - Initializing system.built_views INFO [main] 2018-01-30 13:14:42,101 ColumnFamilyStore.java:391 - Initializing system.hints INFO [main] 2018-01-30 13:14:42,108 ColumnFamilyStore.java:391 - Initializing system.batchlog INFO [main] 2018-01-30 13:14:42,114 ColumnFamilyStore.java:391 - Initializing system.schema_keyspaces INFO [main] 2018-01-30 13:14:42,121 ColumnFamilyStore.java:391 - Initializing system.schema_columnfamilies INFO [main] 2018-01-30 13:14:42,127 ColumnFamilyStore.java:391 - Initializing system.schema_columns INFO [main] 2018-01-30 13:14:42,134 ColumnFamilyStore.java:391 - Initializing system.schema_triggers INFO [main] 2018-01-30 13:14:42,140 ColumnFamilyStore.java:391 - Initializing system.schema_usertypes INFO [main] 2018-01-30 13:14:42,147 ColumnFamilyStore.java:391 - Initializing system.schema_functions INFO [main] 2018-01-30 13:14:42,153 ColumnFamilyStore.java:391 - Initializing system.schema_aggregates INFO [main] 2018-01-30 13:14:42,464 ColumnFamilyStore.java:391 - Initializing system_schema.keyspaces INFO [main] 2018-01-30 13:14:42,479 ColumnFamilyStore.java:391 - Initializing system_schema.tables INFO [main] 2018-01-30 13:14:42,491 ColumnFamilyStore.java:391 - Initializing system_schema.columns INFO [main] 2018-01-30 13:14:42,511 ColumnFamilyStore.java:391 - Initializing system_schema.triggers INFO [main] 2018-01-30 13:14:42,518 ColumnFamilyStore.java:391 - Initializing system_schema.dropped_columns INFO [main] 2018-01-30 13:14:42,525 ColumnFamilyStore.java:391 - Initializing system_schema.views INFO [main] 2018-01-30 13:14:42,532 ColumnFamilyStore.java:391 - Initializing system_schema.types INFO [main] 2018-01-30 13:14:42,539 ColumnFamilyStore.java:391 - Initializing system_schema.functions INFO [main] 2018-01-30 13:14:42,547 ColumnFamilyStore.java:391 - Initializing system_schema.aggregates INFO [main] 2018-01-30 13:14:42,554 ColumnFamilyStore.java:391 - Initializing system_schema.indexes INFO [main] 2018-01-30 13:14:42,859 StorageService.java:557 - Populating token metadata from system tables INFO [main] 2018-01-30 13:14:42,928 StorageService.java:564 - Token metadata: Normal Tokens: cassandra.mycompany.com/127.0.0.1:[-9127233696990875718, -9087738344019192759, -9000799545093992742, -8913320515565877973, -8865697932437688996, -8859771719362370802, [...] 8456564536631080178, 8460160695614040599, 8604911031119732505, 8816757312948167691, 8864804425022295457, 8883437542398835837, 9058152561071736053, 9082297484402456608] INFO [main] 2018-01-30 13:14:43,618 ColumnFamilyStore.java:391 - Initializing system_distributed.parent_repair_history INFO [main] 2018-01-30 13:14:43,678 ColumnFamilyStore.java:391 - Initializing system_distributed.repair_history INFO [main] 2018-01-30 13:14:43,698 ColumnFamilyStore.java:391 - Initializing system_distributed.view_build_status INFO [main] 2018-01-30 13:14:43,706 ColumnFamilyStore.java:391 - Initializing cycling.calendar INFO [main] 2018-01-30 13:14:43,716 ColumnFamilyStore.java:391 - Initializing cycling.cyclist_alt_stats INFO [main] 2018-01-30 13:14:43,721 ColumnFamilyStore.java:391 - Initializing cycling.cyclist_name INFO [main] 2018-01-30 13:14:43,732 ColumnFamilyStore.java:391 - Initializing cycling.route INFO [main] 2018-01-30 13:14:43,737 ColumnFamilyStore.java:391 - Initializing cycling.whimsey INFO [main] 2018-01-30 13:14:44,398 ColumnFamilyStore.java:391 - Initializing system_auth.resource_role_permissons_index INFO [main] 2018-01-30 13:14:44,410 ColumnFamilyStore.java:391 - Initializing system_auth.role_members INFO [main] 2018-01-30 13:14:44,415 ColumnFamilyStore.java:391 - Initializing system_auth.role_permissions INFO [main] 2018-01-30 13:14:44,427 ColumnFamilyStore.java:391 - Initializing system_auth.roles INFO [main] 2018-01-30 13:14:44,434 ColumnFamilyStore.java:391 - Initializing system_traces.events INFO [main] 2018-01-30 13:14:44,436 ColumnFamilyStore.java:391 - Initializing system_traces.sessions INFO [pool-3-thread-1] 2018-01-30 13:14:44,439 AutoSavingCache.java:189 - reading saved cache /var/lib/cassandra/saved_caches/KeyCache-d.db INFO [pool-3-thread-1] 2018-01-30 13:14:44,458 AutoSavingCache.java:165 - Completed loading (20 ms; 375 keys) KeyCache cache INFO [main] 2018-01-30 13:14:44,470 CommitLog.java:161 - Replaying /var/lib/cassandra/commitlog/CommitLog-6-1517334004077.log, /var/lib/cassandra/commitlog/CommitLog-6-1517334004078.log INFO [main] 2018-01-30 13:14:44,492 CommitLog.java:163 - Log replay complete, 0 replayed mutations INFO [main] 2018-01-30 13:14:44,493 StorageService.java:557 - Populating token metadata from system tables INFO [main] 2018-01-30 13:14:44,518 StorageService.java:564 - Token metadata: Normal Tokens: cassandra.mycompany.com/127.0.0.1:[-9127233696990875718, -9087738344019192759, -9000799545093992742, -8913320515565877973, -8865697932437688996, -8859771719362370802, [...] 8456564536631080178, 8460160695614040599, 8604911031119732505, 8816757312948167691, 8864804425022295457, 8883437542398835837, 9058152561071736053, 9082297484402456608] INFO [main] 2018-01-30 13:14:44,599 StorageService.java:575 - Cassandra version: 3.0.15 INFO [main] 2018-01-30 13:14:44,612 StorageService.java:576 - Thrift API version: 20.1.0 INFO [main] 2018-01-30 13:14:44,612 StorageService.java:577 - CQL supported versions: 3.4.0 (default: 3.4.0) INFO [main] 2018-01-30 13:14:44,713 IndexSummaryManager.java:85 - Initializing index summary manager with a memory pool size of 97 MB and a resize interval of 60 minutes INFO [main] 2018-01-30 13:14:44,726 StorageService.java:596 - Loading persisted ring state INFO [main] 2018-01-30 13:14:44,745 StorageService.java:745 - Starting up server gossip INFO [main] 2018-01-30 13:14:44,815 TokenMetadata.java:479 - Updating topology for cassandra.mycompany.com/127.0.0.1 INFO [main] 2018-01-30 13:14:44,815 TokenMetadata.java:479 - Updating topology for cassandra.mycompany.com/127.0.0.1 INFO [main] 2018-01-30 13:14:44,853 MessagingService.java:587 - Starting Messaging Service on cassandra.mycompany.com/127.0.0.1:7000 (eth0) INFO [main] 2018-01-30 13:14:44,875 StorageService.java:920 - Using saved tokens [-1070547857932591802, -1160331912647069113, -1249655781347423069, -1296122843550004310, [...] 8864804425022295457, 8883437542398835837, 9058152561071736053, 9082297484402456608] INFO [main] 2018-01-30 13:14:45,298 StorageService.java:2007 - Node cassandra.mycompany.com/127.0.0.1 state jump to NORMAL INFO [main] 2018-01-30 13:14:45,304 CassandraDaemon.java:656 - Waiting for gossip to settle before accepting client requests... INFO [main] 2018-01-30 13:14:53,306 CassandraDaemon.java:687 - No gossip backlog; proceeding INFO [main] 2018-01-30 13:14:53,417 NativeTransportService.java:70 - Netty using native Epoll event loop INFO [main] 2018-01-30 13:14:53,479 Server.java:159 - Using Netty Version: [netty-buffer=netty-buffer-4.0.44.Final.452812a, netty-codec=netty-codec-4.0.44.Final.452812a, netty-codec-haproxy=netty-codec-haproxy-4.0.44.Final.452812a, netty-codec-http=netty-codec-http-4.0.44.Final.452812a, netty-codec-socks=netty-codec-socks-4.0.44.Final.452812a, netty-common=netty-common-4.0.44.Final.452812a, netty-handler=netty-handler-4.0.44.Final.452812a, netty-tcnative=netty-tcnative-1.1.33.Fork26.142ecbb, netty-transport=netty-transport-4.0.44.Final.452812a, netty-transport-native-epoll=netty-transport-native-epoll-4.0.44.Final.452812a, netty-transport-rxtx=netty-transport-rxtx-4.0.44.Final.452812a, netty-transport-sctp=netty-transport-sctp-4.0.44.Final.452812a, netty-transport-udt=netty-transport-udt-4.0.44.Final.452812a] INFO [main] 2018-01-30 13:14:53,480 Server.java:160 - Starting listening for CQL clients on cassandra.mycompany.com/127.0.0.1:9042 (unencrypted)... INFO [main] 2018-01-30 13:14:53,565 ThriftServer.java:119 - Binding thrift service to cassandra.mycompany.com/127.0.0.1:9160 INFO [Thread-2] 2018-01-30 13:14:53,573 ThriftServer.java:136 - Listening for thrift clients...
Appendix B: Apache Cassandra (Single & Multi-node Cluster) Setup & Testing Instructions for Windows (2012-R2 x64)
How to set the FQDN (hostname + primary DNS suffix)
1. Set the hostname and primary DNS suffix on the machine itself by doing the following:
1.1. Go to Control Panel > System and Security > System. On the sidebar on the left click on Advanced system settings.
1.2. In the System Properties window, go to the "Computer Name" tab, then click the Change... button
1.3. In the Computer Name/Domain Changes window, under Computer Name, type in the new computer name (ex: ICX-SYNDEIA
).
The hostname is now entered. To set the DNS suffix, click More...
1.4. In the DNS Suffix and NetBIOS Computer Name window, in the Primary DNS suffix of this computer field, type in the DNS suffix, ex: .microsoft.com, .nasa.gov, etc.
The primary DNS suffix is now entered.
Note, the hostname and primary DNS suffix combined together is referred to as the Fully Qualified Domain Name (FQDN), ex: icx-syndeia.mydomain.com
.
1.5 Click OK, OK, OK
How to set the System JAVA_HOME Environment Variable
2. To set the System JAVA_HOME=C:\Program Files\Java\jre1.8.0_151
Environment Variable, perform the following:
2.1. Go to Control Panel, System and Security, System, Click on Advanced system settings on the sidebar on the left & then Environment Variables
2.2. In the Environment Variables window, click New... under the "System variables" section.
2.3. In the New System Variable window, enter in JAVA_HOME
for Variable name and C:\Program Files\Java\jre1.8.0_151
for Variable value.
2.4. Click OK, OK, OK
How to enable QuickEdit Mode, increase scrollback history, and set window size for CMD.EXE
3. To enable QuickEdit Mode, increase the scrollback history, width, and height to be as large as possible, L-click on the window in the top-right & select Properties. Enable QuickEdit Mode & set the Screen buffer size & window to be as large as possible, ex: 10000, 160 x 92 respectively.
Example successful Cassandra startup log output when started with LEGACY option
4. The following is an example log of normal Cassandra startup on Windows with the LEGACY
option, for a single-node, to the point where it is waiting for connections from clients:
C:\Program Files\apache-cassandra-3.0.15>.\bin\cassandra.bat LEGACY WARNING! Powershell script execution unavailable. Please use 'powershell Set-ExecutionPolicy Unrestricted' on this user-account to run cassandra with fully featured functionality on this platform. Starting with legacy startup options Starting Cassandra Server INFO 17:30:52 Configuration location: file:/C:/Program%20Files%20(x86)/apache-cassandra-3.0.15/conf/cassandra.yaml INFO 17:30:52 Node configuration:[allocate_tokens_for_keyspace=null; authenticator=AllowAllAuthenticator; authorizer=AllowAllAuthorizer; auto_bootstrap=true; a uto_snapshot=true; batch_size_fail_threshold_in_kb=50; batch_size_warn_threshold_in_kb=5; batchlog_replay_throttle_in_kb=1024; broadcast_address=null; broadcast _rpc_address=null; buffer_pool_use_heap_if_exhausted=true; cas_contention_timeout_in_ms=1000; client_encryption_options=<REDACTED>; cluster_name=Test Cluster; c olumn_index_size_in_kb=64; commit_failure_policy=stop; commitlog_compression=null; commitlog_directory=null; commitlog_max_compression_buffers_in_pool=3; commit log_periodic_queue_size=-1; commitlog_segment_size_in_mb=32; commitlog_sync=periodic; commitlog_sync_batch_window_in_ms=null; commitlog_sync_period_in_ms=10000; commitlog_total_space_in_mb=null; compaction_large_partition_warning_threshold_mb=100; compaction_throughput_mb_per_sec=16; concurrent_compactors=null; concurr ent_counter_writes=32; concurrent_materialized_view_writes=32; concurrent_reads=32; concurrent_replicates=null; concurrent_writes=32; counter_cache_keys_to_save =2147483647; counter_cache_save_period=7200; counter_cache_size_in_mb=null; counter_write_request_timeout_in_ms=5000; cross_node_timeout=false; data_file_direct ories=[Ljava.lang.String;@6ee12bac; disk_access_mode=auto; disk_failure_policy=stop; disk_optimization_estimate_percentile=0.95; disk_optimization_page_cross_ch ance=0.1; disk_optimization_strategy=ssd; dynamic_snitch=true; dynamic_snitch_badness_threshold=0.1; dynamic_snitch_reset_interval_in_ms=600000; dynamic_snitch_ update_interval_in_ms=100; enable_scripted_user_defined_functions=false; enable_user_defined_functions=false; enable_user_defined_functions_threads=true; encryp tion_options=null; endpoint_snitch=SimpleSnitch; file_cache_size_in_mb=512; gc_log_threshold_in_ms=200; gc_warn_threshold_in_ms=1000; hinted_handoff_disabled_da tacenters=[]; hinted_handoff_enabled=true; hinted_handoff_throttle_in_kb=1024; hints_compression=null; hints_directory=null; hints_flush_period_in_ms=10000; inc remental_backups=false; index_interval=null; index_summary_capacity_in_mb=null; index_summary_resize_interval_in_minutes=60; initial_token=null; inter_dc_stream _throughput_outbound_megabits_per_sec=200; inter_dc_tcp_nodelay=false; internode_authenticator=null; internode_compression=all; internode_recv_buff_size_in_byte s=null; internode_send_buff_size_in_bytes=null; key_cache_keys_to_save=2147483647; key_cache_save_period=14400; key_cache_size_in_mb=null; listen_address=localh ost; listen_interface=null; listen_interface_prefer_ipv6=false; listen_on_broadcast_address=false; max_hint_window_in_ms=10800000; max_hints_delivery_threads=2; max_hints_file_size_in_mb=128; max_mutation_size_in_kb=null; max_streaming_retries=3; max_value_size_in_mb=256; memtable_allocation_type=heap_buffers; memtable _cleanup_threshold=null; memtable_flush_writers=null; memtable_heap_space_in_mb=null; memtable_offheap_space_in_mb=null; min_free_space_per_drive_in_mb=50; nati ve_transport_max_concurrent_connections=-1; native_transport_max_concurrent_connections_per_ip=-1; native_transport_max_frame_size_in_mb=256; native_transport_m ax_threads=128; native_transport_port=9042; native_transport_port_ssl=null; num_tokens=256; otc_backlog_expiration_interval_ms=200; otc_coalescing_enough_coales ced_messages=8; otc_coalescing_strategy=TIMEHORIZON; otc_coalescing_window_us=200; partitioner=org.apache.cassandra.dht.Murmur3Partitioner; permissions_cache_ma x_entries=1000; permissions_update_interval_in_ms=-1; permissions_validity_in_ms=2000; phi_convict_threshold=8.0; range_request_timeout_in_ms=10000; read_reques t_timeout_in_ms=5000; request_scheduler=org.apache.cassandra.scheduler.NoScheduler; request_scheduler_id=null; request_scheduler_options=null; request_timeout_i n_ms=10000; role_manager=CassandraRoleManager; roles_cache_max_entries=1000; roles_update_interval_in_ms=-1; roles_validity_in_ms=2000; row_cache_class_name=org .apache.cassandra.cache.OHCProvider; row_cache_keys_to_save=2147483647; row_cache_save_period=0; row_cache_size_in_mb=0; rpc_address=localhost; rpc_interface=nu ll; rpc_interface_prefer_ipv6=false; rpc_keepalive=true; rpc_listen_backlog=50; rpc_max_threads=2147483647; rpc_min_threads=16; rpc_port=9160; rpc_recv_buff_siz e_in_bytes=null; rpc_send_buff_size_in_bytes=null; rpc_server_type=sync; saved_caches_directory=null; seed_provider=org.apache.cassandra.locator.SimpleSeedProvi der{seeds=127.0.0.1}; server_encryption_options=<REDACTED>; snapshot_before_compaction=false; ssl_storage_port=7001; sstable_preemptive_open_interval_in_mb=50; start_native_transport=true; start_rpc=false; storage_port=7000; stream_throughput_outbound_megabits_per_sec=200; streaming_socket_timeout_in_ms=86400000; thrif t_framed_transport_size_in_mb=15; thrift_max_message_length_in_mb=16; tombstone_failure_threshold=100000; tombstone_warn_threshold=1000; tracetype_query_ttl=864 00; tracetype_repair_ttl=604800; trickle_fsync=false; trickle_fsync_interval_in_kb=10240; truncate_request_timeout_in_ms=60000; unlogged_batch_across_partitions _warn_threshold=10; user_defined_function_fail_timeout=1500; user_defined_function_warn_timeout=500; user_function_timeout_policy=die; windows_timer_interval=1; write_request_timeout_in_ms=2000] INFO 17:30:52 DiskAccessMode 'auto' determined to be mmap, indexAccessMode is mmap INFO 17:30:52 Global memtable on-heap threshold is enabled at 507MB INFO 17:30:52 Global memtable off-heap threshold is enabled at 507MB WARN 17:30:52 Small commitlog volume detected at C:\Program Files\apache-cassandra-3.0.15\data\commitlog; setting commitlog_total_space_in_mb to 7591. Y ou can override this in cassandra.yaml WARN 17:30:52 Only 9041 MB free across all data volumes. Consider adding more capacity to your cluster or removing obsolete snapshots INFO 17:30:52 Hostname: SYND-W2012R2 INFO 17:30:52 JVM vendor/version: Java HotSpot(TM) 64-Bit Server VM/1.8.0_151 INFO 17:30:52 Heap size: 2130051072/2130051072 INFO 17:30:52 Code Cache Non-heap memory: init = 2555904(2496K) used = 4098752(4002K) committed = 4128768(4032K) max = 251658240(245760K) INFO 17:30:52 Metaspace Non-heap memory: init = 0(0K) used = 17073320(16673K) committed = 17563648(17152K) max = -1(-1K) INFO 17:30:52 Compressed Class Space Non-heap memory: init = 0(0K) used = 2171624(2120K) committed = 2359296(2304K) max = 1073741824(1048576K) INFO 17:30:52 Par Eden Space Heap memory: init = 139591680(136320K) used = 83906248(81939K) committed = 139591680(136320K) max = 139591680(136320K) INFO 17:30:52 Par Survivor Space Heap memory: init = 17432576(17024K) used = 0(0K) committed = 17432576(17024K) max = 17432576(17024K) INFO 17:30:52 CMS Old Gen Heap memory: init = 1973026816(1926784K) used = 0(0K) committed = 1973026816(1926784K) max = 1973026816(1926784K) INFO 17:30:52 Classpath: C:\Program Files\apache-cassandra-3.0.15\conf;C:\Program Files\apache-cassandra-3.0.15\lib\airline-0.6.jar;C:\Program File s\apache-cassandra-3.0.15\lib\antlr-runtime-3.5.2.jar;C:\Program Files\apache-cassandra-3.0.15\lib\apache-cassandra-3.0.15.jar;C:\Program Files\apache-cassandra-3.0.15\lib\apache-cassandra-clientutil-3.0.15.jar;C:\Program Files\apache-cassandra-3.0.15\lib\apache-cassandra-thrift-3.0.15.jar;C:\Pr ogram Files\apache-cassandra-3.0.15\lib\asm-5.0.4.jar;C:\Program Files\apache-cassandra-3.0.15\lib\cassandra-driver-core-3.0.1-shaded.jar;C:\Program Files\apache-cassandra-3.0.15\lib\commons-cli-1.1.jar;C:\Program Files\apache-cassandra-3.0.15\lib\commons-codec-1.2.jar;C:\Program Files\apa che-cassandra-3.0.15\lib\commons-lang3-3.1.jar;C:\Program Files\apache-cassandra-3.0.15\lib\commons-math3-3.2.jar;C:\Program Files\apache-cassandra- 3.0.15\lib\compress-lzf-0.8.4.jar;C:\Program Files\apache-cassandra-3.0.15\lib\concurrentlinkedhashmap-lru-1.4.jar;C:\Program Files\apache-cassandra -3.0.15\lib\disruptor-3.0.1.jar;C:\Program Files\apache-cassandra-3.0.15\lib\ecj-4.4.2.jar;C:\Program Files\apache-cassandra-3.0.15\lib\guava-18.0.j ar;C:\Program Files\apache-cassandra-3.0.15\lib\high-scale-lib-1.0.6.jar;C:\Program Files\apache-cassandra-3.0.15\lib\jackson-core-asl-1.9.2.jar;C:\ Program Files\apache-cassandra-3.0.15\lib\jackson-mapper-asl-1.9.2.jar;C:\Program Files\apache-cassandra-3.0.15\lib\jamm-0.3.0.jar;C:\Program Files\apache-cassandra-3.0.15\lib\javax.inject.jar;C:\Program Files\apache-cassandra-3.0.15\lib\jbcrypt-0.3m.jar;C:\Program Files\apache-cassandra-3 .0.15\lib\jcl-over-slf4j-1.7.7.jar;C:\Program Files\apache-cassandra-3.0.15\lib\jna-4.2.2.jar;C:\Program Files\apache-cassandra-3.0.15\lib\joda-time -2.4.jar;C:\Program Files\apache-cassandra-3.0.15\lib\json-simple-1.1.jar;C:\Program Files\apache-cassandra-3.0.15\lib\jstackjunit-0.0.1.jar;C:\Prog ram Files\apache-cassandra-3.0.15\lib\libthrift-0.9.2.jar;C:\Program Files\apache-cassandra-3.0.15\lib\log4j-over-slf4j-1.7.7.jar;C:\Program Files ( x86)\apache-cassandra-3.0.15\lib\logback-classic-1.1.3.jar;C:\Program Files\apache-cassandra-3.0.15\lib\logback-core-1.1.3.jar;C:\Program Files\apac he-cassandra-3.0.15\lib\lz4-1.3.0.jar;C:\Program Files\apache-cassandra-3.0.15\lib\metrics-core-3.1.0.jar;C:\Program Files\apache-cassandra-3.0.15\l ib\metrics-jvm-3.1.0.jar;C:\Program Files\apache-cassandra-3.0.15\lib\metrics-logback-3.1.0.jar;C:\Program Files\apache-cassandra-3.0.15\lib\netty-a ll-4.0.44.Final.jar;C:\Program Files\apache-cassandra-3.0.15\lib\ohc-core-0.4.3.jar;C:\Program Files\apache-cassandra-3.0.15\lib\ohc-core-j8-0.4.3.j ar;C:\Program Files\apache-cassandra-3.0.15\lib\reporter-config-base-3.0.0.jar;C:\Program Files\apache-cassandra-3.0.15\lib\reporter-config3-3.0.0.j ar;C:\Program Files\apache-cassandra-3.0.15\lib\sigar-1.6.4.jar;C:\Program Files\apache-cassandra-3.0.15\lib\slf4j-api-1.7.7.jar;C:\Program Files (x 86)\apache-cassandra-3.0.15\lib\snakeyaml-1.11.jar;C:\Program Files\apache-cassandra-3.0.15\lib\snappy-java-1.1.1.7.jar;C:\Program Files\apache-cass andra-3.0.15\lib\ST4-4.0.8.jar;C:\Program Files\apache-cassandra-3.0.15\lib\stream-2.5.2.jar;C:\Program Files\apache-cassandra-3.0.15\lib\thrift-ser ver-0.3.7.jar;C:\Program Files\apache-cassandra-3.0.15\build\classes\main;C:\Program Files\apache-cassandra-3.0.15\build\classes\thrift;C:\Program F iles\apache-cassandra-3.0.15\lib\jamm-0.3.0.jar INFO 17:30:52 JVM Arguments: [-ea, -javaagent:C:\Program Files\apache-cassandra-3.0.15\lib\jamm-0.3.0.jar, -Xms2G, -Xmx2G, -XX:+HeapDumpOnOutOfMemoryErro r, -XX:+UseParNewGC, -XX:+UseConcMarkSweepGC, -XX:+CMSParallelRemarkEnabled, -XX:SurvivorRatio=8, -XX:MaxTenuringThreshold=1, -XX:CMSInitiatingOccupancyFraction =75, -XX:+UseCMSInitiatingOccupancyOnly, -Dlogback.configurationFile=logback.xml, -Djava.library.path=C:\Program Files\apache-cassandra-3.0.15\lib\sigar-b in, -Dcassandra.jmx.local.port=7199, -Dcassandra, -Dcassandra-foreground=yes, -Dcassandra.logdir=C:\Program Files\apache-cassandra-3.0.15\logs, -Dcassandr a.storagedir=C:\Program Files\apache-cassandra-3.0.15\data] WARN 17:30:52 JMX is not enabled to receive remote connections. Please see cassandra-env.sh for more info. INFO 17:30:52 Initializing SIGAR library WARN 17:30:52 Cassandra server running in degraded mode. Is swap disabled? : false, Address space adequate? : true, nofile limit adequate? : true, nproc limi t adequate? : true INFO 17:30:53 Initializing system.IndexInfo INFO 17:30:54 Initializing system.batches INFO 17:30:54 Initializing system.paxos INFO 17:30:54 Initializing system.local INFO 17:30:54 Global buffer pool is enabled, when pool is exahusted (max is 512 mb) it will allocate on heap INFO 17:30:54 Initializing key cache with capacity of 100 MBs. INFO 17:30:54 Initializing row cache with capacity of 0 MBs INFO 17:30:54 Initializing counter cache with capacity of 50 MBs INFO 17:30:54 Scheduling counter cache save to every 7200 seconds (going to save all keys). INFO 17:30:54 Initializing system.peers INFO 17:30:54 Initializing system.peer_events INFO 17:30:54 Initializing system.range_xfers INFO 17:30:54 Initializing system.compaction_history INFO 17:30:54 Initializing system.sstable_activity INFO 17:30:54 Initializing system.size_estimates INFO 17:30:54 Initializing system.available_ranges INFO 17:30:54 Initializing system.views_builds_in_progress INFO 17:30:54 Initializing system.built_views INFO 17:30:54 Initializing system.hints INFO 17:30:54 Initializing system.batchlog INFO 17:30:54 Initializing system.schema_keyspaces INFO 17:30:54 Initializing system.schema_columnfamilies INFO 17:30:54 Initializing system.schema_columns INFO 17:30:54 Initializing system.schema_triggers INFO 17:30:54 Initializing system.schema_usertypes INFO 17:30:54 Initializing system.schema_functions INFO 17:30:54 Initializing system.schema_aggregates INFO 17:30:54 Initializing system_schema.keyspaces INFO 17:30:54 Initializing system_schema.tables INFO 17:30:55 Initializing system_schema.columns INFO 17:30:55 Initializing system_schema.triggers INFO 17:30:55 Initializing system_schema.dropped_columns INFO 17:30:55 Initializing system_schema.views INFO 17:30:55 Initializing system_schema.types INFO 17:30:55 Initializing system_schema.functions INFO 17:30:55 Initializing system_schema.aggregates INFO 17:30:55 Initializing system_schema.indexes INFO 17:30:55 Populating token metadata from system tables INFO 17:30:55 Token metadata: Normal Tokens: localhost/127.0.0.1:[-9157915542431144898, -9045367399584240727, -8950040178285586622, -8897944121059937402, -8886028375310256046, [...] 8588494843378235250, 8658732490624262062, 8691423281461372027, 8707602252990936901, 8783126619435090505, 88524061911133 03034, 8944624027448194301, 8985819862921042931] INFO 17:30:55 Initializing system_distributed.parent_repair_history INFO 17:30:55 Initializing system_distributed.repair_history INFO 17:30:55 Initializing system_auth.resource_role_permissons_index INFO 17:30:55 Initializing system_auth.role_members INFO 17:30:55 Initializing system_auth.role_permissions INFO 17:30:55 Initializing system_auth.roles INFO 17:30:55 Initializing system_traces.events INFO 17:30:55 Initializing system_traces.sessions INFO 17:30:55 Completed loading (21 ms; 17 keys) KeyCache cache INFO 17:30:55 Replaying C:\Program Files\apache-cassandra-3.0.15\data\commitlog\CommitLog-6-1513272522955.log INFO 17:30:56 Log replay complete, 0 replayed mutations INFO 17:30:56 Populating token metadata from system tables INFO 17:30:56 Token metadata: Normal Tokens: localhost/127.0.0.1:[-9157915542431144898, -9045367399584240727, -8950040178285586622, -8897944121059937402, -8886028375310256046, [...] 8588494843378235250, 8658732490624262062, 8691423281461372027, 8707602252990936901, 8783126619435090505, 88524061911133 03034, 8944624027448194301, 8985819862921042931] INFO 17:30:56 Cassandra version: 3.0.15 INFO 17:30:56 Thrift API version: 20.1.0 INFO 17:30:56 CQL supported versions: 3.4.0 (default: 3.4.0) INFO 17:30:56 Initializing index summary manager with a memory pool size of 101 MB and a resize interval of 60 minutes INFO 17:30:56 Loading persisted ring state INFO 17:30:56 Starting up server gossip INFO 17:30:56 Updating topology for localhost/127.0.0.1 INFO 17:30:56 Updating topology for localhost/127.0.0.1 INFO 17:30:56 Starting Messaging Service on localhost/127.0.0.1:7000 (Software Loopback Interface 1) INFO 17:30:56 Using saved tokens [-1176118340055934116, -1185191700875271446, -1199479527009721761, -1379870387553665109, -1433948168209966360, -14406723745691 94964, [...] 864690239103539512, 8658732490624262062, 868202796375747, 8691423281461372027, 8707602252990936901, 8783126619435090505, 8852406191113303034, 8944624027448194301, 8985819862921042931] INFO 17:30:56 Node localhost/127.0.0.1 state jump to NORMAL INFO 17:30:56 Netty using Java NIO event loop INFO 17:30:56 Using Netty Version: [netty-buffer=netty-buffer-4.0.44.Final.452812a, netty-codec=netty-codec-4.0.44.Final.452812a, netty-codec-haproxy=netty-cod ec-haproxy-4.0.44.Final.452812a, netty-codec-http=netty-codec-http-4.0.44.Final.452812a, netty-codec-socks=netty-codec-socks-4.0.44.Final.452812a, netty-common= netty-common-4.0.44.Final.452812a, netty-handler=netty-handler-4.0.44.Final.452812a, netty-tcnative=netty-tcnative-1.1.33.Fork26.142ecbb, netty-transport=netty- transport-4.0.44.Final.452812a, netty-transport-native-epoll=netty-transport-native-epoll-4.0.44.Final.452812a, netty-transport-rxtx=netty-transport-rxtx-4.0.44 .Final.452812a, netty-transport-sctp=netty-transport-sctp-4.0.44.Final.452812a, netty-transport-udt=netty-transport-udt-4.0.44.Final.452812a] INFO 17:30:56 Starting listening for CQL clients on localhost/127.0.0.1:9042 (unencrypted)... INFO 17:30:56 Not starting RPC server as requested. Use JMX (StorageService->startRPCServer()) or nodetool (enablethrift) to start it
How to safely clone a Windows machine.
5. Prior to cloning, you may want to disjoin yourself from any Active Directory (AD) domain. Once disjoined, prep the machine to be imaged with Microsoft Deployment Toolkit's SYSPREP.EXE
, (this tool resets items such as Plug 'N Play (PnP) detection, machine-specific state information, and regenerates the machine Security Identifier (SID) - note, this does not update any existing references to the old SID in the registry - or elsewhere- made by other applications. Also, keep in mind this is the only way Microsoft officially supports cloned machines. See Microsoft's documentation for further details on the toolkit and subject). If the source machine is a physical box, use a cloning tool such as Altiris's RapidDeploy, Symantec Ghost, etc. If virtual, use the appropriate vmWare, VirtualBox, or KVM, etc. Virtual Machine (VM) or Virtual Machine Disk (VMDK) cloning methods/tools. Once cloned & deployed, rejoin the domain & optionally run a SID registry update tool, ex: NewSID.
How to create a sample Cassandra Keyspace
6. To create a new keyspace perform the following step.
For a single node, from CQLSH run:
CREATE KEYSPACE IF NOT EXISTS cycling WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
For a multi-node cluster, verify the Cassandra “datacenter” name (default = dc1
) from the CLI by running nodetool status
and then from CQLSH run:
CREATE KEYSPACE IF NOT EXISTS cycling WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', '<datacenter_name>' : <total_number_of_nodes> }; -- where <datacenter_name> = the name of the datacenter as shown via nodetool status, and <total_number_of_nodes> = total # of nodes (in the cluster)
How to create sample tables in a Cassandra Keyspace
7. To create sample tables in a keyspace, from CQLSH run:
CREATE TABLE cycling.cyclist_name ( id UUID PRIMARY KEY, lastname text, firstname text ); CREATE TABLE cycling.calendar ( race_id int PRIMARY KEY, race_start_date timestamp, race_end_date timestamp, race_name text );
How to insert sample data into tables in a Cassandra Keyspace
8. To insert sample data into tables in a keyspace, from CQLSH run:
INSERT INTO cycling.cyclist_name (id, lastname, firstname) VALUES (5b6962dd-3f90-4c93-8f61-eabfa4a803e2, 'VOS','Marianne'); INSERT INTO cycling.calendar (race_id, race_start_date, race_end_date, race_name) VALUES (201, '2015-02-18', '2015-02-22', $$Women's Tour of New Zealand$$); -- use "$$"..."$$" if string contains special chars
How to create a new logon user (role) and grant permissions to a sample Cassandra Keyspace
9. To create a new logon user (role) with a password and grant permissions to the sample keyspace, from CQLSH run:
CREATE ROLE cyclingadmin WITH PASSWORD = 'pel0t0n' AND LOGIN = true; GRANT ALL PERMISSIONS ON KEYSPACE cycling TO cyclingadmin;
DataStax DevCenter
10. You can download DevCenter from https://academy.datastax.com/downloads, you will need a free DataStax Academy account (note, DataStax is the company that was the original chair/conservator of the Apache Cassandra project).
Cassandra Encryption & Performance Optimizations
11. By default, internode encryption is set to: internode_encryption: none
. If you wish to enable internode encryption, set this to either all
, dc
, or rack
(where dc = inter-datacenter encryption). You may wish to also change the keystore and truststore passwords to something other than the default. See https://docs.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CreateKeystore for instructions on how to setup a Keystore.
By default, client/server encryption encryption is disabled & optional, ie: enabled: false
& optional: false
. If you wish to enable this, set enabled
to true
. If you wish to make this mandatory, set optional
to true
. You may wish to also change the keystore and truststore passwords to something other than the default. See https://docs.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CreateKeystore for instructions on how to setup a Keystore.
For performance optimizations, examine https://docs.datastax.com/en/dse/5.1/dse-admin/datastax_enterprise/config/configRecommendedSettings.html (Note, this guide was written for Linux servers originally but some of suggestions may still apply)
Cassandra Consistency Levels
12. Consistency Level (CL) = ALL (CONSISTENCY ALL
) means for a given keyspace, a read/write query needs to hear back from ALL nodes, this is the strongest consistency level but obviously the slowest. CL = ONE (CONSISTENCY ONE
) means for a given keyspace, a read/write query only needs to hear back from 1 node total, this is one of the weaker consistency levels but faster obviously, this is the default. There is also CL=QUORUM (CONSISTENCY QUORUM;
) which means for a given keyspace, a read/write query needs to hear back from a “quorum” of nodes. A quorum = floor ((keyspace_x_in_datacenter_1_rf ... + keyspace_x_in_datacenter_n_rf) / 2 + 1); where RF = Replication Factor & n = nodes keyspace is replicated to, ex: for a 3-node cluster in one DC with keyspace with a RF=3, floor((datacenter1_rf/2)+1) = floor((3/2)+1) = floor(1.5+1) = floor(2.5) = 2; therefore a min of 2 nodes must respond. This a mid-point between CL=ALL and CL=ONE and offers a compromise between a strong consistency level and good performance.
Cassandra Cluster Renaming
13. To rename the cluster, (on each machine if > 1) launch CQLSH, update the cluster name, flush the system table, and restart Cassandra, ie:
13.1. Launch CQLSH (see Appendix C3.2 (for Windows) or Appendix C3.3 (for Linux) below).
13.2. Enter in password (default = `cassandra`, if default, you may wish to change/secure this),
13.3. UPDATE system.local SET cluster_name = '
MyNewClusterName' where key='local';
, where MyNewClusterName = the new name for the cluster
13.4. Exit CQLSH, ie: exit;
13.4. Run nodetool flush system
,
13.5. Edit cassandra.yaml
(make a backup first),
13.6. Change cluster_name
to MyNewClusterName, where MyNewClusterName = the new name for the cluster.
13.7. Save cassandra.yaml
,
13.8. Restart Cassandra services, ie: sudo systemctl restart cassandra
(systemctl status cassandra
to verify it re-started correctly, if not, review changes for errors),
13.9. Confirm cluster name change took effect by running nodetool describecluster
to verify Cluster name change in output.
13.10. Update firewall settings on server (reload if necessary, ie: sudo firewall-cmd --reload
) and/or your cloud provider, ie: AWS, etc.
Appendix C: Syndeia Cloud Installation Instructions
Validate/Configure Cassandra is setup to authenticate
1. Ensure that the Cassandra database is setup to authenticate. Follow the steps below to do this.
1.1. On a Cassandra node, open the .\conf\cassandra.yaml
file
1.2. On a Cassandra node, in cassandra.yaml
, validate authenticator=PasswordAuthenticator
(the default value AllowAllAuthenticator
disables authentication and is never safe. For more details, see: http://cassandra.apache.org/doc/latest/configuration/cassandra_config_file.html#authenticator). Save and close the file. (Re)start the Cassandra service.
How to launch a CQLSH session on Windows
2. To launch a CQLSH session on Windows, navigate to the Cassandra bin directory, ex: C:\Program Files\apache-cassandra-3.0.15\bin
and run cqlsh -u
<username> <cassandra_server_FQDN>, ex: cqlsh -u cassandra myserver.mydomain.com
. If you are connecting to localhost, you can optionally omit the servername. You should be prompted for credentials. Enter your credentials to authenticate.
Note, if you get a message saying "Warning: Timezone defined and 'pytz' module for timezone conversion not installed. Timestamps will be displayed in UTC timezone.
", install the pytz
module using the PIP Installer, ie, in a terminal run: pip install pytz
.
How to launch a CQLSH session on Linux
3. To launch a CQLSH session on Linux, run cqlsh -u
<username> <cassandra_server_FQDN>, ex: cqlsh -u cassandra myserver.mydomain.com
. If you are connecting to localhost, you can optionally omit the servername. You should be prompted for credentials. Enter your credentials to authenticate.
How to create a new syndeia_admin role, confirm creation, and assign permissions
4. To create a new syndeia_admin
role with a strong password, run the following, ie:
CREATE ROLE IF NOT EXISTS syndeia_admin WITH LOGIN = true AND PASSWORD = '
<syndeia_admin_strong_password>';
where <syndeia_admin_strong_password> is a strong password, ex: ‘M1Str9ngPass80rd
'. Then, run the following command to list all roles to confirm syndeia_admin is listed.
LIST ROLES;
cassandra@cqlsh> CREATE ROLE IF NOT EXISTS syndeia_admin WITH LOGIN=TRUE AND PASSWORD='syndeia4all'; cassandra@cqlsh> LIST ROLES; role | super | login | options ---------------+-------+-------+--------- cassandra | True | True | {} syndeia_admin | False | True | {}
To grant all permissions on the syndeia
keyspace to the syndeia_admin
role, run the following, ie:
GRANT ALL PERMISSIONS ON KEYSPACE syndeia TO syndeia_admin;
Note: For more details on the GRANT
command, refer to: https://docs.datastax.com/en/cql/3.3/cql/cql_reference/cqlGrant.html?hl=grant
Appendix D: Setting up Services to Start on Boot
How to create a symlink to syndeia-cloud on Windows
1. From CMD.EXE
, run mklink /d
<link-location-and-name> <destination>, ex:
C:\Program Files\Intercax>mklink /d "c:\Program Files\Intercax\syndeia-cloud-current" "c:\Program Files\Intercax\syndeia-cloud-2018-03-05" symbolic link created for c:\Program Files\Intercax\syndeia-cloud-current <<===>> c:\Program Files\Intercax\syndeia-cloud-2018-03-05
Note, to delete or update a directory symlink use rmdir
<symlink_name> to delete the existing symlink, do not use del
as that will delete the contents of the derefenced directory symlink!
How to create a symlikn to syndeia-cloud on Linux
1. From the CLI, run sudo ln -s
<destination> <link-location-and-name>, ex:
$ sudo ln -s /opt/icx/syndeia-cloud-2018-03-05/ /opt/icx/syndeia-cloud-current $
Note, if successful, you will get no output and just see the command prompt again
How to create a Scheduled Task on Windows to start (single node) Cassandra and Syndeia Cloud on boot
1. Launch Task Scheduler
2. Click Create Task...
3. Click Change User or Group... and specify SYSTEM
as the account.
4. Click the Trigger tab and create a new trigger of "At startup".
5. Click the Actions tab and create one Action of "Start a program" to start Cassandra and specify LEGACY
in the Add arguments field and C:\Program Files\apache-cassandra-
<version>\bin
in the Start in field
Do not encapsulate the Start in path with quotes!
6. Click Create Task... and specify a Trigger of "At startup" and two Actions of "Start a program" to start: 1. a script to wait for the Cassandra port, and 2. Syndeia Cloud
a. Action 1: create the following batch file (ex: c:\Program Files\apache-cassandra-
<version>\bin\wait_for_cassandra_port.bat
)
:while netstat -afp tcp | findstr ":9042" if %errorlevel% NEQ 0 (goto :while)
... and reference it in the "Start a program" Action by specifying c:\Program Files\apache-cassandra-
<version>\bin\wait_for_cassandra_port.bat
in the Program/script field.
b. Action 2: create a "Start a program" Action to start syndeia-cloud.bat
. Make sure this is sequenced after the first action.
To prevent any breakage when Syndeia Cloud is upgraded, reference the symlink path VS the current installed version of Syndeia Cloud (see Appendix D4.1 for more details)
How to create a Scheduled Task on Windows to start (multi node) Cassandra and Syndeia Cloud on boot
1. Launch Task Scheduler
2. Click Create Task...
3. Click Change User or Group... and specify SYSTEM
as the account.
4. Click the Trigger tab and create a new trigger of "At startup".
5. Click the Actions tab and create one Action of "Start a program" to start Cassandra and specify LEGACY
in the Add arguments field and C:\Program Files\apache-cassandra-
<version>\bin
in the Start in field
Do not encapsulate the Start in path with quotes!
6. Click Create Task... and specify a Trigger of "At startup" and two Actions to start: 1. a script to wait for the Cassandra port, and 2. Syndeia Cloud
a. Action 1: create the following PowerShell file (ex: c:\Program Files\apache-cassandra-
<version>\bin\wait_for_cassandra_remote_port.ps1
)
# Replace server.domain with your server FQDN/name do { $result = Test-NetConnection -ComputerName "server.domain" -Port 9042 -InformationLevel "Quiet"; } until ($result)
... and reference it in the "Start a program" Action by specifying C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe
in the Program/script field and -file "C:\Program Files\apache-cassandra-3.0.15\bin\wait_for_cassandra_remote_port.ps1"
in the Add Arguments field.
b. Action 2: create a "Start a program" Action to start syndeia-cloud.bat
. Make sure this is sequenced after the first action.
To prevent any breakage when Syndeia Cloud is upgraded, reference the symlink path VS the current installed version of Syndeia Cloud (see Appendix D4.1 for more details)
systemd syndeia-cloud.service
file listing
# 2018-03-20, BKM: v0.9: for Syndeia Cloud v3.2 release [Unit] Description=Syndeia Cloud service: Integrated model-based engineering tool to generate, connect, compare and sync After=remote-fs.target After=network-online.target After=nss-lookup.target After=time-sync.target After=ntp.service After=mdadm.service After=cassandra.service #After=wait-on-cassandra.service Wants=network-online.target Wants=cassandra.service #Wants=wait-on-cassandra.service [Service] Type=simple Restart=on-failure TimeoutSec=1min #IgnoreSIGPIPE=no #KillMode=process GuessMainPID=no RemainAfterExit=no User=syndeia-cloud # -- Uncomment the below when Cassandra is on the same machine and you want to wait until the port is up. Note, ":2352" is in hex wich = 9042 decimal # ExecStartPre=/bin/sh -c "echo 'Syndeia Cloud: Waiting until Cassandra port is up...';until grep -qs \":2352 00000000:0000\" /proc/self/net/tcp; do sleep 1; done;" # -- Uncomment and change "host.domain" below when Cassandra is on a different machine and you want to wait until the port is up. ExecStartPre=/bin/sh -c "echo 'Syndeia Cloud: Waiting until Cassandra port is up...';until echo test > /dev/tcp/host.domain/9042 ; do sleep 1; done;" ExecStart=/opt/icx/syndeia-cloud-current/bin/syndeia-cloud PIDFile=/opt/icx/syndeia-cloud-current/RUNNING.pid #ExecStop=kill -SIGTERM ${MAINPID} SuccessExitStatus=143 #ExecReload=/etc/rc.d/init.d/syndeia-cloud reload [Install] WantedBy=multi-user.target
LSB-compliant SysV syndeia-cloud
init script file listing
#!/bin/bash # # /etc/init.d/syndeia-cloud # # Startup script for Syndeia Cloud # 2018-03-20, BKM: v0.9: for Syndeia Cloud v3.2 release # # chkconfig: 2345 85 15 # description: Starts and stops Syndeia Cloud # pidfile: /var/run/syndeia-cloud/syndeia-cloud.pid ### BEGIN INIT INFO # Provides: syndeia-cloud # Required-Start: $remote_fs $network $named $time $syslog # Required-Stop: $remote_fs $network $named $time $syslog # Should-Start: ntp mdadm cassandra # Should-Stop: ntp mdadm cassandra # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: integrated model-based engineering tool to generate, connect, compare and sync # Description: Syndeia™ is a software environment for integrated model-based engineering. # Based on industry standards such as SysML, STEP, REST, and OSLC, Syndeia helps # system engineers develop and manage the high-level architecture of a system or # product in SysML and simultaneously generate, connect, compare, and sync with # models in PLM, CAD/CAE, ALM, simulation, databases, and other enterprise # repositories. With powerful visualization and query capabilities, Syndeia makes # the Total System Model accessible to the project team, using connections both # inside and between individual models. With Syndeia, engineers can trace from # requirements to CAD or simulation models, or connect systems engineering to # project management and issue tracking. ### END INIT INFO SYSTEMCTL_SKIP_REDIRECT=1 . /etc/rc.d/init.d/functions SYNDEIA_CLOUD_HOME=/opt/icx/syndeia-cloud-current SYNDEIA_CLOUD_PROG=${SYNDEIA_CLOUD_HOME}/bin/syndeia-cloud SYNDEIA_CLOUD_OWNR=syndeia-cloud NAME="syndeia-cloud" log_file=/var/log/syndeia-cloud/syndeia-cloud.log pid_file=/var/run/syndeia-cloud/syndeia-cloud.pid lock_file=/var/lock/subsys/$NAME # Read configuration variable file if it is present [[ -r /etc/default/$NAME ]] && . /etc/default/$NAME case "$1" in start) # syndeia-cloud startup echo -n "Starting syndeia-cloud: " if [[ ! -d `dirname "$pid_file"` ]]; then su $SYNDEIA_CLOUD_OWNR -c "install -m 755 -o $SYNDEIA_CLOUD_OWNR -g $SYNDEIA_CLOUD_OWNR -d `dirname $pid_file`" fi su $SYNDEIA_CLOUD_OWNR -c "$SYNDEIA_CLOUD_PROG" > $log_file & # 2>&1 & retval=$? if [[ $retval -eq 0 ]]; then touch $lock_file pid=$(cat ${SYNDEIA_CLOUD_HOME}/RUNNING_PID) ps -o ppid= $pid > $pid_file # ln -s ${SYNDEIA_CLOUD_HOME}/RUNNING_PID $pid_file chown $SYNDEIA_CLOUD_OWNR:$SYNDEIA_CLOUD_OWNR $pid_file until [[ -e $lock_file && -e $pid_file ]]; do sleep 1; done; echo "OK" fi ;; stop) # syndeia-cloud shutdown echo -n "Shutdown syndeia-cloud: " su $SYNDEIA_CLOUD_OWNR -c "kill -SIGTERM `cat $pid_file`" retval=$? if [[ $retval -eq 0 ]]; then echo "OK" rm -f $lock_file rm -f $pid_file exit 0 else su $SYNDEIA_CLOUD_OWNR -c "kill -SIGKILL `cat $pid_file`" retval=$? if [[ $retval -eq 0 ]]; then echo "OK" rm -f $lock_file rm -f $pid_file exit 0 else echo "ERROR: could not stop $NAME" exit 1 fi fi ;; reload|restart) $0 stop $0 start ;; status) status -p $pid_file syndeia-cloud exit $? ;; *) echo "Usage: `basename $0` start|stop|status|restart|reload" exit 1 esac exit 0