How to run Zipkin tracing tool on PC?

765 views
Skip to first unread message

Phuong TranGia

unread,
Oct 19, 2012, 2:57:24 PM10/19/12
to zipki...@googlegroups.com
Hello members,

Thank you for the interesting tool.
I have done according to the guide in order to do the quick start. 
But I don't know what are the UI's links to access Zipkin, could you show me how to use it now?

Thank you so much!
Regards,
Phuong

Phuong TranGia

unread,
Oct 19, 2012, 11:00:40 PM10/19/12
to zipki...@googlegroups.com
Hello,
Does anybody show me the link to access the UI?
I did the steps following the guide, but I could not see any documents that mention about the links?

BR,
Phuong

Franklin Hu

unread,
Oct 20, 2012, 1:29:16 AM10/20/12
to zipki...@googlegroups.com
Hi Phuong,
If you're running the Scala UI, then it's defaulted to run on port 8080 on your localhost.

Franklin

--
 
 
 

Phuong TranGia

unread,
Oct 20, 2012, 2:01:38 AM10/20/12
to zipki...@googlegroups.com
Hi Franklin,

Thanks for your reply. But I got nothing from localhost:8080, even if I see that port was already established in console.
I don't know why, I just do according to the guide.

Phuong

Franklin Hu

unread,
Oct 20, 2012, 2:27:49 AM10/20/12
to zipki...@googlegroups.com
When you "got nothing", are you getting a browser based could not connect, an HTTP error message, no traces? More info is appreciated

--
 
 
 

Phuong TranGia

unread,
Oct 20, 2012, 2:33:32 AM10/20/12
to zipki...@googlegroups.com
I ran these commands:  'bin/collector', 'bin/query', and 'bin/ui'. 
Then I opened browser with this address: http://localhost:8080/aggregates, now it shows some stuff, I think there is still error on that. 
But I could not see anything, in fact it returns a null page when I click on "Find a trace" tab.

Franklin Hu

unread,
Oct 20, 2012, 2:36:14 AM10/20/12
to zipki...@googlegroups.com
Are you getting any errors in the command line?
Is a "null page" simply an empty trace page? Or is it throwing an HTTP 404? 500?

--
 
 
 

Phuong TranGia

unread,
Oct 20, 2012, 2:38:21 AM10/20/12
to zipki...@googlegroups.com
it returns this message on browser- the front-end "

No data received Unable to load the webpage because the server sent no data."

Phuong TranGia

unread,
Oct 20, 2012, 4:28:15 AM10/20/12
to zipki...@googlegroups.com
Hello Franklin,
Did you find the reasons for that?

Franklin Hu

unread,
Oct 22, 2012, 1:07:11 AM10/22/12
to zipki...@googlegroups.com
Are you getting any errors in the terminal where you ran 'bin/ui'? Do you have the query service reading from a storage (Cassandra) instance?

--
 
 
 

Phuong TranGia

unread,
Oct 22, 2012, 2:25:55 AM10/22/12
to zipki...@googlegroups.com
You mean that I have to install Cassandra first? 
I ran "bin/cassandra-cli -host localhost -port 9160 -f zipkin-server/src/schema/cassandra-schema.txt" but there is not bin/cassandra-cli in the given directory of Zipkin.

BR,
Phuong

Viktor T.

unread,
Oct 22, 2012, 2:56:39 AM10/22/12
to zipki...@googlegroups.com
Hi guys. I run into similar issue while trying to start Zipkin on my local machine (Mac OS X java6)

Here are my steps:

- get cassandra installed (1.1.6) and run 
- executed  "cassandra-cli -host localhost -port 9160 -f zipkin-cassandra/src/schema/cassandra-schema.txt" 
  it gives several messages like:
  Waiting for schema agreement...
... schemas agree across the cluster

- then run bin/collector, bin/query, bin/ui in separate console windows.
All starts fine (without exceptions), except that there is a WARN messsage that log4j was not properly configured
log4j:WARN No appenders could be found for logger (org.apache.zookeeper.ZooKeeper).
log4j:WARN Please initialize the log4j system properly

