Docker容器中的更改后WSO2丢失API [英] WSO2 loss APIs after changes in docker container

查看:128
本文介绍了Docker容器中的更改后WSO2丢失API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用WSO2 API Manager 2.0.0时遇到了另一个问题:我已经使用三个容器(一个用于APIM,一个用于Analytics(分析),一个用于MySQL)在Docker中安装了它,并用自定义版本替换了一些配置文件(例如数据库,服务器名称,网关设置...). APIM和Analytics均已配置为将数据保存在MySQL容器中,并且我能够看到数据库中的更改.

I'm having another problem using WSO2 API Manager 2.0.0: I have installed it in docker using three containers (one for APIM, one for Analytics and one for MySQL) and I replace some configuration files with my custom version (e.g. DB, server name, gateway setup...). Both APIM and Analytics are configured to save data in the MySQL container and I am able to see changes in the DB.

问题是,在重建容器之后,我既无法在发布者中也无法在商店中找到我的API.数据库中的更改仍然存在,我可以查看所有API的统计信息,如果尝试使用相同的名称或上下文创建新的API,则会收到错误消息,但是新构建后存储始终为空.

The issue is that I cannot find my APIs neither in the publisher nor in the store after the container has been rebuilt. Changes in the DB persists, I can see the statistics for all my APIs and I get an error if I try to create a new API using the same name or context, but the store is always empty after a new build.

我还尝试将/repository/deployment/server/synapse-config/default/repository/tenants/放在两个卷中,并且可以看到在/.../default/api/中为我的API创建的文件,但是我无法弄清问题所在. 我是否应该保留指南中未提及的其他目录?

I have also tried to put both /repository/deployment/server/synapse-config/default and /repository/tenants/ in two volumes and I can see the files created in /.../default/api/ for my APIs, but I cannot figure out the issue. Should I persists some additional directory not mentioned in the guide?

如果可能的话,我不想将整个APIM和Google Analytics(分析)之家批量放置.

I don't want to put the whole APIM and Analytics homes in volumes if possible.

推荐答案

首先,检查工件是否可以位于资源浏览器中.

First, check whether artifacts can be located in Resources Browser.

如果可以找到与API相关的文件,则问题与索引有关. 执行以下操作以重新索引注册表中的工件:

If you can find the API related files, then the issue is related to indexing. Do the following to re-index the artifacts in the registry:

  1. 重命名<APIM_2.0.0_HOME>/repository/conf/registry.xml文件中的<lastAccessTimeLocation>元素.如果使用群集/分布式API Manager设置,请在"API Publisher"节点中更改文件.例如,将/_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime注册表路径更改为/_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime_1.
  2. 关闭API管理器,备份并删除<APIM_2.0.0_HOME>/solr目录.
  3. 最后启动API管理器.
  1. Rename the <lastAccessTimeLocation> element in the <APIM_2.0.0_HOME>/repository/conf/registry.xml file. If you use a clustered/distributed API Manager setup, change the file in the API Publisher node. For example, change the /_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime registry path to /_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime_1.
  2. Shut down the API Manager, back up and delete the <APIM_2.0.0_HOME>/solr directory.
  3. Finally start the API Manager.

这篇关于Docker容器中的更改后WSO2丢失API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