我们在SAP Cloud Foundry上运行了一个演示MTA。此MTA是通过SAP提供的mta_archive_builder工具构建的,并通过CLI进行部署。现在,大约一年后,我们想要更新这个MTA,没有什么大问题,只是一个属性更新。
在我尝试构建和部署任何东西之前,我升级了所有必需的工具。
MTA构建得很好,但是在部署MTAR时,我们的java应用程序上传失败。日志表明环境需要一些ZIP文件。mtar存档只保存.jar文件,这些文件应该是ZIP文件吗?如果是这样的话,是怎么做的?
我已经尝试使用新的MTA构建器,但没有任何运气。同样的问题也出现了。
cf.exe version 6.45.0+5f9ff16f9.2019-06-03Listing installed plugins...
plugin version command name command help
multiapps 2.1.1 bg-deploy Deploy a multi-target app using blue-green deployment
multiapps 2.1.1 deploy Deploy a new multi-target app or sync changes to an existing one
multiapps 2.1.1 download-mta-op-logs, dmol Download logs of multi-target app operation
multiapps 2.1.1 mta Display health and status for a multi-target app
multiapps 2.1.1 mta-ops List multi-target app operations
multiapps 2.1.1 mtas List all multi-target apps
multiapps 2.1.1 purge-mta-config Purge no longer valid configuration entries
multiapps 2.1.1 undeploy Undeploy a multi-target app
mta_archive_builder version 1.1.19 - name: ovinto
type: java
path: workspace/ovinto
parameters:
memory: 2048M
disk-quota: 512M
health-check-type: process
provides:
- name: ovinto_api
properties:
url: '${default-url}'
properties:
SPRING_PROFILES_ACTIVE: sapcloudfoundry
build-parameters:
builder: maven
maven-opts:
command: [ clean, verify ]
profiles:
- sapcf
defines:
skipTests: true
build-result: target/*.jar重要日志条目:
#2.0#2019 06 06 13:06:36.042#Z#DEBUG#com.sap.cloud.lm.sl.xs2.76178077.MAIN_LOG.uploadAppTask#
######com.sap.cloud.lm.sl.cf.persistence.services.ProcessLogger########flowable-async-job-executor-thread-3###
[UploadAppStep] Error uploading application "ovinto". [failed] "{
"response_code": "422",
"response_body": "{\"description\":\"The request is semantically invalid: bits uploaded is not a valid zip file\"}",
"response": {
"date": [
"Thu, 06 Jun 2019 13:06:27 GMT"
],
"content-length": [
"92"
],
"content-type": [
"text/plain; charset=utf-8"
],
"connection": [
"close"
]
}
}"#发布于 2019-06-25 20:18:08
这个问题已经在SAP社区上得到了回答,你可以在这里找到答案:https://answers.sap.com/questions/12705200/deploy-mtar-via-cf-cli.html
基本上,其中一个工具在.mtar归档中创建有问题的jar文件。解决方案是解压.mtar,使用命令"zip“修复jar归档,然后将它们重新打包到mtar归档中。
https://stackoverflow.com/questions/56541059
复制相似问题