I tried to deploy an app which contains a BPMN model, but I get the following error all the time (although it have worked some time ago):
I think it started failing after I imported the process/app from another environment, but I am not 100% sure about that.
Now some details about my setup.
All the flowable applications (v6.3.1) are deployed to a tomcat instance (v9.0.2). The server is listening on port 8080 (for now), but the domain is not localhost. Let’s say it’s example.org
I use the same configuration for the applications, which contains these lines:
I am not even sure if I have to set all these url properties.
I am using Oracle database, version: 12.1.0.2.0
The exception I see in the log file:
No mapping found for HTTP request with URI [/flowable-task/process-api/app-repository/deployments] in DispatcherServlet with name 'Flowable BPMN Rest API'
Invalid deploy result code: HTTP/1.1 404
Even though the process-api is mapped when the server starts up:
Servlet Flowable BPMN Rest API mapped to [/process-api/*]
I checked again the log files (debug mode is enabled), but I didn’t see anything at startup time, or when a request was made.
Although when I load the page I get exceptions like this for the different assets, but I doubt that’s related to my problem:
Cannot forward to error page for request [/libs/bootstrap_3.1.1/css/bootstrap.min.css] as the response has already been committed. As a result, the response may have the wrong status code. If your application is running on WebSphere Application Server you may be able to resolve this problem by setting com.ibm.ws.webcontainer.invokeFlushAfterService to false
org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:333) ~[catalina.jar:9.0.2]
at org.apache.catalina.connector.OutputBuffer.flushByteBuffer(OutputBuffer.java:748) ~[catalina.jar:9.0.2]
....
I can give you the full stacktrace if you need it.
But other than this, I don’t see errors or warnings in the log file.
Looks like I figured out what the issue was.
There are multiple things that were misleading in this scenario.
First the error message. It was saying that it’s a 404 issue (endpoint unavailable), but that’s not the case. I was able to call the endpoint from Postman without any problem, so I thought it must be something else.
I think that’s the correct API: http://example.org:8080/flowable-task/process-api/repository/deployments?deploymentKey=test_deployment_key1&deploymentName=test_deployment_name1
I also thought that maybe my server is not able to resolve the example.org domain and that’s why it’s throwing 404, but I was able to ping it and telnet to it from that machine, so again, that couldn’t have been the case.
I also tried to use localhost, but it resulted the same error.
Then, I saw that in the AppDefinitionPublishService#deployZipArtifact it retrieves the username/password from the properties file, where these are defined by default.
But looks like something is wrong with this part.
When I explicitly defined them in my properties, it actually started working:
After looking at the FlowableCommonAppProperties -> Admin -> user property, I see there is default username there, so I only had to overwrite the password in my properties, I don’t actually need the flowable.common.app.idm-admin.user.
Not sure what’s going on or why it’s happening, but it solved my issue.
I would like to update my last comment on this ticket.
I know that last time I said that once I set the password, it started working (which didn’t make sense, even back then), but looks like that’s not the issue.
I redeployed flowable on a different server and I am facing the same issue.
Now I dived into the source code a little bit more carefully and I noticed one thing.
Please feel free to correct me in any step, I might be missing something.
When I hit the publish button in flowable-modeler (for the app), this function gets called:
Here you can see that the deployApiUrl starts with “app-repository”, but then I searched for this url in the source code and I couldn’t find it anywhere (with these same parameters: deploymentKey, deploymentName).
But I found another function which was expecting the same parameters:
But here the url starts with only “repository” and not with “app-repository”, please note the lack of app- there.
Am I correct when I say that these urls should be the same?
Or is something else called?
I tested one more thing.
Updated my AppDefinitionPublishService and changed the url to repository/deployments?deploymentKey=%s&deploymentName=%s, rebuilt the flowable-ui-modeler-logic project and replaced the jar file on my tomcat.
Once I restarted it, the publish button started working.
Can somebody give me some guidance on what am I missing?
Now that still doesn’t explain how my original server started working when I defined the password in the properties, I will try to figure that out later, unfortunately I can’t access it at the moment.
You are right the called endpoint is the one that you mentioned.
However, the endpoint you are looking for is here in the AppDeploymentCollectionResource.
That endpoint is part of the flowable-task or flowable-rest application and as you noticed the flowable.common.app.idm-admin.user and flowable.common.app.idm-admin.password properties are the ones which are used to perform the deployment of the zip.
I also just noticed that before /flowable-task/process-api was being hit. However, the default url (flowable.modeler.app.deployment-api-url) should be http://localhost:8080/flowable-task/app-api. Most probably that is the problem.
The reason why it works if you change the source code to /repository is the fact that it was like that before, but in 6.3.1 we introduced a new app engine which is responsible for this job.
Would it be possible to update the wiki?
If you search for flowable.modeler.app.deployment-api-url then you will find where it’s still displaying the old url.
Can the flowable modeler app deploy to a flowable-spring-boot-starter-rest app? I tried publishing an app but all I get in the server logs is an informative error log:
Invalid deploy result code: HTTP/1.1 404 http://localhost:8080/my_spring_app_context/app-api/app-repository/deployments?deploymentKey=test_app_def_1&deploymentName=test_app_1 for url