trying to open localhost:8080 gives:

INF [20121022-13:50:47.481] twitter: Promise@459918656(ivar=Ivar@1059205839(state=Waiting(List(),List())), cancelled=Ivar@1580586090(state=Waiting(List(<function1>),List())))
FAT [20121022-13:50:47.495] ZipkinWeb: A server service ZipkinQuery threw an exception
FAT [20121022-13:50:47.495] ZipkinWeb: com.twitter.finagle.WriteException: java.net.ConnectException: Connection refused
FAT [20121022-13:50:47.495] ZipkinWeb:     at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
FAT [20121022-13:50:47.495] ZipkinWeb:     at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:599)


sbt zipkin-test/run

gives

[info] Running com.twitter.zipkin.tracegen.Main 
Expected args: [collectorhost] [collectorport] [queryhost] [queryport]
Falling back to defaults of localhost, collectorport 9410 and queryport 9411
[error] (run-main) com.twitter.finagle.WriteException: java.net.ConnectException: Connection refused
com.twitter.finagle.WriteException: java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:599)


No any log records/errors in collector/query console windows.

So, please could you tell me what am I missing.
Thanks.

Viktor

Viktor T.

unread,
Oct 22, 2012, 3:32:56 AM10/22/12
to zipki...@googlegroups.com
Sorry, I forgot about zookeeper.

So:
localhost:8080 stils fails, but seems collector works:

from "sbt zipkin-test/run"

Falling back to defaults of localhost, collectorport 9410 and queryport 9411
Sending: Span(-1409412169465227992,methodcallfairlylongname_0,2782876895325332428,None,List(Annotation(1350804120285417,cs,Some(Endpoint(1130966487,1234,servicenameexample_0)),None), Annotation(1350804120287351,cr,Some(Endpoint(1130966487,1234,servicenameexample_0)),None)),List(BinaryAnnotation(key,java.nio.HeapByteBuffer[pos=0 lim=5 cap=5],String,None)),false). Response: Ok
Sending: Span(-1409412169465227992,methodcallfairlylongname_0,2782876895325332428,None,List(Annotation(1350804120285575,sr,Some(Endpoint(925821243,5678,servicenameexample_0)),None), Annotation(1350804120287292,ss,Some(Endpoint(925821243,5678,servicenameexample_0)),None)),List(),false). Response: Ok
Sending: Span(-1409412169465227992,methodcallfairlylongname_1,5355411449494963567,Some(2782876895325332428),List(Annotation(1350804120285460,cs,Some(Endpoint(-1951642327,1234,servicenameexample_1)),None), Annotation(1350804120285600,cr,Some(Endpoint(-1951642327,1234,servicenameexample_1)),None)),List(BinaryAnnotation(key,java.nio.HeapByteBuffer[pos=0 lim=5 cap=5],String,None)),false). Response: Ok
Sending: Span(-1409412169465227992,methodcallfairlylongname_1,5355411449494963567,Some(2782876895325332428),List(Annotation(1350804120285474,sr,Some(Endpoint(-835948863,5678,servicenameexample_1)),None), Annotation(1350804120285585,ss,Some(Endpoint(-835948863,5678,servicenameexample_1)),None)),List(),false). Response: Ok
Sending: Span(-1409412169465227992,methodcallfairlylongname_2,3285923984359220264,Some(2782876895325332428),List(Annotation(1350804120286092,cs,Some(Endpoint(-1942112318,1234,servicenameexample_2)),None), Annotation(1350804120286454,cr,Some(Endpoint(-1942112318,1234,servicenameexample_2)),None)),List(BinaryAnnotation(key,java.nio.HeapByteBuffer[pos=0 lim=5 cap=5],String,None)),false). Response: Ok
Sending: Span(-1409412169465227992,methodcallfairlylongname_2,3285923984359220264,Some(2782876895325332428),List(Annotation(1350804120286153,sr,Some(Endpoint(-1262434948,5678,servicenameexample_2)),None), Annotation(1350804120286420,ss,Some(Endpoint(-1262434948,5678,servicenameexample_2)),None)),List(),false). Response: Ok
Sending: Span(-1409412169465227992,methodcallfairlylongname_3,1816921476637361877,Some(2782876895325332428),List(Annotation(1350804120286741,cs,Some(Endpoint(-381504539,1234,servicenameexample_3)),None), Annotation(1350804120286981,cr,Some(Endpoint(-381504539,1234,servicenameexample_3)),None)),List(BinaryAnnotation(key,java.nio.HeapByteBuffer[pos=0 lim=5 cap=5],String,None)),false). Response: Ok
Sending: Span(-1409412169465227992,methodcallfairlylongname_3,1816921476637361877,Some(2782876895325332428),List(Annotation(1350804120286746,sr,Some(Endpoint(1155315278,5678,servicenameexample_3)),None), Annotation(1350804120286949,ss,Some(Endpoint(1155315278,5678,servicenameexample_3)),None)),List(),false). Response: Ok
Querying for service name: servicenameexample_0 and span name methodcallfairlylongname_0
Querying for service name: servicenameexample_0
[error] (run-main) java.lang.NullPointerException
java.lang.NullPointerException
at org.apache.thrift.protocol.TBinaryProtocol.writeString(TBinaryProtocol.java:185)
at com.twitter.zipkin.gen.ZipkinQuery$getTraceIdsBySpanName_args$class.write(ZipkinQuery.scala:514)
at com.twitter.zipkin.gen.ZipkinQuery$getTraceIdsBySpanName_args$Immutable.write(ZipkinQuery.scala:474)
at com.twitter.zipkin.gen.ZipkinQuery$FinagledClient.encodeRequest(ZipkinQuery.scala:5251)
at com.twitter.zipkin.gen.ZipkinQuery$FinagledClient.getTraceIdsBySpanName(ZipkinQuery.scala:5323)
at com.twitter.zipkin.tracegen.Requests.querySpan(Requests.scala:81)
at com.twitter.zipkin.tracegen.Main$.main(Main.scala:54)
at com.twitter.zipkin.tracegen.Main.main(Main.scala)

