mfpdev应用程序拉取失败,请求URL中包含错误的字符

时间:2017-11-17 17:35:55

标签: tomcat ibm-mobilefirst tomcat7 mobilefirst-cli

当我尝试从生产服务器中提取应用程序描述符时,出现400 Bad Request错误。检查后,看起来命令行工具尝试访问以下URL:

/mfpadmin/management-apis/2.0/runtimes/mfp/export?resourceInfos=com.company.application.bundle$ios$1.0.2||APP_DESCRIPTOR&resourceInfos=com.company.application.bundle$ios$1.0.2||APP_USER_CONFIGURATION

Tomcat错误日志然后报告以下内容:

Nov 17, 2017 6:24:27 PM org.apache.coyote.http11.AbstractHttp11Processor process
INFO: Error parsing HTTP request header
 Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
        at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:189)

它显然不喜欢请求中的|字符(删除它们并手动请求runtimes/mfp/export/all确实有效,例如)。这样,我无法将应用程序部署到生产服务器。

  • MFP服务器:8.0.0.00-20170710-1834
  • MFP Cli:8.0.0-2017102406
  • Tomcat:7.0.69
  • NPM:3.8

更新。下面是我得到的确切输出(更换敏感数据)。 127.0.0.0:8080是到客户服务器的SSH隧道。我做的不同之处是将NPM降级到3.8,但我不认为这应该起到任何作用。

Andreys-Air:App-customer andrey$ mfpdev app pull --server Customer -dd
mfpdev-cli verb cli process.argv=["/usr/local/bin/node","/usr/local/bin/mfpdev","app","pull","--server","Customer","-dd"]
mfpdev-cli verb cli opts={"server":true,"ddebug":true,"argv":{"remain":["app","pull","Customer"],"cooked":["app","pull","--server","Customer","--ddebug"],"original":["app","pull","--server","Customer","-dd"]}}
mfpdev-cli verb cli mobilefirst@8.0.0
mfpdev-cli verb cli node@v6.9.4
mfpdev-cli sill cli arguments passed to subcommand [ 'pull', '--server', 'Customer' ]
mfpdev-cli sill mdo-app-pull Passing getServerDetails the following settings: [object Object]
Verifying server configuration...
mfpdev-cli sill getServerAndRuntime retrieving runtimes for server: "Customer"
mfpdev-cli sill getRuntimes Arguments: {
mfpdev-cli sill getRuntimes  "protocol": "http",
mfpdev-cli sill getRuntimes  "host": "127.0.0.1",
mfpdev-cli sill getRuntimes  "port": "8080",
mfpdev-cli sill getRuntimes  "userName": "none",
mfpdev-cli sill getRuntimes  "userPassword": "none",
mfpdev-cli sill getRuntimes  "contextRoot": "mfpadmin",
mfpdev-cli sill getRuntimes  "timeout": 30
mfpdev-cli sill getRuntimes }
mfpdev-cli sill getRuntimes Arguments (with defaults): {
mfpdev-cli sill getRuntimes  "protocol": "http",
mfpdev-cli sill getRuntimes  "host": "127.0.0.1",
mfpdev-cli sill getRuntimes  "port": "8080",
mfpdev-cli sill getRuntimes  "userName": "none",
mfpdev-cli sill getRuntimes  "userPassword": "none",
mfpdev-cli sill getRuntimes  "contextRoot": "mfpadmin",
mfpdev-cli sill getRuntimes  "timeout": 30
mfpdev-cli sill getRuntimes }
mfpdev-cli sill getRuntimes HTTP timeout (milliseconds): 30000
mfpdev-cli sill get form.submit httpoptions: {"host":"127.0.0.1","port":"8080","path":"/mfpadmin/management-apis/2.0/runtimes?fullInfo=false","method":"GET","protocol":"http:","headers":{"Authorization":"Basic YWRtaW46YWRtaW4=","Accept":"application/json"}}
mfpdev-cli sill get socket connect
mfpdev-cli sill get post response:  200 OK
mfpdev-cli sill get resp.data: got some data; {"projects":[{"name":"mfp","apiVersion":"2.0","link":"http://127.0.0.1:8080/mfpadmin/management-apis/2.0/runtimes/mfp","synchronizationStatus":"ok","running":true}],"productVersion":"8.0.0.00-20170710-1834"}
mfpdev-cli sill get resp.end: resp data completely read.  status: 200
mfpdev-cli sill getRuntimes processResp: resp data completely read.  status: 200
mfpdev-cli sill getRuntimes processResp: resp data completely read.  body: {"projects":[{"name":"mfp","apiVersion":"2.0","link":"http://127.0.0.1:8080/mfpadmin/management-apis/2.0/runtimes/mfp","synchronizationStatus":"ok","running":true}],"productVersion":"8.0.0.00-20170710-1834"}
mfpdev-cli sill getRuntimes processResp: JSON body: {
mfpdev-cli sill getRuntimes  "projects": [
mfpdev-cli sill getRuntimes   {
mfpdev-cli sill getRuntimes    "name": "mfp",
mfpdev-cli sill getRuntimes    "apiVersion": "2.0",
mfpdev-cli sill getRuntimes    "link": "http://127.0.0.1:8080/mfpadmin/management-apis/2.0/runtimes/mfp",
mfpdev-cli sill getRuntimes    "synchronizationStatus": "ok",
mfpdev-cli sill getRuntimes    "running": true
mfpdev-cli sill getRuntimes   }
mfpdev-cli sill getRuntimes  ],
mfpdev-cli sill getRuntimes  "productVersion": "8.0.0.00-20170710-1834"
mfpdev-cli sill getRuntimes }
mfpdev-cli verb getRuntimes processResp: success
mfpdev-cli sill runtime Runtime Response: undefined
mfpdev-cli sill getServerAndRuntime found the following runtime: "mfp"
mfpdev-cli sill getServerDetails Arguments: {
mfpdev-cli sill getServerDetails  "protocol": "http",
mfpdev-cli sill getServerDetails  "host": "127.0.0.1",
mfpdev-cli sill getServerDetails  "port": "8080",
mfpdev-cli sill getServerDetails  "login": "none",
mfpdev-cli sill getServerDetails  "password": "none",
mfpdev-cli sill getServerDetails  "contextRoot": "mfpadmin",
mfpdev-cli sill getServerDetails  "timeout": 30,
mfpdev-cli sill getServerDetails  "ipAddress": "192.168.1.68"
mfpdev-cli sill getServerDetails }
mfpdev-cli verb mdo-app-pull Server Details response: {"serverProfile":{"protocol":"http","host":"127.0.0.1","port":"8080","login":"none","password":"none","contextRoot":"mfpadmin","timeout":30000,"ipAddress":"192.168.1.68","runtime":"mfp","userName":"none","userPassword":"none","details":false},"runtime":"mfp","protocol":"http","host":"127.0.0.1","port":"8080","contextRoot":"mfpadmin","userName":"none","userPassword":"none","timeout":30000,"details":false}
Pulling Application Settings from server:'http://127.0.0.1:8080' runtime:'mfp'
mfpdev-cli verb detectPlatforms detecting platforms present
mfpdev-cli sill detectCordovaAndroid Attempting to find AndroidManifest.xml to detect if below platform/android
mfpdev-cli sill detectCordovaAndroid Checking for platforms/android existence
mfpdev-cli sill detectCordovaAndroid could not detect platform: cordova-android
mfpdev-cli sill detectCordovaAndroid Could not find android proj
mfpdev-cli sill detectCordovaBrowser Attempting to find manifest.webapp to detect if below platform/browser
mfpdev-cli sill detectCordovaBrowser Checking for platforms/browser existence
mfpdev-cli sill detectCordovaBrowser could not detect platform: cordova-browser
mfpdev-cli sill detectCordovaBrowser Could not find browser proj
mfpdev-cli sill detectCordovaIOS Attempting to find *.xcodeproj to detect if below platform/ios
mfpdev-cli sill detectCordovaIOS Checking for platforms/ios existence
mfpdev-cli sill detectCordovaIOS Found platforms/ios at: /Users/andrey/Documents/Eclipse-MF80/App-customer/platforms/ios
mfpdev-cli sill detectCordovaWindows10 Attempting to find *.windows10.appxmanifest to detect if below platform/windows
mfpdev-cli sill detectCordovaWindows10 Checking for platforms/windows existence
mfpdev-cli sill detectCordovaWindows10 could not detect platform: cordova-windows10
mfpdev-cli sill detectCordovaWindows10 could not detect cordova-windows10
mfpdev-cli sill detectCordovaWindows8 Attempting to find *.windows.appxmanifest to detect if below platform/windows
mfpdev-cli sill detectCordovaWindows8 Checking for platforms/windows existence
mfpdev-cli sill detectCordovaWindows8 could not detect platform: cordova-windows8
mfpdev-cli sill detectCordovaWindows8 could not detect cordova-windows8
mfpdev-cli sill detectCordovaWindowsPhone8 Attempting to find *.phone.appxmanifest to detect if below platform/windows
mfpdev-cli sill detectCordovaWindowsPhone8 Checking for platforms/windows existence
mfpdev-cli sill detectCordovaWindowsPhone8 could not detect platform: cordova-windows8phone
mfpdev-cli sill detectCordovaWindowsPhone8 could not detect cordova-windows8phone
mfpdev-cli sill detectNativeWindows10 Error detecting: detected Cordova
mfpdev-cli sill detectNativeWindows8 Error detecting: cordova detected
mfpdev-cli sill detectNativeWindowsPhone8 Error detecting: detected Cordova
mfpdev-cli verb mdo-app-pull detectedProjectInfo: {"isCordova":true,"rootDir":"/Users/andrey/Documents/Eclipse-MF80/App-customer","platforms":[{"appName":"App-Customer","configXMLPath":"/Users/andrey/Documents/Eclipse-MF80/App-customer/config.xml","platformPath":"/Users/andrey/Documents/Eclipse-MF80/App-customer/platforms/ios","platformId":"cordova-ios","platform":"ios"}]}
mfpdev-cli verb parsePlatformInfo Parsing platform: cordova-ios
mfpdev-cli sill parsePlatformInfo Parsing for platform: cordova-ios
mfpdev-cli verb mdo-app-pull Found the following platform information for mdoProjects[0]: {"app.version":"1.0.2","app.name":"App-Customer","app.description":"App Customer app.","app.dotId":"com.company.app.customer","author.name":"App","author.email":"info@app.nl","author.href":"https://www.app.nl","app.mainfile":"index.html"}
mfpdev-cli sill mdo-app-pull current application name: App-Customer
mfpdev-cli verb mdo-app-pull Prompts returned the following Application Information: {"app.dotId":"com.company.app.customer","app.version":"1.0.2"}
mfpdev-cli verb mdo-app-pull Updated Application Information: {"app.dotId":"com.company.app.customer","app.version":"1.0.2","name":"App-Customer","environment":"ios"}
mfpdev-cli verb mdo-app-pull serverDetails with application information: {"serverProfile":{"protocol":"http","host":"127.0.0.1","port":"8080","login":"none","password":"none","contextRoot":"mfpadmin","timeout":30000,"ipAddress":"192.168.1.68","runtime":"mfp","userName":"none","userPassword":"none","details":false,"fullURL":"http://127.0.0.1:8080"},"runtime":"mfp","protocol":"http","host":"127.0.0.1","port":"8080","contextRoot":"mfpadmin","userName":"none","userPassword":"none","timeout":30000,"details":false,"applicationDetails":{"applicationKey":{"version":"1.0.2","clientPlatform":"ios","bundleId":"com.company.app.customer"}}}
mfpdev-cli sill application-descriptor serverDetails: {
mfpdev-cli sill application-descriptor  "protocol": "http",
mfpdev-cli sill application-descriptor  "host": "127.0.0.1",
mfpdev-cli sill application-descriptor  "port": "8080",
mfpdev-cli sill application-descriptor  "login": "none",
mfpdev-cli sill application-descriptor  "password": "none",
mfpdev-cli sill application-descriptor  "contextRoot": "mfpadmin",
mfpdev-cli sill application-descriptor  "timeout": 30000,
mfpdev-cli sill application-descriptor  "ipAddress": "192.168.1.68",
mfpdev-cli sill application-descriptor  "runtime": "mfp",
mfpdev-cli sill application-descriptor  "userName": "none",
mfpdev-cli sill application-descriptor  "userPassword": "none",
mfpdev-cli sill application-descriptor  "details": false,
mfpdev-cli sill application-descriptor  "fullURL": "http://127.0.0.1:8080"
mfpdev-cli sill application-descriptor }
mfpdev-cli sill application-descriptor serverDetails after defaults applied: {
mfpdev-cli sill application-descriptor  "protocol": "http",
mfpdev-cli sill application-descriptor  "host": "127.0.0.1",
mfpdev-cli sill application-descriptor  "port": "8080",
mfpdev-cli sill application-descriptor  "login": "none",
mfpdev-cli sill application-descriptor  "password": "none",
mfpdev-cli sill application-descriptor  "contextRoot": "mfpadmin",
mfpdev-cli sill application-descriptor  "timeout": 30000,
mfpdev-cli sill application-descriptor  "ipAddress": "192.168.1.68",
mfpdev-cli sill application-descriptor  "runtime": "mfp",
mfpdev-cli sill application-descriptor  "userName": "none",
mfpdev-cli sill application-descriptor  "userPassword": "none",
mfpdev-cli sill application-descriptor  "details": false,
mfpdev-cli sill application-descriptor  "fullURL": "http://127.0.0.1:8080"
mfpdev-cli sill application-descriptor }
mfpdev-cli verb application-descriptor Application Descriptor File Path: /Users/andrey/Documents/Eclipse-MF80/App-customer/mobilefirst/com.company.app.customer-ios-1.0.2-artifacts.zip
mfpdev-cli sill get-file form.submit httpoptions: {"host":"127.0.0.1","port":"8080","path":"/mfpadmin/management-apis/2.0/runtimes/mfp/export?resourceInfos=com.company.app.customer$ios$1.0.2||APP_DESCRIPTOR&resourceInfos=com.company.app.customer$ios$1.0.2||APP_USER_CONFIGURATION","method":"GET","protocol":"http:","headers":{"Authorization":"Basic YWRtaW46YWRtaW4="}}
mfpdev-cli sill get-file socket connect
mfpdev-cli sill get-file response output: [object Object]
mfpdev-cli sill get-file post response:  400 Bad Request
mfpdev-cli sill get-file deleting local copy of file: /Users/andrey/Documents/Eclipse-MF80/App-customer/mobilefirst/com.company.app.customer-ios-1.0.2-artifacts.zip
mfpdev-cli verb get-file resource not found on server
mfpdev-cli sill get-file resp.end: resp data completely read.  status: 400
mfpdev-cli verb application-descriptor BadRequest: HTTP 400 - Bad Request
mfpdev-cli verb application-descriptor     at FormData.<anonymous> (/usr/local/lib/node_modules/mfpdev-cli/node_modules/mdo-server-support/lib/rest-client/get-file.js:120:27)
mfpdev-cli verb application-descriptor     at emitOne (events.js:96:13)
mfpdev-cli verb application-descriptor     at ClientRequest.emit (events.js:188:7)
mfpdev-cli verb application-descriptor     at HTTPParser.parserOnIncomingClient (_http_client.js:474:21)
mfpdev-cli verb application-descriptor     at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
mfpdev-cli verb application-descriptor     at Socket.socketOnData (_http_client.js:363:20)
mfpdev-cli verb application-descriptor     at emitOne (events.js:96:13)
mfpdev-cli verb application-descriptor     at Socket.emit (events.js:188:7)
mfpdev-cli verb application-descriptor     at readableAddChunk (_stream_readable.js:176:18)
mfpdev-cli verb application-descriptor     at Socket.Readable.push (_stream_readable.js:134:10)
mfpdev-cli verb application-descriptor  form error:  { BadRequest: HTTP 400 - Bad Request
mfpdev-cli verb application-descriptor     at FormData.<anonymous> (/usr/local/lib/node_modules/mfpdev-cli/node_modules/mdo-server-support/lib/rest-client/get-file.js:120:27)
mfpdev-cli verb application-descriptor     at emitOne (events.js:96:13)
mfpdev-cli verb application-descriptor     at ClientRequest.emit (events.js:188:7)
mfpdev-cli verb application-descriptor     at HTTPParser.parserOnIncomingClient (_http_client.js:474:21)
mfpdev-cli verb application-descriptor     at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
mfpdev-cli verb application-descriptor     at Socket.socketOnData (_http_client.js:363:20)
mfpdev-cli verb application-descriptor     at emitOne (events.js:96:13)
mfpdev-cli verb application-descriptor     at Socket.emit (events.js:188:7)
mfpdev-cli verb application-descriptor     at readableAddChunk (_stream_readable.js:176:18)
mfpdev-cli verb application-descriptor     at Socket.Readable.push (_stream_readable.js:134:10) name: 'BadRequest' }
mfpdev-cli verb mdo-app-pull { state: 'rejected',
mfpdev-cli verb mdo-app-pull   reason: 
mfpdev-cli verb mdo-app-pull    { ApplicationDescriptorPullError: Application descriptor pull error: HTTP 400 - Bad Request
mfpdev-cli verb mdo-app-pull        at /usr/local/lib/node_modules/mfpdev-cli/node_modules/mdo-server-support/lib/rest-client-api/application-descriptor.js:256:19
mfpdev-cli verb mdo-app-pull        at _rejected (/usr/local/lib/node_modules/mfpdev-cli/node_modules/q/q.js:844:24)
mfpdev-cli verb mdo-app-pull        at /usr/local/lib/node_modules/mfpdev-cli/node_modules/q/q.js:870:30
mfpdev-cli verb mdo-app-pull        at Promise.when (/usr/local/lib/node_modules/mfpdev-cli/node_modules/q/q.js:1122:31)
mfpdev-cli verb mdo-app-pull        at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/mfpdev-cli/node_modules/q/q.js:788:41)
mfpdev-cli verb mdo-app-pull        at /usr/local/lib/node_modules/mfpdev-cli/node_modules/q/q.js:604:44
mfpdev-cli verb mdo-app-pull        at runSingle (/usr/local/lib/node_modules/mfpdev-cli/node_modules/q/q.js:137:13)
mfpdev-cli verb mdo-app-pull        at flush (/usr/local/lib/node_modules/mfpdev-cli/node_modules/q/q.js:125:13)
mfpdev-cli verb mdo-app-pull        at _combinedTickCallback (internal/process/next_tick.js:67:7)
mfpdev-cli verb mdo-app-pull        at process._tickCallback (internal/process/next_tick.js:98:9)
mfpdev-cli verb mdo-app-pull      jse_shortmsg: 'Application descriptor pull error',
mfpdev-cli verb mdo-app-pull      jse_summary: 'Application descriptor pull error: HTTP 400 - Bad Request',
mfpdev-cli verb mdo-app-pull      jse_cause: 
mfpdev-cli verb mdo-app-pull       { BadRequest: HTTP 400 - Bad Request
mfpdev-cli verb mdo-app-pull           at FormData.<anonymous> (/usr/local/lib/node_modules/mfpdev-cli/node_modules/mdo-server-support/lib/rest-client/get-file.js:120:27)
mfpdev-cli verb mdo-app-pull           at emitOne (events.js:96:13)
mfpdev-cli verb mdo-app-pull           at ClientRequest.emit (events.js:188:7)
mfpdev-cli verb mdo-app-pull           at HTTPParser.parserOnIncomingClient (_http_client.js:474:21)
mfpdev-cli verb mdo-app-pull           at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
mfpdev-cli verb mdo-app-pull           at Socket.socketOnData (_http_client.js:363:20)
mfpdev-cli verb mdo-app-pull           at emitOne (events.js:96:13)
mfpdev-cli verb mdo-app-pull           at Socket.emit (events.js:188:7)
mfpdev-cli verb mdo-app-pull           at readableAddChunk (_stream_readable.js:176:18)
mfpdev-cli verb mdo-app-pull           at Socket.Readable.push (_stream_readable.js:134:10) name: 'BadRequest' },
mfpdev-cli verb mdo-app-pull      message: 'Application descriptor pull error: HTTP 400 - Bad Request',
mfpdev-cli verb mdo-app-pull      name: 'ApplicationDescriptorPullError',
mfpdev-cli verb mdo-app-pull      appDetails: '{"version":"1.0.2","clientPlatform":"ios","bundleId":"com.company.app.customer"}' } }
Application descriptor pull error: HTTP 400 - Bad Request
{"version":"1.0.2","clientPlatform":"ios","bundleId":"com.company.app.customer"}
mfpdev-cli verb cli finish with mobilefirst app
mfpdev-cli verb code 0
Andreys-Air:App-customer andrey$ 

0 个答案:

没有答案