使用Config-map parser构建WSO2 MI Docker镜像的集群连接问题
WSO2 MI 4.0.0 Docker镜像集群连接异常问题
问题概述
使用Config-map parser构建WSO2 MI 4.0.0 Docker镜像时,Bitbucket构建流程要求必须复制仓库内所有文件(包含metadata_config.properties),否则构建失败。已在deployment.toml中配置集群协调数据库信息,但构建完成后的镜像无法连接集群。本地环境中,注释掉Dockerfile里复制metadata_config.properties的语句后,构建并运行的镜像可正常工作,此时metadata_config文件会自动生成不同的ID。
所用Dockerfile配置
FROM wso2/wso2mi:4.0.0 COPY repository/deployment/server/carbonapps/TestCompositeExporter_1.0.0.car ${WSO2_SERVER_HOME}/repository/deployment/server/carbonapps/ COPY repository/resources/security/wso2carbon.jks ${WSO2_SERVER_HOME}/repository/resources/security/wso2carbon.jks COPY repository/resources/security/client-truststore.jks ${WSO2_SERVER_HOME}/repository/resources/security/client-truststore.jks COPY lib/mysql-connector-j-8.0.31.jar ${WSO2_SERVER_HOME}/lib/ #[DO NOT REMOVE] Auto generated Docker commands for config-map parser COPY --chown=wso2carbon:wso2 conf/axis2/axis2.xml ${WSO2_SERVER_HOME}/conf/axis2/axis2.xml COPY --chown=wso2carbon:wso2 conf/axis2/axis2_blocking_client.xml ${WSO2_SERVER_HOME}/conf/axis2/axis2_blocking_client.xml COPY --chown=wso2carbon:wso2 conf/carbon.properties ${WSO2_SERVER_HOME}/conf/carbon.properties COPY --chown=wso2carbon:wso2 conf/carbon.xml ${WSO2_SERVER_HOME}/conf/carbon.xml COPY --chown=wso2carbon:wso2 conf/datasources/master-datasources.xml ${WSO2_SERVER_HOME}/conf/datasources/master-datasources.xml COPY --chown=wso2carbon:wso2 conf/deployment.toml ${WSO2_SERVER_HOME}/conf/deployment.toml COPY --chown=wso2carbon:wso2 conf/etc/jmx.xml ${WSO2_SERVER_HOME}/conf/etc/jmx.xml COPY --chown=wso2carbon:wso2 conf/internal-apis.xml ${WSO2_SERVER_HOME}/conf/internal-apis.xml COPY --chown=wso2carbon:wso2 conf/jndi.properties ${WSO2_SERVER_HOME}/conf/jndi.properties COPY --chown=wso2carbon:wso2 conf/passthru-http.properties ${WSO2_SERVER_HOME}/conf/passthru-http.properties COPY --chown=wso2carbon:wso2 conf/security/cipher-text.properties ${WSO2_SERVER_HOME}/conf/security/cipher-text.properties COPY --chown=wso2carbon:wso2 conf/synapse-handlers.xml ${WSO2_SERVER_HOME}/conf/synapse-handlers.xml COPY --chown=wso2carbon:wso2 conf/synapse.properties ${WSO2_SERVER_HOME}/conf/synapse.properties COPY --chown=wso2carbon:wso2 conf/user-mgt.xml ${WSO2_SERVER_HOME}/conf/user-mgt.xml COPY --chown=wso2carbon:wso2 conf/log4j2.properties ${WSO2_SERVER_HOME}/conf/log4j2.properties COPY --chown=wso2carbon:wso2 wso2/components/extensions/*.jar ${WSO2_SERVER_HOME}/wso2/components/extensions/ COPY --chown=wso2carbon:wso2 repository/deployment/server/synapse-configs/default/sequences/main.xml ${WSO2_SERVER_HOME}/repository/deployment/server/synapse-configs/default/sequences/ RUN mkdir ${WSO2_SERVER_HOME}/repository/resources/conf/.metadata #The metadata_config line that I comment out for clustering to happen COPY --chown=wso2carbon:wso2 repository/resources/conf/.metadata/metadata_config.properties ${WSO2_SERVER_HOME}/repository/resources/conf/.metadata COPY --chown=wso2carbon:wso2 repository/resources/conf/.metadata/references.properties ${WSO2_SERVER_HOME}/repository/resources/conf/.metadata #COPY --chown=wso2carbon:wso2 conf/dev.properties ${WSO2_SERVER_HOME}/conf/dev.properties COPY --chown=wso2carbon:wso2 bin/micro-integrator.sh ${WSO2_SERVER_HOME}/bin/micro-integrator.sh #[DO NOT REMOVE] End of auto generated Docker commands for config-map parser
metadata_config.properties文件内容
#Mon Jun 19 00:22:48 IST 2023 conf\datasources\master-datasources.xml=d36fb3e31f19c570d8782026d3590514 conf\wso2-log-masking.properties=5112d6ac3870020c023a5007a413793b conf\axis2\axis2_blocking_client.xml=082871facdcfbe8e8a4086df2ac6ec95 conf\axis2\axis2.xml=8f3faee613d3bdcaf7b06b26186cd48b conf\synapse-handlers.xml=3374fb177f8affe3a7165e1807749bc0 conf\synapse.properties=1fc18394ba1c41b22d298a093e148412 conf\security\cipher-text.properties=bb8630dc24f1c8f3db43dfb36f081e24 conf\etc\jmx.xml=8b8f31f74326bcaf6287fb7bf974a32b conf\passthru-http.properties=f620c146d98f776b0fe6f6896e5b19aa conf\jndi.properties=613f9b52d735f8860d667b63c745b57e conf\deployment.toml=ff94196239772217110e98f9d172477a conf\carbon.xml=6b6fb5512d41873438097103bb0108b4 conf\carbon.properties=4803967724d40e537f1ca3c99303473e conf\user-mgt.xml=b5cc1bd3c4da75b59226512676705d7a conf\internal-apis.xml=9c350bb70dc2811ed31a3339388afaf9
内容的提问来源于stack exchange,提问作者ahinsa
相关产品推荐
相关产品推荐