Log record on query-service:

DEB [20121022-14:22:01.238] query: getTraceIdsBySpanName. serviceName: servicenameexample_0 spanName: methodcallfairlylongname_0 endTs: 9223372036854775807 limit: 10 order: DurationDesc
DEB [20121022-14:22:01.291] cassie: get_slice(Zipkin, servicenameexample_0.methodcallfairlylongname_0, ColumnParent(column_family:ServiceSpanNameIndex), SlicePredicate(slice_range:SliceRange(start:7F FF FF FF FF FF FF FF, finish:, reversed:true, count:10)), ONE)
DEB [20121022-14:22:01.599] query: getTracesByIds. ArrayBuffer() adjust ArrayBuffer(TimeSkew)


P.S.
To get some logs on collector and query servers I've modified build definition by excluding log4j from these modules and adding  log4j-over-slf4j

libraryDependencies += "org.slf4j" % "log4j-over-slf4j" % "1.6.1",
ivyXML :=
        <dependencies>
          <exclude module="log4j"/>
        </dependencies>

Phuong TranGia

unread,
Oct 22, 2012, 3:30:55 PM10/22/12
to zipki...@googlegroups.com
Hi all,

I installed Cassandra, and now I got exactly the same error with Viktor.

Franklin Hu

unread,
Oct 22, 2012, 3:39:41 PM10/22/12
to zipki...@googlegroups.com
It looks like it's a problem when querying for the span you just stored. Usually NPEs at the thrift level are malformed input or output. I'll dig into this a bit today.

--
 
 
 

Phuong TranGia

unread,
Oct 22, 2012, 5:13:39 PM10/22/12
to zipki...@googlegroups.com
That sounds great. Please update it to GIT once it's available.
Thanks.

