gpt4 book ai didi

java - 安装 cassandra 时访问被拒绝

转载 作者:行者123 更新时间:2023-12-01 19:30:35 28 4
gpt4 key购买 nike

这里我尝试在 Windows 10 上安装 cassandra,但由于上述错误而失败。我已经设置了 JAVA_HOME 和 cassandra 路径。 Python 也已安装。我还尝试更改 cassandra.yaml Listen_address: 127.0.0.1 和 rpc_address: 127.0.0.1 但没有任何效果。完整错误如下:

C:\Users\Sudarshan>cassandra -f
'powershell' 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
21:48:54,612 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/C:/Program%20Files/apache-cassandra-3.11.5/conf/logback.xml]
21:48:54,709 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
21:48:54,716 |-INFO in ReconfigureOnChangeFilter{invocationCounter=0} - Will scan for changes in [[C:\Program Files\apache-cassandra-3.11.5\conf\logback.xml]] every 60 seconds.
21:48:54,716 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Adding ReconfigureOnChangeFilter as a turbo filter
21:48:54,730 |-INFO in ch.qos.logback.classic.joran.action.JMXConfiguratorAction - begin
21:48:54,789 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
21:48:54,792 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [SYSTEMLOG]
21:48:54,838 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@7ca48474 - Will use zip compression
21:48:54,864 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
21:48:54,886 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[SYSTEMLOG] - Active log file name: C:\Program Files\apache-cassandra-3.11.5\logs/system.log
21:48:54,886 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[SYSTEMLOG] - File property is set to [C:\Program Files\apache-cassandra-3.11.5\logs/system.log]
21:48:54,887 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[SYSTEMLOG] - openFile(C:\Program Files\apache-cassandra-3.11.5\logs/system.log,true) call failed. java.io.FileNotFoundException: C:\Program Files\apache-cassandra-3.11.5\logs\system.log (Access is denied)
at java.io.FileNotFoundException: C:\Program Files\apache-cassandra-3.11.5\logs\system.log (Access is denied)
at at java.io.FileOutputStream.open0(Native Method)
at at java.io.FileOutputStream.open(FileOutputStream.java:270)
at at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at at ch.qos.logback.core.recovery.ResilientFileOutputStream.<init>(ResilientFileOutputStream.java:28)
at at ch.qos.logback.core.FileAppender.openFile(FileAppender.java:148)
at at ch.qos.logback.core.FileAppender.start(FileAppender.java:108)
at at ch.qos.logback.core.rolling.RollingFileAppender.start(RollingFileAppender.java:86)
at at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:96)
at at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:317)
at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:196)
at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:182)
at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:149)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:135)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:49)
at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:77)
at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:152)
at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
at at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:129)
at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108)
at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:302)
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:276)
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:288)
at at org.apache.cassandra.service.CassandraDaemon.<clinit>(CassandraDaemon.java:101)
21:48:54,887 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
21:48:54,887 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [DEBUGLOG]
21:48:54,888 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@61a485d2 - Will use zip compression
21:48:54,889 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
21:48:54,889 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[DEBUGLOG] - Active log file name: C:\Program Files\apache-cassandra-3.11.5\logs/debug.log
21:48:54,889 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[DEBUGLOG] - File property is set to [C:\Program Files\apache-cassandra-3.11.5\logs/debug.log]
21:48:54,889 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[DEBUGLOG] - openFile(C:\Program Files\apache-cassandra-3.11.5\logs/debug.log,true) call failed. java.io.FileNotFoundException: C:\Program Files\apache-cassandra-3.11.5\logs\debug.log (Access is denied)
at java.io.FileNotFoundException: C:\Program Files\apache-cassandra-3.11.5\logs\debug.log (Access is denied)
at at java.io.FileOutputStream.open0(Native Method)
at at java.io.FileOutputStream.open(FileOutputStream.java:270)
at at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at at ch.qos.logback.core.recovery.ResilientFileOutputStream.<init>(ResilientFileOutputStream.java:28)
at at ch.qos.logback.core.FileAppender.openFile(FileAppender.java:148)
at at ch.qos.logback.core.FileAppender.start(FileAppender.java:108)
at at ch.qos.logback.core.rolling.RollingFileAppender.start(RollingFileAppender.java:86)
at at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:96)
at at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:317)
at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:196)
at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:182)
at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:149)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:135)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:49)
at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:77)
at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:152)
at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
at at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:129)
at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108)
at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:302)
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:276)
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:288)
at at org.apache.cassandra.service.CassandraDaemon.<clinit>(CassandraDaemon.java:101)
21:48:54,889 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.AsyncAppender]
21:48:54,891 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [ASYNCDEBUGLOG]
21:48:54,895 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [DEBUGLOG] to ch.qos.logback.classic.AsyncAppender[ASYNCDEBUGLOG]
21:48:54,895 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNCDEBUGLOG] - Attaching appender named [DEBUGLOG] to AsyncAppender.
21:48:54,895 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNCDEBUGLOG] - Setting discardingThreshold to 0
21:48:54,896 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
21:48:54,898 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
21:48:54,900 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
21:48:54,901 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
21:48:54,901 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [SYSTEMLOG] to Logger[ROOT]
21:48:54,901 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
21:48:54,901 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ASYNCDEBUGLOG] to Logger[ROOT]
21:48:54,902 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache.cassandra] to DEBUG
21:48:54,902 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.thinkaurelius.thrift] to ERROR
21:48:54,902 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
21:48:54,902 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@39fb3ab6 - Registering current configuration as safe fallback point

