簡體   English   中英

在Jenkins的vagrant / virtualbox中以自動化方式運行時,Cassandra啟動失敗

[英]Cassandra startup fails when run in automation in vagrant/virtualbox on jenkins

我有一個流浪的vm與cassandra一起運行,當我和團隊中的所有其他開發人員在本地運行時,一切正常安裝/設置/啟動節點。

我試圖設置一些自動化測試jenkins作業以使用這種無聊的部署,並且每次我在jenkins上運行該作業時,cassandra啟動在同一時間都會失敗。

有什么建議看什么?

流浪漢1.8.1 virtualbox 5.0.12卡桑德拉2.1.12

==> anser: Starting cassandra0: 
==> anser: ...started.
==> anser: CompilerOracle: inline 
==> anser: org/apache/cassandra/db/AbstractNativeCell
==> anser: .
==> anser: compareTo
==> anser:  
==> anser: (Lorg/apache/cassandra/db/composites/Composite;)I
==> anser: 
==> anser: CompilerOracle: inline org/apache/cassandra/db/composites/AbstractSimpleCellNameType.compareUnsigned (Lorg/apache/cassandra/db/composites/Composite;Lorg/apache/cassandra/db/composites/Composite;)I
==> anser: CompilerOracle: inline org/apache/cassandra/io/util/Memory.checkBounds (JJ)V
==> anser: CompilerOracle: inline org/apache/cassandra/io/util/SafeMemory.checkBounds (JJ)V
==> anser: CompilerOracle: inline org/apache/cassandra/utils/ByteBufferUtil.compare (Ljava/nio/ByteBuffer;[B)I
==> anser: CompilerOracle: inline org/apache/cassandra/utils/ByteBufferUtil.compare ([BLjava/nio/ByteBuffer;)I
==> anser: CompilerOracle: inline org/apache/cassandra/utils/ByteBufferUtil.compareUnsigned (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I
==> anser: CompilerOracle: inline org/apache/cassandra/utils/FastByteOperations$UnsafeOperations.compareTo (Ljava/lang/Object;JILjava/lang/Object;JI)I
==> anser: CompilerOracle: inline org/apache/cassandra/utils/FastByteOperations$UnsafeOperations.compareTo (Ljava/lang/Object;JILjava/nio/ByteBuffer;)I
==> anser: CompilerOracle: inline org/apache/cassandra/utils/FastByteOperations$UnsafeOperations.compareTo (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I
==> anser: Finished starting Apache Cassandra
==> anser: INFO  18:10:12 Hostname: anser
==> anser: INFO  18:10:13 Loading settings from file:/opt/apache-cassandra-2.1.12/conf/cassandra.yaml
==> anser: INFO  18:10:13 Node configuration:[authenticator=AllowAllAuthenticator; authorizer=AllowAllAuthorizer; auto_snapshot=true; batch_size_warn_threshold_in_kb=5; batchlog_replay_throttle_in_kb=1024; broadcast_rpc_address=192.168.33.34; cas_contention_timeout_in_ms=1000; client_encryption_options=<REDACTED>; cluster_name=cassandra0; 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=100; compaction_throughput_mb_per_sec=16; concurrent_counter_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; endpoint_snitch=SimpleSnitch; hinted_handoff_enabled=true; hinted_handoff_throttle_in_kb=1024; 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; memtable_allocation_type=heap_buffers; native_transport_port=9042; num_tokens=256; partitioner=org.apache.cassandra.dht.Murmur3Partitioner; permissions_validity_in_ms=2000; range_request_timeout_in_ms=10000; read_request_timeout_in_ms=5000; request_scheduler=org.apache.cassandra.scheduler.NoScheduler; request_timeout_in_ms=10000; row_cache_save_period=0; row_cache_size_in_mb=0; rpc_address=0.0.0.0; rpc_keepalive=true; rpc_port=9160; rpc_server_type=sync; seed_provider=[{class_name=org.apache.cassandra.locator.SimpleSeedProvider, 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=true; storage_port=7000; thrift_framed_transport_size_in_mb=15; tombstone_failure_threshold=100000; tombstone_warn_threshold=1000; trickle_fsync=false; trickle_fsync_interval_in_kb=10240; truncate_request_timeout_in_ms=60000; write_request_timeout_in_ms=2000]
==> anser: Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})

當我在本地計算機上啟動VM時,一切正常,輸出看起來像

==> anser: INFO  11:47:22 Loading settings from file:/opt/apache-cassandra-2.1.12/conf/cassandra.yaml
==> anser: INFO  11:47:22 Node configuration:[authenticator=AllowAllAuthenticator; authorizer=AllowAllAuthorizer; auto_snapshot=true; batch_size_warn_threshold_in_kb=5; batchlog_replay_throttle_in_kb=1024; broadcast_rpc_address=192.168.33.34; cas_contention_timeout_in_ms=1000; client_encryption_options=<REDACTED>; cluster_name=cassandra0; 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=100; compaction_throughput_mb_per_sec=16; concurrent_counter_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; endpoint_snitch=SimpleSnitch; hinted_handoff_enabled=true; hinted_handoff_throttle_in_kb=1024; 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; memtable_allocation_type=heap_buffers; native_transport_port=9042; num_tokens=256; partitioner=org.apache.cassandra.dht.Murmur3Partitioner; permissions_validity_in_ms=2000; range_request_timeout_in_ms=10000; read_request_timeout_in_ms=5000; request_scheduler=org.apache.cassandra.scheduler.NoScheduler; request_timeout_in_ms=10000; row_cache_save_period=0; row_cache_size_in_mb=0; rpc_address=0.0.0.0; rpc_keepalive=true; rpc_port=9160; rpc_server_type=sync; seed_provider=[{class_name=org.apache.cassandra.locator.SimpleSeedProvider, 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=true; storage_port=7000; thrift_framed_transport_size_in_mb=15; tombstone_failure_threshold=100000; tombstone_warn_threshold=1000; trickle_fsync=false; trickle_fsync_interval_in_kb=10240; truncate_request_timeout_in_ms=60000; write_request_timeout_in_ms=2000]
==> anser: INFO  11:47:22 DiskAccessMode 'auto' determined to be mmap, indexAccessMode is mmap
==> anser: INFO  11:47:22 Global memtable on-heap threshold is enabled at 253MB
==> anser: INFO  11:47:22 Global memtable off-heap threshold is enabled at 253MB
...

這是我第一次在本地啟動無業游民的虛擬機時遇到相同的連接錯誤:

...
==> anser: INFO  15:33:25 Generated random tokens. tokens are [5068094952133832758, 2679523118211166036, 7061542167214604700, -5219888418907094150, 4804941159611263337, -4376755362226500910, -2339467726247596417, -3354301987075965037, -7733335365895491581, -3218196137132271011, -5972126150965914049, -5091966212567738519, -3882191021315178091, 1369997930610115015, 4032662741993252336, 6973804464569253192, -7863921685227041629, 2059083990352338132, -3985640375408386355, -429828593198594262, 3195812251615241303, 924448416748497774, 3868714962340157911, 6892444752914824972, -6050696714671927023, -303965947041560655, -3572317580829979157, 4882496837037825655, 6143231454247572590, -150078267522026853, 3313000336640597430, 3641586928942004870, -4931532468921034945, -7616662502278522780, -1158650423638355433, -1600189310387641543, 6812241145684483883, -7999194020457903369, -8987890332644393787, 1131713873540550136, -6442422838095513563, -3082197053449275885, 1424858409079592145, 4691775386443026760, -2671085640203933818, -8934367115857996164, -8363099700350463001, -5592441405538990148, 324888521827234211, 4848732007535504640, 2294387714210354248, 7870700382149543070, 4843204448822780209, -8302397481784890941, 3128706445924166948, 4703077392267541395, -7947000453147644246, 7073596445119748079, 8891833256689811255, -2543523205824907499, 5973151596968429046, 3275028356992465451, -9067083749372299534, 7497307184899407537, 1859849658279803322, -1066377454672761427, 5632847336330588514, -2416872034618097990, -4548687628865446573, -2689684037406633445, 7953580428092208050, 7167322475933166218, 6610501602634832681, 1298128819787650552, 4934888639572376111, -5804375337235098732, 3278927846080598353, -8581104399508435522, -2054735376315706452, -2851343176084866000, -5210334142478414366, -3971757251653581130, -2610135878906354642, 7692593837026574940, 2295485324366434621, 8405510678624964184, 7883129086689938777, 2547096978723509644, -7347407455114166110, -9033511299015949580, -7451814109309865759, 7669167386132399274, 6408254823180945010, 4537807111508222333, 6891695945754816341, 1741740249845687831, -7393404232705519767, 336327538507248878, -3952224804017043570, 7020538275541433438, -4741024370007814736, -7717579556441457130, 1639989990865810160, -1755162001565557891, 82200199707693891, 4382539928267082896, -6163707931964651763, 7575273494675661926, 4251495658353510224, -971030917140330689, 6813523918758371719, 421247106398192261, 5024407177691086822, 8520716418196481253, -4283876907861105785, -3137486262364667808, 725507115414963324, 1446873771923520175, -5345050679515216242, -2668271419213436376, 6643817382549322498, 8145822462122346902, 5611131326530556155, -5972758548697922058, 6583544701831248169, 105309022642636854, 6357308148487726750, 2303780869133390449, -3596727548104218415, 6248121024879758554, -4173003590235290672, -6481149746539708721, -3958196561829723687, 643096218529581756, -3469139731349837901, 8194396776789347322, -5133015170829896243, -4013395212529797405, -6528235358905889614, -2515548315419414476, 7385035482910338886, -917129760726407685, -8918319583863295770, -8349776351839877319, 5071512648418959950, -2038494881619526725, -9043069089436920328, 5899697784187861947, -9017057847236308466, -7930939469702955672, 6433439203398483462, -4444834513907660593, 613513072107116885, 1343393922123360673, 5294676815591437587, 4159152742167034516, -8922863682822464011, 3904709192434150175, 101191904500165189, 6858926593061260011, 8909727538410212713, -432549704270476371, -8799890237691141338, 935684678210325367, 5702446014222655634, 1653653296900596259, 2344965187488071762, -3458427354155422239, -3678832181617186732, -1964673341991687934, 5716168284360697699, 1794316499648441036, 6496771889509352478, 1679187751307347351, -1143339121155032096, -5427281620779761990, -4335760158193089485, -4293693262016663888, -1212931349054805070, 4058438299651338911, -4320141710450186709, 7042712347525619917, -6678518640241921514, 5634707580539961005, 2113821538697801700, 988651941103079572, 7950705359983673024, -9136273835168367337, 8244276733237309371, -5788819976164498376, -5652980257786886463, 1463209556561393827, -4540973916298925189, -1774938384912443965, -5228337141561284006, -4655014531980079333, -3139971530928749240, 7723864904215423069, 2671016496110414366, -2625377656624920728, 7716902478448493876, 30640835184414337, -6216482218184312068, 1554926156258597570, -7237040444837531069, 7804373934413720686, -1047899386733783926, -543776164426668142, 5106449657443367667, 6151546344120588460, 4032795592701984411, -2283312087249597914, 4899262916520733627, -8419142195154264544, 5697283562527396518, -1193532369126900689, 4746422596319322571, 4737711618513965127, -5129494447943281277, 532380223462508763, -3566436615209807464, -5691747047908301162, -6370265991691367777, -530590201241582682, 6269299690959593591, -7532244947434102499, -5520654521489521711, 6783360319482649580, -1090714056607386027, 648150464733519696, -3972603387877558998, 7250881356960202064, 4874049071753195014, -845194276015522270, -3451690332891566750, -5147413316264713106, 5039706248056511930, 7976698686553018374, -1413475412167157464, 6394102740286450138, -8201369736629552939, 3316156279562132403, -5548717243751270610, -384663260917930154, 5450500939801948971, 4002944274254405728, -5997902549780916569, 8955564437981136694, 8700185800147608064, 3659403192473814434, -3082117039443433473, -2247715909148865466, -6698246367893586125, 7918652856575530776, 5444776270343371794, -3225410820244931669]
==> anser: INFO  15:33:25 Create new Keyspace: KSMetaData{name=system_traces, strategyClass=SimpleStrategy, strategyOptions={replication_factor=2}, cfMetaData={sessions=org.apache.cassandra.config.CFMetaData@2695c2a0[cfId=c5e99f16-8677-3914-b17e-960613512345,ksName=system_traces,cfName=sessions,cfType=Standard,comparator=org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.ColumnToCollectionType(706172616d6574657273:org.apache.cassandra.db.marshal.MapType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.UTF8Type))),comment=traced sessions,readRepairChance=0.0,dcLocalReadRepairChance=0.0,gcGraceSeconds=0,defaultValidator=org.apache.cassandra.db.marshal.BytesType,keyValidator=org.apache.cassandra.db.marshal.UUIDType,minCompactionThreshold=4,maxCompactionThreshold=32,columnMetadata=[ColumnDefinition{name=session_id, type=org.apache.cassandra.db.marshal.UUIDType, kind=PARTITION_KEY, componentIndex=null, indexName=null, indexType=null}, ColumnDefinition{name=coordinator, type=org.apache.cassandra.db.marshal.InetAddressType, kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, ColumnDefinition{name=request, type=org.apache.cassandra.db.marshal.UTF8Type, kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, ColumnDefinition{name=started_at, type=org.apache.cassandra.db.marshal.TimestampType, kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, ColumnDefinition{name=duration, type=org.apache.cassandra.db.marshal.Int32Type, kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, ColumnDefinition{name=parameters, type=org.apache.cassandra.db.marshal.MapType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.UTF8Type), kind=REGULAR, componentIndex=0, indexName=null, indexType=null}],compactionStrategyClass=class org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,compactionStrategyOptions={},compressionParameters={sstable_compression=org.apache.cassandra.io.compress.LZ4Compressor},bloomFilterFpChance=0.01,memtableFlushPeriod=3600000,caching={"keys":"ALL", "rows_per_partition":"NONE"},defaultTimeToLive=86400,minIndexInterval=128,maxIndexInterval=2048,speculativeRetry=99.0PERCENTILE,droppedColumns={},triggers=[],isDense=false], events=org.apache.cassandra.config.CFMetaData@438ae8b2[cfId=8826e8e9-e16a-3728-8753-3bc1fc713c25,ksName=system_traces,cfName=events,cfType=Standard,comparator=org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.TimeUUIDType,org.apache.cassandra.db.marshal.UTF8Type),comment=,readRepairChance=0.0,dcLocalReadRepairChance=0.0,gcGraceSeconds=0,defaultValidator=org.apache.cassandra.db.marshal.BytesType,keyValidator=org.apache.cassandra.db.marshal.UUIDType,minCompactionThreshold=4,maxCompactionThreshold=32,columnMetadata=[ColumnDefinition{name=activity, type=org.apache.cassandra.db.marshal.UTF8Type, kind=REGULAR, componentIndex=1, indexName=null, indexType=null}, ColumnDefinition{name=thread, type=org.apache.cassandra.db.marshal.UTF8Type, kind=REGULAR, componentIndex=1, indexName=null, indexType=null}, ColumnDefinition{name=session_id, type=org.apache.cassandra.db.marshal.UUIDType, kind=PARTITION_KEY, componentIndex=null, indexName=null, indexType=null}, ColumnDefinition{name=event_id, type=org.apache.cassandra.db.marshal.TimeUUIDType, kind=CLUSTERING_COLUMN, componentIndex=0, indexName=null, indexType=null}, ColumnDefinition{name=source, type=org.apache.cassandra.db.marshal.InetAddressType, kind=REGULAR, componentIndex=1, indexName=null, indexType=null}, ColumnDefinition{name=source_elapsed, type=org.apache.cassandra.db.marshal.Int32Type, kind=REGULAR, componentIndex=1, indexName=null, indexType=null}],compactionStrategyClass=class org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,compactionStrategyOptions={},compressionParameters={sstable_compression=org.apache.cassandra.io.compress.LZ4Compressor},bloomFilterFpChance=0.01,memtableFlushPeriod=3600000,caching={"keys":"ALL", "rows_per_partition":"NONE"},defaultTimeToLive=86400,minIndexInterval=128,maxIndexInterval=2048,speculativeRetry=99.0PERCENTILE,droppedColumns={},triggers=[],isDense=false]}, durableWrites=true, userTypes=org.apache.cassandra.config.UTMetaData@457ef1dc}
==> anser: Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})

好的,所以我對此感到有點傻,但是與此同時,我仍然不完全理解這個問題。

在cassandra初始化之后,我只是將睡眠時間從5s增加到30s,以便在繼續進行其他vm置備之前給該過程足夠的時間來開始。

考慮到jenkins從屬設備的運行速度僅比本地筆記本電腦慢,因此這很有道理,因此cassandra啟動僅花費了更長的時間。 我仍然不明白的是試圖連接到Cassandra的原因。 我確實有一個腳本在cassandra啟動后使用cqlsh,但是它在stdout中回顯了一行,並且該行從日志中丟失了,所以我相信不是那樣。 長話短說,現在它可以了,我將繼續前進!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM