Tencent / TubeMQ

TubeMQ has been donated to the Apache Software Foundation and renamed to InLong, please visit the new Apache repository: https://github.com/apache/incubator-inlong
https://inlong.apache.org/
2.02k stars 391 forks source link

[doc] maybe quickstart need more message #59

Closed liangyuanpeng closed 4 years ago

liangyuanpeng commented 4 years ago

Thank you for your work about TubeMQ and open source,It is awsome

I have try to run sh master.sh start

But i just got some error:

Unable to find resource 'macro.vm'

More detail

2019-10-02 04:12:59,555 - ResourceManager : unable to find resource 'macro.vm' in any resource loader.
2019-10-02 04:12:59,555 - Velocimacro : Velocimacro : Error using VM library : macro.vm
org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'macro.vm'
        at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:474)
        at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:352)
        at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1533)
        at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1514)
        at org.apache.velocity.runtime.VelocimacroFactory.initVelocimacro(VelocimacroFactory.java:202)
        at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:274)
        at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:678)
        at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:105)
        at com.tencent.tubemq.server.master.web.simplemvc.VelocityTemplateEngine.init(VelocityTemplateEngine.java:50)
        at com.tencent.tubemq.server.master.web.simplemvc.RequestDispatcher.init(RequestDispatcher.java:70)
        at com.tencent.tubemq.server.master.web.simplemvc.WebFilter.init(WebFilter.java:84)
        at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
        at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
        at org.mortbay.jetty.Server.doStart(Server.java:224)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at com.tencent.tubemq.server.master.web.WebServer.start(WebServer.java:79)
        at com.tencent.tubemq.server.master.TMaster.<init>(TMaster.java:217)
        at com.tencent.tubemq.server.tools.MasterStartup.main(MasterStartup.java:32)

It would be great if quickstart document could be improved

tisonkun commented 4 years ago

Thanks for reporting this issue @liangyuanpeng !

@gosonzhang is there any information we miss here?

gosonzhang commented 4 years ago

Hi @liangyuanpeng, this problem should be that the actual location configuration of resource is not set up properly:

  1. conf/master.ini needs to specify the actual location of resource in the webResourcePath parameter;
  2. The resource.loader.path parameter of resource configuration file resources/velocity.properties needs to specify the actual loading path of the page.

See tubemq_user_guide for detailed examples: https://github.com/Tencent/TubeMQ/blob/master/docs/tubemq_user_guide.md or https://github.com/Tencent/TubeMQ/blob/master/docs/tubemq_user_guide_cn.doc


该问题应该是resource实际位置配置没有设置好:

  1. conf/master.ini需要在webResourcePath参数指定resource实际位置;
  2. resource的配置文件resources/velocity.properties的file.resource.loader.path参数需要指定页面的实际加载路径

具体操作可以参见tubemq_user_guide,里面有详细的例子注解

liangyuanpeng commented 4 years ago

yes,you are right, just change all param of resource and run. Thanks!