INFO [main] 2020-02-12 21:48:55,011 YamlConfigurationLoader.java:89 - Configuration location: file:/C:/Program%20Files/apache-cassandra-3.11.5/conf/cassandra.yaml
INFO [main] 2020-02-12 21:48:55,591 Config.java:516 - Node configuration:[allocate_tokens_for_keyspace=null; authenticator=AllowAllAuthenticator; authorizer=AllowAllAuthorizer; auto_bootstrap=true; auto_snapshot=true; back_pressure_enabled=false; back_pressure_strategy=org.apache.cassandra.net.RateBasedBackPressure{high_ratio=0.9, factor=5, flow=FAST}; 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; cdc_enabled=false; cdc_free_space_check_interval_ms=250; cdc_raw_directory=null; cdc_total_space_in_mb=0; client_encryption_options=<REDACTED>; cluster_name=Test Cluster; column_index_cache_size_in_kb=2; column_index_size_in_kb=64; commit_failure_policy=stop; commitlog_compression=null; commitlog_directory=null; commitlog_max_compression_buffers_in_pool=3; commitlog_periodic_queue_size=-1; commitlog_segment_size_in_mb=32; commitlog_sync=periodic; commitlog_sync_batch_window_in_ms=NaN; 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; 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=null; counter_write_request_timeout_in_ms=5000; credentials_cache_max_entries=1000; credentials_update_interval_in_ms=-1; credentials_validity_in_ms=2000; cross_node_timeout=false; data_file_directories=[Ljava.lang.String;@42a48628; disk_access_mode=auto; disk_failure_policy=stop; disk_optimization_estimate_percentile=0.95; disk_optimization_page_cross_chance=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_materialized_views=true; enable_sasi_indexes=true; enable_scripted_user_defined_functions=false; enable_user_defined_functions=false; enable_user_defined_functions_threads=true; encryption_options=null; endpoint_snitch=SimpleSnitch; file_cache_round_up=null; file_cache_size_in_mb=null; 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=null; hints_flush_period_in_ms=10000; incremental_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=dc; internode_recv_buff_size_in_bytes=0; internode_send_buff_size_in_bytes=0; key_cache_keys_to_save=2147483647; key_cache_save_period=14400; key_cache_size_in_mb=null; listen_address=localhost; 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=0; memtable_heap_space_in_mb=null; memtable_offheap_space_in_mb=null; min_free_space_per_drive_in_mb=50; native_transport_flush_in_batches_legacy=true; native_transport_max_concurrent_connections=-1; native_transport_max_concurrent_connections_per_ip=-1; native_transport_max_concurrent_requests_in_bytes=-1; native_transport_max_concurrent_requests_in_bytes_per_ip=-1; native_transport_max_frame_size_in_mb=256; native_transport_max_negotiable_protocol_version=-2147483648; 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=DISABLED; 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; prepared_statements_cache_size_mb=null; range_request_timeout_in_ms=10000; read_request_timeout_in_ms=5000; repair_session_max_tree_depth=18; 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=localhost; 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=null; seed_provider=org.apache.cassandra.locator.SimpleSeedProvider{seeds=127.0.0.1}; server_encryption_options=<REDACTED>; slow_query_log_timeout_in_ms=500; 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_keep_alive_period_in_secs=300; streaming_socket_timeout_in_ms=86400000; thrift_framed_transport_size_in_mb=15; thrift_max_message_length_in_mb=16; thrift_prepared_statements_cache_size_mb=null; tombstone_failure_threshold=100000; tombstone_warn_threshold=1000; tracetype_query_ttl=86400; tracetype_repair_ttl=604800; transparent_data_encryption_options=org.apache.cassandra.config.TransparentDataEncryptionOptions@293a5bf6; 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] 2020-02-12 21:48:55,591 DatabaseDescriptor.java:381 - DiskAccessMode 'auto' determined to be mmap, indexAccessMode is mmap
INFO [main] 2020-02-12 21:48:55,591 DatabaseDescriptor.java:439 - Global memtable on-heap threshold is enabled at 503MB
INFO [main] 2020-02-12 21:48:55,591 DatabaseDescriptor.java:443 - Global memtable off-heap threshold is enabled at 503MB
INFO [main] 2020-02-12 21:48:55,752 RateBasedBackPressure.java:123 - Initialized back-pressure with high ratio: 0.9, factor: 5, flow: FAST, window size: 2000.
INFO [main] 2020-02-12 21:48:55,753 DatabaseDescriptor.java:773 - Back-pressure is disabled with strategy org.apache.cassandra.net.RateBasedBackPressure{high_ratio=0.9, factor=5, flow=FAST}.
WARN [main] 2020-02-12 21:48:56,210 WindowsFailedSnapshotTracker.java:88 - Failed to open C:\Program Files\apache-cassandra-3.11.5\.toDelete. Obsolete snapshots from previous runs will not be deleted.
java.nio.file.AccessDeniedException: C:\Program Files\apache-cassandra-3.11.5\.toDelete
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83) ~[na:1.8.0_73]
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) ~[na:1.8.0_73]
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102) ~[na:1.8.0_73]
at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269) ~[na:1.8.0_73]
at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) ~[na:1.8.0_73]
at java.nio.file.Files.delete(Files.java:1126) ~[na:1.8.0_73]
at org.apache.cassandra.db.WindowsFailedSnapshotTracker.deleteOldSnapshots(WindowsFailedSnapshotTracker.java:84) ~[apache-cassandra-3.11.5.jar:3.11.5]
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:186) [apache-cassandra-3.11.5.jar:3.11.5]
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:620) [apache-cassandra-3.11.5.jar:3.11.5]
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:742) [apache-cassandra-3.11.5.jar:3.11.5]
Exception (java.lang.RuntimeException) encountered during startup: Failed to create failed snapshot tracking file [C:\Program Files\apache-cassandra-3.11.5\.toDelete]. Aborting
java.lang.RuntimeException: Failed to create failed snapshot tracking file [C:\Program Files\apache-cassandra-3.11.5\.toDelete]. Aborting
at org.apache.cassandra.db.WindowsFailedSnapshotTracker.deleteOldSnapshots(WindowsFailedSnapshotTracker.java:98)
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:186)
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:620)
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:742)
ERROR [main] 2020-02-12 21:48:56,223 CassandraDaemon.java:759 - Exception encountered during startup
java.lang.RuntimeException: Failed to create failed snapshot tracking file [C:\Program Files\apache-cassandra-3.11.5\.toDelete]. Aborting
at org.apache.cassandra.db.WindowsFailedSnapshotTracker.deleteOldSnapshots(WindowsFailedSnapshotTracker.java:98) ~[apache-cassandra-3.11.5.jar:3.11.5]
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:186) [apache-cassandra-3.11.5.jar:3.11.5]
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:620) [apache-cassandra-3.11.5.jar:3.11.5]
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:742) [apache-cassandra-3.11.5.jar:3.11.5]

最佳答案

根据 Cassandra 安装指南 here您需要以管理员身份运行命令提示符。为此,请转到“开始”->“命令提示符”->“右键单击”->“以管理员身份运行”。

关于java - 安装 cassandra 时访问被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60193338/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com