
{"id":122,"date":"2014-06-15T20:00:47","date_gmt":"2014-06-15T10:00:47","guid":{"rendered":"http:\/\/mnm.at\/markus\/?p=122"},"modified":"2014-06-15T20:00:47","modified_gmt":"2014-06-15T10:00:47","slug":"stackato-auto-reconfiguration-test","status":"publish","type":"post","link":"https:\/\/mnm.at\/markus\/2014\/06\/15\/stackato-auto-reconfiguration-test\/","title":{"rendered":"Stackato auto-reconfiguration Test"},"content":{"rendered":"<h2>preparation<\/h2>\n<p>Started by making sure that the latest version still works.<\/p>\n<p>I already confirmed with Active State that you cannot upload a JAR directly, but have to unpack it so:<\/p>\n<p>from the working dir (same level as pom.xml)<br \/>\ncd .\/unpacked\/; unzip ..\/target\/unfamous-quotes-0.0.1-SNAPSHOT.jar; ls -al; cd ..<br \/>\nstackato push &#8211;path .\/unpacked\/<\/p>\n<p>But the application starts up on port 8080 which is not the port stackato wants it to run at and then it is killed and restarted and ..<br \/>\napplication.properties still has an entry about the server.port which I commented out and retried. But the server still started on<br \/>\nport 8080. So I made sure that the application.properties file was really updated which it was.<\/p>\n<p>In between tries I always removed application including the route with<\/p>\n<pre><code>stackato delete unfamous-quotes\n<\/code><\/pre>\n<p>No luck. nothing helped.<br \/>\nI don&#8217;t understand though since I have an example that works and this app worked fine before I did some static file changes.<\/p>\n<p>No matter what I check or do stackato is not able to assign the right port and the server runs on 8080 until it is killed of.<br \/>\nOf course I could set the port like for my simple server test but that defeats the purpose.<\/p>\n<p>Besides, the exact same JAR works on Pivotal&#8217;s Cloud Foundation free tier run.pivotal.io with a simple push.<\/p>\n<pre><code>cf push unfamous-quotes -p .\/target\/unfamous-quotes-0.0.1-SNAPSHOT.jar\n<\/code><\/pre>\n<p>Next I tried another trick that I already learned in my experiments. I upload the jar with Eclipse (STS)<br \/>\nOr you can also push with CF, but then I would have to log out of run.pivotal.io &#8211; which I am using in parallel  &#8211;<br \/>\nand into stackato, which also works. But unlike the stackato CLI the cf CLI does not allow multiple targets<br \/>\nand swithcing between them. So Eclispe it is.<br \/>\nThe push with Eclipse (or cf) will fail, too, but all it requires is a start of the app and the same jar works in stackato.<\/p>\n<p>Except that this does not resolve anything, the server still tstats on 127.0.0.0<\/p>\n<p>Setting the JAVA_OPTS environment variable has the same escaping problems as before, too.<\/p>\n<p>At this stage I am ready for one of my once in a month stress-release cigarettes.<br \/>\nThe stackato web UI does not do anything to calm me down, either. e.g. the page refresh is annoying.<\/p>\n<p>Even <code>cf set-env<\/code> did not work I assume there is an incompatibility with the build back<\/p>\n<p>since the logs show this, which neither seems to work nor does it contain any of my environment variables:<\/p>\n<pre><code>stackato[dea_ng.0]: Launching web process: $PWD\/.java-buildpack\/open_jdk\/bin\/java -cp $PWD\/.:$PWD\/.java-buildpack\/spring_auto_reconfiguration\/spring_auto_reconfiguration-0.8.9.jar -Djava.io.tmpdir=$TMPDIR -XX:MaxPermSize=64M -XX:OnOutOfMemoryError=$PWD\/.java-buildpack\/open_jdk\/bin\/killjava.sh -XX:PermSize=64M -Xms382293K -Xmx382293K -Xss995K org.springframework.boot.loader.JarLauncher --server.port=$PORT\n<\/code><\/pre>\n<p>And I give up for now.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>An unsuccessful test with my test app. <a href=\"https:\/\/mnm.at\/markus\/2014\/06\/15\/stackato-auto-reconfiguration-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[5],"tags":[20,17,16,14],"class_list":["post-122","post","type-post","status-publish","format-standard","hentry","category-tech","tag-auto-reconfiguration","tag-java","tag-paas","tag-stackato"],"_links":{"self":[{"href":"https:\/\/mnm.at\/markus\/wp-json\/wp\/v2\/posts\/122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mnm.at\/markus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mnm.at\/markus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mnm.at\/markus\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/mnm.at\/markus\/wp-json\/wp\/v2\/comments?post=122"}],"version-history":[{"count":2,"href":"https:\/\/mnm.at\/markus\/wp-json\/wp\/v2\/posts\/122\/revisions"}],"predecessor-version":[{"id":127,"href":"https:\/\/mnm.at\/markus\/wp-json\/wp\/v2\/posts\/122\/revisions\/127"}],"wp:attachment":[{"href":"https:\/\/mnm.at\/markus\/wp-json\/wp\/v2\/media?parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mnm.at\/markus\/wp-json\/wp\/v2\/categories?post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mnm.at\/markus\/wp-json\/wp\/v2\/tags?post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}