Diego and Maven support


Daniel Mikusa
 

Krzysztof,

Passed some of this information along to engineering and they've got a
story to investigate this more.

https://www.pivotaltracker.com/story/show/106702544

From what I saw with some additional tests, this 503 error is not going to
prevent your app from deploying. It happens after the app has been
deployed, when the plugin is trying to monitor the progress of your app
while it stages and starts. The 503 will make Maven fail, but if you
ignore that and wait a bit you should see that the app stages and starts
successfully.

If it doesn't start, you could be hitting a different issue or there could
be some other problem with the app. You could try troubleshooting that by
using `cf` to push the app and by running `cf logs` in one terminal and
`mvn cf:push` from a second, which would let you see the full staging and
start up logs. Perhaps something in there would indicate the problem.

Dan

On Mon, Oct 26, 2015 at 10:23 AM, Daniel Mikusa <dmikusa(a)pivotal.io> wrote:

Krzysztof,

Thanks for the follow up. I pushed a test app and I'm seeing the same
"503 Service Unavailable" from Maven. Is that what you're seeing?

Dan

On Sun, Oct 25, 2015 at 4:32 PM, Krzysztof Wilk <chris.m.wilk(a)gmail.com>
wrote:

Dan,

It seems to me that there is more than one cause of this problem.

I have done the following:
1. upgraded cf CLI from 6.12 to 6.13
2.cf set-health-check MY_APP_NAME none
3. set <healthCheckTimeout>180</healthCheckTimeout> (pom.xml)
4. removed env variables in order to allow Maven to set them again

Still no luck.

However, I have read that there is intensive development of Maven client
plugin 2.x happening now. I will give it a try as soon as first release is
available.

Best,
Krzysztof


Daniel Mikusa
 

Krzysztof,

Thanks for the follow up. I pushed a test app and I'm seeing the same "503
Service Unavailable" from Maven. Is that what you're seeing?

Dan

On Sun, Oct 25, 2015 at 4:32 PM, Krzysztof Wilk <chris.m.wilk(a)gmail.com>
wrote:

Dan,

It seems to me that there is more than one cause of this problem.

I have done the following:
1. upgraded cf CLI from 6.12 to 6.13
2.cf set-health-check MY_APP_NAME none
3. set <healthCheckTimeout>180</healthCheckTimeout> (pom.xml)
4. removed env variables in order to allow Maven to set them again

Still no luck.

However, I have read that there is intensive development of Maven client
plugin 2.x happening now. I will give it a try as soon as first release is
available.

Best,
Krzysztof


Krzysztof Wilk
 

Dan,

It seems to me that there is more than one cause of this problem.

I have done the following:
1. upgraded cf CLI from 6.12 to 6.13
2.cf set-health-check MY_APP_NAME none
3. set <healthCheckTimeout>180</healthCheckTimeout> (pom.xml)
4. removed env variables in order to allow Maven to set them again

Still no luck.

However, I have read that there is intensive development of Maven client plugin 2.x happening now. I will give it a try as soon as first release is available.

Best,
Krzysztof


Daniel Mikusa
 

Krzysztof,

Ah, OK. That explains it then. I don't believe that the cf java client
v1.x or the Maven plugin have support for the health check functions. You
would need to do that with the cf cli. Version 6.13+ has it in the core.
Older versions require the Diego-Beta plugin.

Fortunately, you only need to set the health check once. As long as your
not deleting and recreating the application, it'll remember the selection
and you should be able to continue pushing with Maven.

Thanks for pointing this out though. I'll make a note of this use case in
our migration KB.

Dan


On Wed, Oct 21, 2015 at 2:32 AM, Krzysztof Wilk <chris.m.wilk(a)gmail.com>
wrote:

Hello Dan,

In my recent log I have found the following issue:
[INFO] 2015-10-18T14:16:02.329+0200 [HEALTH] OUT healthcheck failed
[INFO] 2015-10-18T14:16:02.330+0200 [HEALTH] OUT Exit status 1

