Skip to content

【V1.1.0】sandbox.properties中server.ip与server.port设置后不生效 #118

@Xiaolitongxue

Description

@Xiaolitongxue

操作环境

|沙箱容器版本|1.1.0|
|沙箱API版本|1.0.16|

问题描述
sandbox.properties中server.ip与server.port设置后不生效。
试了下,attach的方式需要用 -P -I去显式设置;agent的方式用类似这种的显式设置“-javaagent:/root/.opt/sandbox/lib/sandbox-agent.jar=server.port=4769;server.ip=0.0.0.0”。

原因分析
CoreConfig里受保护Key数组把ip和port纳入,看样子是说之前有值,之后配置文件里的就不生效。attach时,如果用sandbox.sh,看脚本,如果不显式设置-P 与-I,其实会带进去ip和port的默认值;agent方式下,如果不显式设置,premain的第一个arg确实为null,但是里边初始化配置map的逻辑又会把ip和port的默认值带进来。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions