Giter VIP home page Giter VIP logo

pallas's Issues

sql注入

TemplateController.java中直接接收了请求中的参数,并提取sql语句执行,导致了sql注入
图片

pallas 部署8081 端口起不来

执行quickstart.sh 后3个es节点9200,9210,9220 是存活的
但是web控制台却拉不起来

Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.vip.pallas.demo.LaunchAll.main(LaunchAll.java:66)
Caused by: pl.allegro.tech.embeddedelasticsearch.EmbeddedElasticsearchStartupException: Failed to start elasticsearch within time-out
at pl.allegro.tech.embeddedelasticsearch.ElasticServer.waitForElasticToStart(ElasticServer.java:124)
at pl.allegro.tech.embeddedelasticsearch.ElasticServer.start(ElasticServer.java:48)
at pl.allegro.tech.embeddedelasticsearch.EmbeddedElastic.startElastic(EmbeddedElastic.java:79)
at pl.allegro.tech.embeddedelasticsearch.EmbeddedElastic.start(EmbeddedElastic.java:60)
at com.vip.pallas.demo.Launcher.launchES(LaunchAll.java:174)
at com.vip.pallas.demo.Launcher.main(LaunchAll.java:93)
... 5 more
pl.allegro.tech.embeddedelasticsearch.EmbeddedElasticsearchStartupException: Failed to start elasticsearch within time-out
at pl.allegro.tech.embeddedelasticsearch.ElasticServer.waitForElasticToStart(ElasticServer.java:124)
at pl.allegro.tech.embeddedelasticsearch.ElasticServer.start(ElasticServer.java:48)
at pl.allegro.tech.embeddedelasticsearch.EmbeddedElastic.startElastic(EmbeddedElastic.java:79)
at pl.allegro.tech.embeddedelasticsearch.EmbeddedElastic.start(EmbeddedElastic.java:60)
at com.vip.pallas.demo.Launcher.lambda$launchES$1(LaunchAll.java:154)
at java.lang.Thread.run(Thread.java:748)
pl.allegro.tech.embeddedelasticsearch.EmbeddedElasticsearchStartupException: Failed to start elasticsearch within time-out
at pl.allegro.tech.embeddedelasticsearch.ElasticServer.waitForElasticToStart(ElasticServer.java:124)
at pl.allegro.tech.embeddedelasticsearch.ElasticServer.start(ElasticServer.java:48)
at pl.allegro.tech.embeddedelasticsearch.EmbeddedElastic.startElastic(EmbeddedElastic.java:79)
at pl.allegro.tech.embeddedelasticsearch.EmbeddedElastic.start(EmbeddedElastic.java:60)
at com.vip.pallas.demo.Launcher.lambda$launchES$0(LaunchAll.java:133)
at java.lang.Thread.run(Thread.java:748)

代码注释、规范优化

1、代码注释中既有中文、也有英文,且格式也不统一,可以对此做一些优化;
2、com.vip.pallas.search.launch.BootStrap中DefaultFilterPipeLine.getInstance()重复,可简化为DefaultFilterPipeLine instance = DefaultFilterPipeLine.getInstance();
3、DefaultFilterPipeLine.getInstance()懒加载机制可以做性能优化:
private static class InstanceHolder {
instance = new DefaultFilterPipeLine();

private static DefaultFilterPipeLine getInstance() {
return instance;
}
}
public static FilterPipeLine getInstance() {
return InstanceHolder.getInstance();
}

重试优化顺便加上限流

  1. 分片分组
  2. 重试次数不能超过1
  3. 重试保护 10秒钟之内最多重试200次?
  4. 每次重试要使用新的IP
  5. 单次请求无论如何不能超过超时时间(connect request time + connect time + socket time < timeout)
  6. 客户端超时时间通过cookie传到ps作参考 -- 优先级低

配置迁移

pallas.login.url 配置冲ConfigReader迁移到PallasConsoleProperties

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.