Prior attempting to push application with Maven I have disabled health
check:
cf set-health-check KrzysztofWilkCurrencyConverter none


Relevant snippet of my Maven configuration (pom.xml) looks as follows:
<plugin>
<groupId>org.cloudfoundry</groupId>
<artifactId>cf-maven-plugin</artifactId>
<version>${cloudfoundry.maven.version}</version>
<configuration>
<server>mycloudfoundry-instance</server>
<target>http://api.run.pivotal.io</target>
<org>krzysztofwilk.pl</org>
<space>development</space>
<appname>KrzysztofWilkCurrencyConverter</appname>
<url>krzysztofwilkcurrencyconverter.cfapps.io</url>
<env>
<JDBC_DB_URL>${jdbc.db.url}</JDBC_DB_URL>
<JDBC_USERNAME>${jdbc.username}</JDBC_USERNAME>
<JDBC_PASSWORD>${jdbc.password}</JDBC_PASSWORD>
</env>
<services>
<service>
<name>CurrencyConverterDB</name>
<label>MySQL</label>
<plan>spark</plan>
</service>
</services>
</configuration>
</plugin>

All variables are resolved correctly.

Should I also disable health check via Maven? How should I do it?

Best regards,
Krzysztof


Krzysztof Wilk
 

Hello Dan,

In my recent log I have found the following issue:
[INFO] 2015-10-18T14:16:02.329+0200 [HEALTH] OUT healthcheck failed
[INFO] 2015-10-18T14:16:02.330+0200 [HEALTH] OUT Exit status 1

Prior attempting to push application with Maven I have disabled health check:
cf set-health-check KrzysztofWilkCurrencyConverter none


Relevant snippet of my Maven configuration (pom.xml) looks as follows:
<plugin>
<groupId>org.cloudfoundry</groupId>
<artifactId>cf-maven-plugin</artifactId>
<version>${cloudfoundry.maven.version}</version>
<configuration>
<server>mycloudfoundry-instance</server>
<target>http://api.run.pivotal.io</target>
<org>krzysztofwilk.pl</org>
<space>development</space>
<appname>KrzysztofWilkCurrencyConverter</appname>
<url>krzysztofwilkcurrencyconverter.cfapps.io</url>
<env>
<JDBC_DB_URL>${jdbc.db.url}</JDBC_DB_URL>
<JDBC_USERNAME>${jdbc.username}</JDBC_USERNAME>
<JDBC_PASSWORD>${jdbc.password}</JDBC_PASSWORD>
</env>
<services>
<service>
<name>CurrencyConverterDB</name>
<label>MySQL</label>
<plan>spark</plan>
</service>
</services>
</configuration>
</plugin>

All variables are resolved correctly.

Should I also disable health check via Maven? How should I do it?

Best regards,
Krzysztof


Daniel Mikusa
 

Can you explain what you mean by "stopped working"? Are you getting an error? Can you include output?

The push process hasn't changed, so that should continue to work. I'm not sure you can use the maven client to switch between DEAs and Diego, but you only need to do that once. So you could manually do that and then push with Maven.

Dan

On Oct 18, 2015, at 4:51 PM, Krzysztof Wilk <chris.m.wilk(a)gmail.com> wrote:

Hello,

Until today I have been a happy user of CloudFoundry Maven plugin version 1.1.2:
https://github.com/cloudfoundry/cf-java-client

It worked for me pretty well.

Unfortunately after having migrated my application from PWS to Diego, this plugin stopped working for me.

cf command line client works well, as expected.

Does the Maven plugin support Diego or should I have to wait until its 2.0 relase?

Thanks for replies,

Yours,
Krzysztof


Krzysztof Wilk
 

Hello,

Until today I have been a happy user of CloudFoundry Maven plugin version 1.1.2:
https://github.com/cloudfoundry/cf-java-client

It worked for me pretty well.

Unfortunately after having migrated my application from PWS to Diego, this plugin stopped working for me.

cf command line client works well, as expected.

Does the Maven plugin support Diego or should I have to wait until its 2.0 relase?

Thanks for replies,

Yours,
Krzysztof