ارور در ارتباط با cassandra
سلام من میخوام با دستور cqlsh به cassandra متصل بشم ولی این ارور رو میده:
Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(10061, "Tried connecting to [('127.0.0.1', 9042)]. Last error: No connection could be made because the target machine actively refused it")})
کسی میدونه مشکل چیه؟
نقل قول: ارور در ارتباط با cassandra
نقل قول:
نوشته شده توسط
kiani2012
سلام من میخوام با دستور cqlsh به cassandra متصل بشم ولی این ارور رو میده:
Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(10061, "Tried connecting to [('127.0.0.1', 9042)]. Last error: No connection could be made because the target machine actively refused it")})
کسی میدونه مشکل چیه؟
سرور کاساندرا رو راه اندازی کردید؟
با دستور زیر(سیستم عامل لینوکس):
./cassandra -f
نقل قول: ارور در ارتباط با cassandra
نقل قول:
نوشته شده توسط
Lsass.CRC32
سرور کاساندرا رو راه اندازی کردید؟
با دستور زیر(سیستم عامل لینوکس):
./cassandra -f
سلام این ارور رو میده :
Could not find or load main class org.apache.cassandra.service.CassandraDaemon
نقل قول: ارور در ارتباط با cassandra
نقل قول:
نوشته شده توسط
kiani2012
سلام این ارور رو میده :
Could not find or load main class org.apache.cassandra.service.CassandraDaemon
بسته دودویی کاسانرا را دانلود کردید یا کد منبع آن؟
نقل قول: ارور در ارتباط با cassandra
نقل قول:
نوشته شده توسط
Lsass.CRC32
بسته دودویی کاسانرا را دانلود کردید یا کد منبع آن؟
دودویی
thrift را هم نصب کردم
نقل قول: ارور در ارتباط با cassandra
نقل قول:
نوشته شده توسط
kiani2012
دودویی
thrift را هم نصب کردم
این ارور زمانی رخ می دهد که شما کدمنبع کاساندرا را دانلود کرده باشید و قبل از کامپایل بخواهید آنرا اجرا کنید. ولی فرض میکنیم که شما بسته binary را دانلود کرده اید. متغیر CASSANDRA_HOME را مقداردهی کنید.
نقل قول: ارور در ارتباط با cassandra
نقل قول:
نوشته شده توسط
Lsass.CRC32
این ارور زمانی رخ می دهد که شما کدمنبع کاساندرا را دانلود کرده باشید و قبل از کامپایل بخواهید آنرا اجرا کنید. ولی فرض میکنیم که شما بسته binary را دانلود کرده اید. متغیر CASSANDRA_HOME را مقداردهی کنید.
توی cmd این ارور رو میده:
C:\Evaluate\apache-cassandra-2.2.3>bin\cqlshConnection error: ('Unable to connect to any servers', {'127.0.0.1': error(10061, "Tried connecting to [('127.0.0.1', 9042)]. Last error: No connection could be made because the target machine actively refused it")})
C:\Evaluate\apache-cassandra-2.2.3>bin\cassandra -f
C:\Evaluate\apache-cassandra-2.2.3>f@REM
'f@REM' is not recognized as an internal or external command,
operable program or batch file.
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 16:13:37 Loading settings from file:/C:/Evaluate/apache-cassandra-2.2.3/conf/cassandra.yaml
INFO 16:13:38 Node configuration:[authenticator=AllowAllAuthenticator; authorizer=AllowAllAuthorizer; auto_snapshot=true; batch_size_fail_threshold_in_kb=50; batch_size_warn_threshold_in_kb=5; batchlog_replay_throttle_in_kb=1024; 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_segment_size_in_mb=32; commitlog_sync=periodic; commitlog_sync_period_in_ms=10000; compaction_large_partition_warning_threshold_mb=10 0; compaction_throughput_mb_per_sec=16; concurrent_counter_writes=32; concurrent_materialized_view_writes=32; concurrent_reads=32; concurrent_writes=32; counter_cache_save_period=7200; counter_cache_size_in_mb=null; counter_write_request_timeout_in_ms=5000; cross_node_timeout=false; disk_failure_policy=stop; 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; endpoint_snitch=SimpleSnitch; gc_warn_threshold_in_ms=1000; hinted_handoff_enabled=true; hinted_handoff_throttle_in_kb=1024; hints_flush_period_in_ms=10000; incremental_backups=false; index_summary_capacity_in_mb=null; index_summary_resize_interval_in_minutes=60; inter_dc_tcp_nodelay=false; internode_compression=all; key_cache_save_period=14400; key_cache_size_in_mb=null; listen_address=localhost; max_hint_window_in_ms=10800000; max_hints_delivery_threads=2; max_hints_file_size_in_mb=128; memtable_allocation_type=heap_buffers; native_transport_port=9042; num_tokens=256; partitioner=org.apache.cassandra.dht.Murmur3Partit ioner; permissions_validity_in_ms=2000; range_request_timeout_in_ms=10000; read_request_timeout_in_ms=5000; request_scheduler=org.apache.cassandra.scheduler.N oScheduler; request_timeout_in_ms=10000; role_manager=CassandraRoleManager; roles_validity_in_ms=2000; row_cache_save_period=0; row_cache_size_in_mb=0; rpc_address=localhost; rpc_keepalive=true; rpc_port=9160; rpc_server_type=sync; seed_provider=[{class_name=org.apache.cassandra.locator.SimpleSee dProvider, parameters=[{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; thrift_framed_transport_size_in_mb=15; 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; windows_timer_interval=1; write_request_timeout_in_ms=2000]
Exception (org.apache.cassandra.exceptions.ConfigurationExce ption) encountered during startup: Invalid yaml. Please remove properties [concurrent_materialized_view_writes, enable_scripted_user_defined_functions, optional, hints_flush_period_in_ms, max_hints_file_size_in_mb] from your cassandra.yaml
org.apache.cassandra.exceptions.ConfigurationExcep tion: Invalid yaml. Please remove properties [concurrent_materialized_view_writes, enable_scripted_user_defined_functions, optional, hints_flush_period_in_ms, max_hints_file_size_in_mb] from your cassandra.yaml
at org.apache.cassandra.config.YamlConfigurationLoade r$MissingPropertiesChecker.check(YamlConfiguration Loader.java:162)
at org.apache.cassandra.config.YamlConfigurationLoade r.loadConfig(YamlConfigurationLoader.java:115)
at org.apache.cassandra.config.YamlConfigurationLoade r.loadConfig(YamlConfigurationLoader.java:85)
at org.apache.cassandra.config.DatabaseDescriptor.loa dConfig(DatabaseDescriptor.java:135)
at org.apache.cassandra.config.DatabaseDescriptor.<cl init>(DatabaseDescriptor.java:119)
at org.apache.cassandra.service.CassandraDaemon.activ ate(CassandraDaemon.java:488)
at org.apache.cassandra.service.CassandraDaemon.main( CassandraDaemon.java:622)
ERROR 16:13:38 Exception encountered during startup
org.apache.cassandra.exceptions.ConfigurationExcep tion: Invalid yaml. Please remove properties [concurrent_materialized_view_writes, enable_scripted_user_defined_functions, optional, hints_flush_period_in_ms, max_hints_file_size_in_mb] from your cassandra.yaml
at org.apache.cassandra.config.YamlConfigurationLoade r$MissingPropertiesChecker.check(YamlConfiguration Loader.java:162) ~[apache-cassandra-2.2.3.jar:2.2.3]
at org.apache.cassandra.config.YamlConfigurationLoade r.loadConfig(YamlConfigurationLoader.java:115) ~[apache-cassandra-2.2.3.jar:2.2.3]
at org.apache.cassandra.config.YamlConfigurationLoade r.loadConfig(YamlConfigurationLoader.java:85) ~[apache-cassandra-2.2.3.jar:2.2.3]
at org.apache.cassandra.config.DatabaseDescriptor.loa dConfig(DatabaseDescriptor.java:135) ~[apache-cassandra-2.2.3.jar:2.2.3]
at org.apache.cassandra.config.DatabaseDescriptor.<cl init>(DatabaseDescriptor.java:119) ~[apache-cassandra-2.2.3.jar:2.2.3]
at org.apache.cassandra.service.CassandraDaemon.activ ate(CassandraDaemon.java:488) [apache-cassandra-2.2.3.jar:2.2.3]
at org.apache.cassandra.service.CassandraDaemon.main( CassandraDaemon.java:622) [apache-cassandra-2.2.3.jar:2.2.3]
زمان اجرای بر روی git bash هم آخر ارور اینه:
Error: Could not find or load main class org.apache.cassandra.service.CassandraDaemon
نقل قول: ارور در ارتباط با cassandra
نقل قول:
نوشته شده توسط
kiani2012
توی cmd این ارور رو میده:
C:\Evaluate\apache-cassandra-2.2.3>bin\cqlshConnection error: ('Unable to connect to any servers', {'127.0.0.1': error(10061, "Tried connecting to [('127.0.0.1', 9042)]. Last error: No connection could be made because the target machine actively refused it")})
C:\Evaluate\apache-cassandra-2.2.3>bin\cassandra -f
C:\Evaluate\apache-cassandra-2.2.3>f@REM
'f@REM' is not recognized as an internal or external command,
operable program or batch file.
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 16:13:37 Loading settings from file:/C:/Evaluate/apache-cassandra-2.2.3/conf/cassandra.yaml
INFO 16:13:38 Node configuration:[authenticator=AllowAllAuthenticator; authorizer=AllowAllAuthorizer; auto_snapshot=true; batch_size_fail_threshold_in_kb=50; batch_size_warn_threshold_in_kb=5; batchlog_replay_throttle_in_kb=1024; 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_segment_size_in_mb=32; commitlog_sync=periodic; commitlog_sync_period_in_ms=10000; compaction_large_partition_warning_threshold_mb=10 0; compaction_throughput_mb_per_sec=16; concurrent_counter_writes=32; concurrent_materialized_view_writes=32; concurrent_reads=32; concurrent_writes=32; counter_cache_save_period=7200; counter_cache_size_in_mb=null; counter_write_request_timeout_in_ms=5000; cross_node_timeout=false; disk_failure_policy=stop; 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; endpoint_snitch=SimpleSnitch; gc_warn_threshold_in_ms=1000; hinted_handoff_enabled=true; hinted_handoff_throttle_in_kb=1024; hints_flush_period_in_ms=10000; incremental_backups=false; index_summary_capacity_in_mb=null; index_summary_resize_interval_in_minutes=60; inter_dc_tcp_nodelay=false; internode_compression=all; key_cache_save_period=14400; key_cache_size_in_mb=null; listen_address=localhost; max_hint_window_in_ms=10800000; max_hints_delivery_threads=2; max_hints_file_size_in_mb=128; memtable_allocation_type=heap_buffers; native_transport_port=9042; num_tokens=256; partitioner=org.apache.cassandra.dht.Murmur3Partit ioner; permissions_validity_in_ms=2000; range_request_timeout_in_ms=10000; read_request_timeout_in_ms=5000; request_scheduler=org.apache.cassandra.scheduler.N oScheduler; request_timeout_in_ms=10000; role_manager=CassandraRoleManager; roles_validity_in_ms=2000; row_cache_save_period=0; row_cache_size_in_mb=0; rpc_address=localhost; rpc_keepalive=true; rpc_port=9160; rpc_server_type=sync; seed_provider=[{class_name=org.apache.cassandra.locator.SimpleSee dProvider, parameters=[{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; thrift_framed_transport_size_in_mb=15; 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; windows_timer_interval=1; write_request_timeout_in_ms=2000]
Exception (org.apache.cassandra.exceptions.ConfigurationExce ption) encountered during startup: Invalid yaml. Please remove properties [concurrent_materialized_view_writes, enable_scripted_user_defined_functions, optional, hints_flush_period_in_ms, max_hints_file_size_in_mb] from your cassandra.yaml
org.apache.cassandra.exceptions.ConfigurationExcep tion: Invalid yaml. Please remove properties [concurrent_materialized_view_writes, enable_scripted_user_defined_functions, optional, hints_flush_period_in_ms, max_hints_file_size_in_mb] from your cassandra.yaml
at org.apache.cassandra.config.YamlConfigurationLoade r$MissingPropertiesChecker.check(YamlConfiguration Loader.java:162)
at org.apache.cassandra.config.YamlConfigurationLoade r.loadConfig(YamlConfigurationLoader.java:115)
at org.apache.cassandra.config.YamlConfigurationLoade r.loadConfig(YamlConfigurationLoader.java:85)
at org.apache.cassandra.config.DatabaseDescriptor.loa dConfig(DatabaseDescriptor.java:135)
at org.apache.cassandra.config.DatabaseDescriptor.<cl init>(DatabaseDescriptor.java:119)
at org.apache.cassandra.service.CassandraDaemon.activ ate(CassandraDaemon.java:488)
at org.apache.cassandra.service.CassandraDaemon.main( CassandraDaemon.java:622)
ERROR 16:13:38 Exception encountered during startup
org.apache.cassandra.exceptions.ConfigurationExcep tion: Invalid yaml. Please remove properties [concurrent_materialized_view_writes, enable_scripted_user_defined_functions, optional, hints_flush_period_in_ms, max_hints_file_size_in_mb] from your cassandra.yaml
at org.apache.cassandra.config.YamlConfigurationLoade r$MissingPropertiesChecker.check(YamlConfiguration Loader.java:162) ~[apache-cassandra-2.2.3.jar:2.2.3]
at org.apache.cassandra.config.YamlConfigurationLoade r.loadConfig(YamlConfigurationLoader.java:115) ~[apache-cassandra-2.2.3.jar:2.2.3]
at org.apache.cassandra.config.YamlConfigurationLoade r.loadConfig(YamlConfigurationLoader.java:85) ~[apache-cassandra-2.2.3.jar:2.2.3]
at org.apache.cassandra.config.DatabaseDescriptor.loa dConfig(DatabaseDescriptor.java:135) ~[apache-cassandra-2.2.3.jar:2.2.3]
at org.apache.cassandra.config.DatabaseDescriptor.<cl init>(DatabaseDescriptor.java:119) ~[apache-cassandra-2.2.3.jar:2.2.3]
at org.apache.cassandra.service.CassandraDaemon.activ ate(CassandraDaemon.java:488) [apache-cassandra-2.2.3.jar:2.2.3]
at org.apache.cassandra.service.CassandraDaemon.main( CassandraDaemon.java:622) [apache-cassandra-2.2.3.jar:2.2.3]
زمان اجرای بر روی git bash هم آخر ارور اینه:
Error: Could not find or load main class org.apache.cassandra.service.CassandraDaemon
فایل cassandra.yaml مشکل دارد. مقادیر زیر را در فایل cassandra.yaml حذف یا ویرایش نمایید:
concurrent_materialized_view_writes
enable_scripted_user_defined_functions
optional
hints_flush_period_in_ms
max_hints_file_size_in_mb
نقل قول: ارور در ارتباط با cassandra
الان این ارور رو میده:
نیاز به jmx و یا nodtool داره درسته؟
INFO 02:23:04 Using Netty Version: [netty-buffer=netty-buffer-4.0.23.Final.208198c, netty-codec=netty-codec-4.0.23.Final.208198c, netty-codec-http=netty-codec-http-4.0.23.Final.208198c, netty-codec-socks=netty-codec-socks-4.0.23.Final.208198c, netty-common=netty-common-4.0.23.Final.208198c, netty-handler=netty-handler-4.0.23.Final.208198c, netty-transport=netty-transport-4.0.23.Final.208198c, netty-transport-rxtx=netty-transport-rxtx-4.0.23.Final.208198c, netty-transport-sctp=netty-transport-sctp-4.0.23.Final.208198c, netty-transport-udt=netty-transport-udt-4.0.23.Final.208198c]INFO 02:23:04 Starting listening for CQL clients on localhost/127.0.0.1:9042...
INFO 02:23:04 Not starting RPC server as requested. Use JMX (StorageService->startRPCServer()) or nodetool (enablethrift) to start it
نقل قول: ارور در ارتباط با cassandra
نقل قول:
نوشته شده توسط
kiani2012
الان این ارور رو میده:
نیاز به jmx و یا nodtool داره درسته؟
INFO 02:23:04 Using Netty Version: [netty-buffer=netty-buffer-4.0.23.Final.208198c, netty-codec=netty-codec-4.0.23.Final.208198c, netty-codec-http=netty-codec-http-4.0.23.Final.208198c, netty-codec-socks=netty-codec-socks-4.0.23.Final.208198c, netty-common=netty-common-4.0.23.Final.208198c, netty-handler=netty-handler-4.0.23.Final.208198c, netty-transport=netty-transport-4.0.23.Final.208198c, netty-transport-rxtx=netty-transport-rxtx-4.0.23.Final.208198c, netty-transport-sctp=netty-transport-sctp-4.0.23.Final.208198c, netty-transport-udt=netty-transport-udt-4.0.23.Final.208198c]INFO 02:23:04 Starting listening for CQL clients on localhost/127.0.0.1:9042...
INFO 02:23:04 Not starting RPC server as requested. Use JMX (StorageService->startRPCServer()) or nodetool (enablethrift) to start it
این خطا نیست. در نسخه های جدید کاساندرا thrift rpc server به صورت پیش فرض غیرفعال شده است. در فایل cassandra.yaml مقدار start_rpc را برابر true قرار دهید. به این صورت: start_rpc: true
نقل قول: ارور در ارتباط با cassandra
نقل قول:
نوشته شده توسط
Lsass.CRC32
این خطا نیست. در نسخه های جدید کاساندرا thrift rpc server به صورت پیش فرض غیرفعال شده است. در فایل cassandra.yaml مقدار start_rpc را برابر true قرار دهید. به این صورت: start_rpc: true
باشه تغییر میدم
برای تغییر مقادیر مسیر پوشه های commitlog و data در فایل cassandra.yaml توی داکیومنت ها نوشتن به مقدار cassandra/data و cassandra/commitlog تغییر دهید
ولی هر دوی این پوشه ها خودشون توی پوشه data هستن یعنی : cassandra/data/commitlog
کدوم مقادیر درست هستن؟
نقل قول: ارور در ارتباط با cassandra
نقل قول:
نوشته شده توسط
kiani2012
باشه تغییر میدم
برای تغییر مقادیر مسیر پوشه های commitlog و data در فایل cassandra.yaml توی داکیومنت ها نوشتن به مقدار cassandra/data و cassandra/commitlog تغییر دهید
ولی هر دوی این پوشه ها خودشون توی پوشه data هستن یعنی : cassandra/data/commitlog
کدوم مقادیر درست هستن؟
الزامی به تغییر نیست.
2 ضمیمه
نقل قول: ارور در ارتباط با cassandra
هیچ جور اجرا نمیشه
این ارور دستور cassandra -f
ضمیمه 136923
این ارور دستور cqlsh
ضمیمه 136924
اینم فایل cassandra.yaml
لینک فایل
نقل قول: ارور در ارتباط با cassandra
نقل قول:
نوشته شده توسط
kiani2012
داخل پرانتز عرض کردم که دستور cassandra -f برای لینوکس هست. شما بسته پیش فرض کاساندرا که مربوط به سیستم عامل گنو/لینوکس هست رو دانلود کردید. برای استفاده از کاساندرا در ویندوز می بایست بسته DataStax را دانلود کنید:
http://www.planetcassandra.org/cassandra/
نقل قول: ارور در ارتباط با cassandra
نقل قول:
نوشته شده توسط
Lsass.CRC32
داخل پرانتز عرض کردم که دستور cassandra -f برای لینوکس هست. شما بسته پیش فرض کاساندرا که مربوط به سیستم عامل گنو/لینوکس هست رو دانلود کردید. برای استفاده از کاساندرا در ویندوز می بایست بسته DataStax را دانلود کنید:
http://www.planetcassandra.org/cassandra/
حتی توی محیط پایتون هم نمیشه از این دستور استفاده کرد؟
نقل قول: ارور در ارتباط با cassandra
نقل قول:
نوشته شده توسط
kiani2012
حتی توی محیط پایتون هم نمیشه از این دستور استفاده کرد؟
منظورتون رو متوجه نشدم.
نقل قول: ارور در ارتباط با cassandra
نقل قول:
نوشته شده توسط
Lsass.CRC32
منظورتون رو متوجه نشدم.
منظورم اینه که بدون datastax توی ویندوز نمیشه از cassandra استفاده کرد؟
دستور cassandra -f در پایتون هم اجرا نمیشه؟
نقل قول: ارور در ارتباط با cassandra
نقل قول:
نوشته شده توسط
kiani2012
منظورم اینه که بدون datastax توی ویندوز نمیشه از cassandra استفاده کرد؟
دستور cassandra -f در پایتون هم اجرا نمیشه؟
خیر امکانش نیست.بعد از نصب سرور کاساندرا به صورت خودکار شروع به کار خواهد کرد. چه نیازی به اجرای این دستور در پایتون دارید؟
نقل قول: ارور در ارتباط با cassandra
نقل قول: ارور در ارتباط با cassandra
نقل قول:
نوشته شده توسط
kiani2012
اصلاح میکنم بر روی ویندوز میشود بدون DataStax از کاساندرا استفاده کرد ولی همه چیز باید به صورت دستی تنظیم شود. در بسته کاساندرا هر فایلی نسخه ویندوزی Batch فایل آن با پسوند .bat موجود است که در ویندوز می توانید استفاده کنید.