Franklin Hu

unread,
Oct 23, 2012, 12:25:10 AM10/23/12
to zipki...@googlegroups.com
I merged a change into master that should fix the NPE you were getting.
Let me know how it goes!

--
 
 
 

Viktor T.

unread,
Oct 23, 2012, 1:14:41 AM10/23/12
to zipki...@googlegroups.com
Thanks Franklin.

The "sbt zipkin-test/run" now works ok (without NPE)

FYI Yesterday I've set

override def globalSampler: com.twitter.zipkin.collector.sampler.GlobalSampler = com.twitter.zipkin.collector.sampler.EverythingGlobalSampler

in collector config, otherwise data were not gone into cassandra.


But main page of "bin/ui" still doesn't work and gives:

INF [20121023-12:05:25.963] twitter: Promise@1590304874(ivar=Ivar@672546756(state=Waiting(List(),List())), cancelled=Ivar@1286893931(state=Waiting(List(<function1>),List())))
FAT [20121023-12:05:25.993] ZipkinWeb: A server service ZipkinQuery threw an exception
FAT [20121023-12:05:25.993] ZipkinWeb: com.twitter.finagle.WriteException: java.net.ConnectException: Connection refused
FAT [20121023-12:05:25.993] ZipkinWeb:     at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)

Thanks.

Phuong TranGia

unread,
Oct 23, 2012, 9:31:27 PM10/23/12
to zipki...@googlegroups.com
Hi guys,
Is it done now? 
From my side, it is still bad, I could not go to the main page at http://localhost:8080
:-(

Franklin Hu

unread,
Oct 23, 2012, 9:33:05 PM10/23/12
to zipki...@googlegroups.com
If you're using bin/ui, you need to change the port in the zipkin-finatra/config/web-dev.scala from 3002 to 9411. I'll get a patch out to change this default


--
 
 
 

Phuong TranGia

unread,
Oct 23, 2012, 9:51:19 PM10/23/12
to zipki...@googlegroups.com
It's awesome, it's working fine now.
Thank you, Franklin.

Viktor T.

unread,
Oct 23, 2012, 11:37:53 PM10/23/12
to zipki...@googlegroups.com
Aces!
Thanks

Franklin Hu

unread,
Oct 23, 2012, 10:55:12 PM10/23/12
to zipki...@googlegroups.com
Thank you for reporting the problems!
If you're using IRC, feel free to drop into the freenode #zipkin room if you'd like online help :)

--
 
 
 

Phuong TranGia

unread,
Oct 27, 2012, 10:32:28 PM10/27/12
to zipki...@googlegroups.com
Hi all,

The GUI is fine now, but there is no tracing data, could you show me in detail on how to generate tracing data? Then it could be displayed on the GUI.
My goal is to see how it works now, including how to generate/get/display the tracing data?
Which libraries that I got to install next? So far, I have already installed Apache Thrift, Zookeper, Cassandra, Zipkin.

Thanks so much.
Phuong

Gösta Forsum

unread,
Jan 22, 2013, 11:08:36 AM1/22/13
to zipki...@googlegroups.com
I tried this with master from zipkin 20th of januari 2013.

And could not get it to work, it turns out that there has been an error introduced by commit:
05c918eade243053dd3e4edb97bd4cfa57bebb81
 where the previous incorrect port 3002 is reintroduced. (should be 9411 as i understand it)

for some reason the query service binds to 127.0.1.1 instead of 127.0.0.1 which makes localhost not work on this particular line either. (if i change to 127.0.1.1 everything works fine)

best regards

Gösta Forsum / Spotify

Johan Oskarsson

unread,
Jan 22, 2013, 12:50:37 PM1/22/13
to zipki...@googlegroups.com
There's a pull request out there for fixing the port issue so It ought to be merged soon. Thanks for the heads up.

I don't think any of our machines have the 127.0.1.1 address configured which is probably why we haven't run into that issue.

/Johan

--
 
 
 

Reply all
Reply to author
Forward
0 new messages