2016-05-13 4 views
0

Ich habe eine vagrant vm läuft mit Cassandra, und alles funktioniert ordnungsgemäß installieren/Einrichten/Starten des Knotens, wenn lokal von mir und allen anderen Entwicklern in meinem Team ausgeführt.Cassandra Start schlägt fehl, wenn in Automatisierung in Vagrant/Virtualbox auf Jenkins

Ich versuche, einige automatisierte Tests jenkins Jobs einzurichten, diese vagrant Bereitstellung zu verwenden, und EVERYTIME ich den Job auf jenkins ausführen, scheitert der Cassandra-Startpunkt an demselben Punkt.

Haben Sie Vorschläge, was Sie sehen sollen?

vagrant 1.8.1 VirtualBox 5.0.12 cassandra 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")}) 

Wenn ich die VM starten auf meinem lokalen Rechner, das alles funktioniert, und die Ausgabe sieht statt wie

==> 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 
... 

Zum ersten Mal traf ich den gleichen Verbindungsfehler während meines vagrant vm lokal Inbetriebnahme:

... 
==> 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={[email protected][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], [email protected][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, [email protected]} 
==> 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")}) 
+0

Die Versionen der Dienste sind die gleichen wie auf dem Jenkins-Slave. –

+0

Versuchen Ihre Tests, eine Verbindung zu Cassandra herzustellen, wenn Sie den "Verbindungsfehler" erhalten? –

+0

Und laufen Ihre Tests (oder was auch immer dort versucht wird) auf demselben Host wie Cassandra? –

Antwort

0

Ok, ich fühle mich ein bisschen albern, aber gleichzeitig verstehe ich das Problem immer noch nicht ganz.

Ich habe lediglich einen Schlaf nach der Cassandra-Init von 5s auf 30s erhöht, um dem Prozess genügend Zeit zu geben, um mit dem Rest der vm-Provisionierung fortzufahren.

Das macht Sinn, wenn man bedenkt, dass der Jenkins-Slave nur langsamer läuft als mein lokaler Laptop und das Cassandra-Startup nur so viel länger brauchte. Was ich immer noch nicht verstehe, ist das, was versucht hat, sich mit Cassandra zu verbinden. Ich habe ein Skript, um Cqlsh nach Cassandra Start zu verwenden, aber es echo eine Zeile zu Standout, und diese Zeile fehlt in den Protokollen, so bin ich zuversichtlich, dass es nicht war. Aber kurz gesagt, es funktioniert jetzt und ich werde weitermachen!

Verwandte Themen