通过 API 上传许可文件
Upload License file via API
使用全新安装这本来应该很简单,但是每次我尝试上传许可证时,我都会收到一条奇怪的错误消息。
我正在使用 curl 上传许可证文件。
curl -X POST \
http://server_IP:7180/api/v13/cm/license \
-H 'authorization: Basic YWRtaW46YWRtaW4=' \
-H 'cache-control: no-cache' \
-H 'content-type: multipart/form-data;
-F 'id=@C:\Users\admin\Desktop\license_new.txt'
回复消息:
{ "message" : "No multipart with content id license found, request content type : multipart/form-data;boundary=--------------------------876318151600001394250578" }
有什么想法吗?
Version: Cloudera Enterprise 5.8.3 (#8 built by jenkins on 20161019-1014 git: 518f0d6d44abc87bc392646e4369a20c8192b7cf)
Java Version: 1.7.0_75
您可以试试:
curl -i -X POST -F license=@<license file> -u <username>:<password> -H "Content-Type:multipart/form-data" http://<cm-hostname>:7180/api/v13/cm/license
使用全新安装这本来应该很简单,但是每次我尝试上传许可证时,我都会收到一条奇怪的错误消息。
我正在使用 curl 上传许可证文件。
curl -X POST \
http://server_IP:7180/api/v13/cm/license \
-H 'authorization: Basic YWRtaW46YWRtaW4=' \
-H 'cache-control: no-cache' \
-H 'content-type: multipart/form-data;
-F 'id=@C:\Users\admin\Desktop\license_new.txt'
回复消息:
{ "message" : "No multipart with content id license found, request content type : multipart/form-data;boundary=--------------------------876318151600001394250578" }
有什么想法吗?
Version: Cloudera Enterprise 5.8.3 (#8 built by jenkins on 20161019-1014 git: 518f0d6d44abc87bc392646e4369a20c8192b7cf)
Java Version: 1.7.0_75
您可以试试:
curl -i -X POST -F license=@<license file> -u <username>:<password> -H "Content-Type:multipart/form-data" http://<cm-hostname>:7180/api/v13/cm/license