1

I've deployed my application on cloudhub.io after testing in on my local machine. The log says the application has been successfully deployed and is running as it should, but when i try to use it, i get a page that says : If you deployed your application and expected to see something here, that means you need to change the configuration of your docroot.

I don't understand what i have to do in this case, can't find any reference to docroot on mule's website.

EDIT: This is most of my config

    <sns:config name="Amazon_SNS" accessKey="*********" secretKey="********"  doc:name="Amazon SNS" region="EUWEST1">
    <sns:connection-pooling-profile initialisationPolicy="INITIALISE_ONE" exhaustedAction="WHEN_EXHAUSTED_GROW"/>
</sns:config>
<http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="${http.port}" doc:name="HTTP Listener Configuration"/>
<json:object-to-json-transformer name="Object_to_JSON" doc:name="Object to JSON"/>
<flow name="CreateTopic">
    <http:listener config-ref="HTTP_Listener_Configuration" path="/createtopic" doc:name="HTTP"/>
    <sns:create-topic config-ref="Amazon_SNS" doc:name="Amazon SNS">
        <sns:create-topic-request name="#[message.inboundProperties.'http.query.params'.name]"/>
    </sns:create-topic>
    <json:object-to-json-transformer doc:name="Object to JSON"/>
</flow>
<flow name="Subscribe">
    <http:listener config-ref="HTTP_Listener_Configuration" path="/Subscribe" doc:name="HTTP"/>
    <sns:subscribe config-ref="Amazon_SNS" doc:name="Amazon SNS">
        <sns:subscribe-request topicArn="#[message.inboundProperties.'http.query.params'.topic]" protocol="email" endpoint="#[message.inboundProperties.'http.query.params'.subscriber]"/>
    </sns:subscribe>
    <json:object-to-json-transformer doc:name="Object to JSON"/>
</flow>
<flow name="ListTopics">
    <http:listener config-ref="HTTP_Listener_Configuration" path="/listTopics" doc:name="HTTP"/>
    <sns:list-topics config-ref="Amazon_SNS" doc:name="Amazon SNS">
    </sns:list-topics>
    <json:object-to-json-transformer doc:name="Object to JSON"/>
</flow>
<flow name="Publish">
    <http:listener config-ref="HTTP_Listener_Configuration" path="/publish" doc:name="HTTP"/>
    <sns:publish config-ref="Amazon_SNS" doc:name="Amazon SNS">
        <sns:publish-request topicArn="#[message.inboundProperties.'http.query.params'.topic]" message="There's new content in the topic #[message.inboundProperties.'http.query.params'.topic]" subject="New comments on an idea - Crowdsourcing Forums" messageStructure="Raw"/>
    </sns:publish>
    <json:object-to-json-transformer doc:name="Object to JSON"/>
</flow>
<flow name="checkTopic">
    <http:listener config-ref="HTTP_Listener_Configuration" path="/checkTopic" doc:name="HTTP"/>
    <sns:get-topic-attributes config-ref="Amazon_SNS" doc:name="Amazon SNS">
        <sns:get-topic-attributes-request topicArn="#[message.inboundProperties.'http.query.params'.topic]"/>
    </sns:get-topic-attributes>
</flow>
Dinesh
  • 3,065
  • 1
  • 18
  • 19
Yash
  • 97
  • 1
  • 11
  • Can you post some relevant config of the endpoints you exposing? Also are you using the recommended ports? http://www.mulesoft.org/documentation/display/current/Developing+a+CloudHub+Application#DevelopingaCloudHubApplication-ProvidinganExternalHTTPorHTTPSPort – Ryan Carter May 05 '15 at 18:08
  • Updated topic with code. – Yash May 05 '15 at 19:02

1 Answers1

1

You have the port set to 8080.

CloudHub only supports incoming traffic on port 80 of your application domain URL as described here: http://www.mulesoft.org/documentation/display/current/Developing+a+CloudHub+Application#DevelopingaCloudHubApplication-ProvidinganExternalHTTPorHTTPSPort.

You can use the http.port environment variable:

port="${http.port}"

Also set the host to 0.0.0.0

<http:listener-config port="${http.port}" host="0.0.0.0"
        name="http" />
Ryan Carter
  • 11,441
  • 2
  • 20
  • 27
  • Sorry, that was my local config, before i deployed i set the port to ${http.port} so i still have the same problem.. – Yash May 05 '15 at 19:35
  • Well based on that, you should be able to hit: 'http://YOURAPPNAME.cloudhub.io/createtopic' – Ryan Carter May 05 '15 at 19:37
  • i can't, i keep getting this message, no matter what i type: Uh-oh spaghettios! There's nothing here. If you deployed your application and expected to see something here, that means you need to change the configuration of your docroot. However, many integration apps don't need a user interface-- they silently work in the background integrating stuff and fighting crime. If you need further help, please feel free to contact us. – Yash May 05 '15 at 19:44
  • That did it, i also had to stop my other projects and then start that one in order for it to be deployed and work correctly. Thanks Ryan! – Yash May 06 '15 at 21:33
  • Worked for me. I just found this article, it's a walk through for this, see Step 2: Configure the HTTP Connector: https://docs.mulesoft.com/cloudhub/getting-started-with-connectors – Garth Nov 16 '15 at 11:47