<div dir="ltr">Farah/Andrea,<div><br></div><div>is that on _creation_ or,also w/ any redirect from http -&gt; https (enforced by our Push cartridge)</div><div><br></div><div>-Matthias </div></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Tue, Jan 28, 2014 at 9:46 AM, Andrea Vibelli <span dir="ltr">&lt;<a href="mailto:avibelli@redhat.com" target="_blank">avibelli@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Farah,<br>
yes I do use FireFox.<br>
<br>
I have done the tests once again, and closing and reopening the browser solved my issue, great, nice catch!<br>
Maybe we could also include this additional step in the overall instructions, what do you think?<br>
Thank you<br>
Andrea<br>
<br>
----- Messaggio originale -----<br>
&gt; Da: &quot;Farah Juma&quot; &lt;<a href="mailto:fjuma@redhat.com">fjuma@redhat.com</a>&gt;<br>
&gt; A: &quot;Andrea Vibelli&quot; &lt;<a href="mailto:avibelli@redhat.com">avibelli@redhat.com</a>&gt;, <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
&gt; Inviato: Lunedì, 27 gennaio 2014 22:28:07<br>
&gt; Oggetto: Re: [aerogear-dev] Upgrading process for the OpenShift AeroGear      UPS     cartridge<br>
<div class="HOEnZb"><div class="h5">&gt;<br>
&gt; After some more digging, I think I might know what&#39;s going on here. Andrea,<br>
&gt; are you using Firefox? I wasn&#39;t able to reproduce the issue with Chrome but<br>
&gt; was able to reproduce it just now with Firefox. The underlying issue seems<br>
&gt; to be that Firefox tends to save 301 redirects until you close it and<br>
&gt; re-open it. Note that when you delete an OpenShift instance and re-create<br>
&gt; it, its IP address changes. When accessing <a href="http://app-namespace.rhcloud" target="_blank">http://app-namespace.rhcloud</a><br>
&gt; after re-creating the instance, you&#39;ll actually be redirected to<br>
&gt; <a href="https://app-namespace.rhcloud/app" target="_blank">https://app-namespace.rhcloud/app</a>. However, when using Firefox, this URL<br>
&gt; seems to get mapped to the old IP address resulting in this error: &#39;The<br>
&gt; requested URL /app was not found on this server.&#39; After deleting and<br>
&gt; re-creating an OpenShift instance with the same name, if you restart<br>
&gt; Firefox, you should once again be able to access the application. I&#39;ve<br>
&gt; verified that this does work.<br>
&gt;<br>
&gt; Similar issues with Firefox were actually mentioned in some OpenShift forum<br>
&gt; posts as well:<br>
&gt;<br>
&gt; <a href="https://www.openshift.com/forums/openshift/httpawm-pribylrhcloudcom-the-requested-url-was-not-found-on-this-server#comment-33570" target="_blank">https://www.openshift.com/forums/openshift/httpawm-pribylrhcloudcom-the-requested-url-was-not-found-on-this-server#comment-33570</a><br>

&gt; <a href="https://www.openshift.com/forums/openshift/custom-domain-httpwwwxxxxxxxcom-is-redirecting-to-httpswwwxxxxxxxcomapp#comment-34215" target="_blank">https://www.openshift.com/forums/openshift/custom-domain-httpwwwxxxxxxxcom-is-redirecting-to-httpswwwxxxxxxxcomapp#comment-34215</a><br>

&gt;<br>
&gt;<br>
&gt; Farah<br>
&gt;<br>
&gt; ----- Original Message -----<br>
&gt; &gt; From: &quot;Farah Juma&quot; &lt;<a href="mailto:fjuma@redhat.com">fjuma@redhat.com</a>&gt;<br>
&gt; &gt; To: <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
&gt; &gt; Sent: Monday, January 27, 2014 1:07:31 PM<br>
&gt; &gt; Subject: Re: [aerogear-dev] Upgrading process for the OpenShift AeroGear<br>
&gt; &gt;         UPS        cartridge<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; &gt; From: &quot;Andrea Vibelli&quot; &lt;<a href="mailto:avibelli@redhat.com">avibelli@redhat.com</a>&gt;<br>
&gt; &gt; &gt; To: <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
&gt; &gt; &gt; Sent: Monday, January 27, 2014 12:27:04 PM<br>
&gt; &gt; &gt; Subject: [aerogear-dev] Upgrading process for the OpenShift AeroGear UPS<br>
&gt; &gt; &gt;         cartridge<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Hello all,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I just wanted to let you know that Farah is working on AGPUSH-504, a<br>
&gt; &gt; &gt; snapshot/restore approach for upgrading the downloadable cartridge.<br>
&gt; &gt; &gt; The overall idea is to take a snapshot of the database (and other<br>
&gt; &gt; &gt; configuration) for an older existing cartridge instance, delete this old<br>
&gt; &gt; &gt; instance, and then create a new instance based on the latest cartridge<br>
&gt; &gt; &gt; version and restore the new instance&#39;s database (and other configuration)<br>
&gt; &gt; &gt; to<br>
&gt; &gt; &gt; the state in the snapshot. The new instance must have the same name as<br>
&gt; &gt; &gt; the<br>
&gt; &gt; &gt; old instance. The main thing that she needed to determine was what needed<br>
&gt; &gt; &gt; to<br>
&gt; &gt; &gt; be included in the snapshot that&#39;s not already part of the MySQL<br>
&gt; &gt; &gt; database.<br>
&gt; &gt; &gt; The SimplePush token key was one of these things (we generate this value<br>
&gt; &gt; &gt; when a cartridge instance is created and it is used by the server for<br>
&gt; &gt; &gt; encryption and decryption of endpoint URLs). The standalone.xml file also<br>
&gt; &gt; &gt; needed to be backed up just in case the user made any changes to it.<br>
&gt; &gt; &gt; (Creating a backup of this file allows users to manually merge back any<br>
&gt; &gt; &gt; changes they may have made.)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; The snapshot/restore action hooks she has created can be found in [1].<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; The steps she has been using to try upgrading from an 0.8.1 instance are<br>
&gt; &gt; &gt; listed below. It would be great if you could try out these steps as well.<br>
&gt; &gt; &gt; There&#39;s one important caveat though: because an 0.8.1 instance won&#39;t have<br>
&gt; &gt; &gt; the necessary snapshot hook, you&#39;ll need to manually perform some<br>
&gt; &gt; &gt; commands<br>
&gt; &gt; &gt; to save the necessary data (step 3 below). If we include these<br>
&gt; &gt; &gt; snapshot/restore action hooks in the 0.10.0 cartridge release, users will<br>
&gt; &gt; &gt; be<br>
&gt; &gt; &gt; able to make use of these hooks for future upgrades, e.g., for upgrading<br>
&gt; &gt; &gt; from 0.10.0 to 0.11.0.<br>
&gt; &gt; &gt;  <br>
&gt; &gt; &gt; 1) Create an 0.8.1 cartridge instance<br>
&gt; &gt; &gt; rhc create-app mypush<br>
&gt; &gt; &gt; &quot;<a href="https://cartreflect-claytondev.rhcloud.com/reflect?github=aerogear/openshift-origin-cartridge-aerogear-push&amp;commit=8aada257de52157a837db23a9f7b1a8574fdffab" target="_blank">https://cartreflect-claytondev.rhcloud.com/reflect?github=aerogear/openshift-origin-cartridge-aerogear-push&amp;commit=8aada257de52157a837db23a9f7b1a8574fdffab</a>&quot;<br>

&gt; &gt; &gt; mysql-5.1<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 2) Log into the admin console, change password, create push applications,<br>
&gt; &gt; &gt; create variants, send push notifications, etc.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 3) ssh into your instance and perform these commands (this step manually<br>
&gt; &gt; &gt; captures needed data)<br>
&gt; &gt; &gt; echo &quot;$OPENSHIFT_AEROGEAR_PUSH_TOKEN_KEY&quot; &gt;<br>
&gt; &gt; &gt; $OPENSHIFT_DATA_DIR/aerogear_push_token_key<br>
&gt; &gt; &gt; cp $OPENSHIFT_AEROGEAR_PUSH_DIR/standalone/configuration/standalone.xml<br>
&gt; &gt; &gt; $OPENSHIFT_DATA_DIR/standalone.snapshot.xml<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 4) Create a snapshot of the 0.8.1 instance: rhc snapshot save mypush<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 5) Delete the 0.8.1 instance: rhc app delete mypush<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 6) Delete the local directory on the local machine (from step 1, you<br>
&gt; &gt; &gt; should<br>
&gt; &gt; &gt; have a directory named &#39;mypush&#39;)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 7) Create a new cartridge instance (this uses her fork of the 0.9.0<br>
&gt; &gt; &gt; cartridge<br>
&gt; &gt; &gt; repository that contains the snapshot/restore action hooks)<br>
&gt; &gt; &gt; rhc create-app mypush<br>
&gt; &gt; &gt; &quot;<a href="https://cartreflect-claytondev.rhcloud.com/reflect?github=fjuma/openshift-origin-cartridge-aerogear-push&amp;commit=956a4fc09edc93fe76394b86b265ceb1d238ccaf" target="_blank">https://cartreflect-claytondev.rhcloud.com/reflect?github=fjuma/openshift-origin-cartridge-aerogear-push&amp;commit=956a4fc09edc93fe76394b86b265ceb1d238ccaf</a>&quot;<br>

&gt; &gt; &gt; mysql-5.1<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 8) Restore the instance: rhc snapshot restore mypush -f<br>
&gt; &gt; &gt; /PATH/TO/mypush.tar.gz<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 9) You should now be able to log into the admin console with the same<br>
&gt; &gt; &gt; password you previously set, see existing push applications, variants,<br>
&gt; &gt; &gt; send<br>
&gt; &gt; &gt; push notifications, etc.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; One disadvantage of this snapshot/restore approach is the extra work for<br>
&gt; &gt; &gt; the<br>
&gt; &gt; &gt; user. It would be nice to have a single command that can do the snapshot,<br>
&gt; &gt; &gt; delete, create, and restore all at once. She is going to start looking<br>
&gt; &gt; &gt; into<br>
&gt; &gt; &gt; this &quot;wrappering&quot; functionality.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Why am I writing about this?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I have made some test about the above steps. At a first glance, it seemed<br>
&gt; &gt; &gt; that something was broken between steps 6 and 7.<br>
&gt; &gt; &gt; Doing various tests, what I saw in the logs (server.log) were different<br>
&gt; &gt; &gt; errors:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 2014/01/26 10:19:18,061 ERROR [<a href="http://org.jboss.as" target="_blank">org.jboss.as</a>] (MSC service thread 1-3)<br>
&gt; &gt; &gt; JBAS015875: JBoss AS 7.1.1.Final &quot;Brontes&quot; started (with errors) in<br>
&gt; &gt; &gt; 296088ms<br>
&gt; &gt; &gt; - Started 349 of 524 services (52 services failed or missing<br>
&gt; &gt; &gt; dependencies,<br>
&gt; &gt; &gt; 119 services are passive or on-demand)<br>
&gt; &gt; &gt; 2014/01/26 10:19:18,344 INFO  [org.jboss.as.server]<br>
&gt; &gt; &gt; (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment<br>
&gt; &gt; &gt; &quot;ROOT.war&quot;<br>
&gt; &gt; &gt; was rolled back with failure message {&quot;JBAS014771: Services with<br>
&gt; &gt; &gt; missing/unavailable dependencies&quot; =&gt;<br>
&gt; &gt; &gt; [&quot;jboss.persistenceunit.\&quot;ROOT.war#unifiedpush-default\&quot;jboss.naming.context.java.jboss.datasources.PushEEDSMissing[jboss.persistenceunit.\&quot;ROOT.war#unifiedpush-default\&quot;jboss.naming.context.java.jboss.datasources.PushEEDS]&quot;,&quot;jboss.persistenceunit.\&quot;ROOT.war#picketlink-default\&quot;jboss.naming.context.java.jboss.datasources.PushEEDSMissing[jboss.persistenceunit.\&quot;ROOT.war#picketlink-default\&quot;jboss.naming.context.java.jboss.datasources.PushEEDS]&quot;]}<br>

&gt; &gt; &gt; 2014/01/26 10:19:19,390 INFO  [org.jboss.as.server.deployment] (MSC<br>
&gt; &gt; &gt; service<br>
&gt; &gt; &gt; thread 1-2) JBAS015877: Stopped deployment ROOT.war in 1125ms<br>
&gt; &gt; &gt; 2014/01/26 10:19:19,393 INFO  [org.jboss.as.controller]<br>
&gt; &gt; &gt; (DeploymentScanner-threads - 2) JBAS014774: Service status report<br>
&gt; &gt; &gt; JBAS014775:    New missing/unsatisfied dependencies:<br>
&gt; &gt; &gt;       service jboss.naming.context.java.jboss.datasources.PushEEDS<br>
&gt; &gt; &gt;       (missing)<br>
&gt; &gt; &gt;       dependents: [service<br>
&gt; &gt; &gt;       jboss.persistenceunit.&quot;ROOT.war#unifiedpush-default&quot;, service<br>
&gt; &gt; &gt;       jboss.persistenceunit.&quot;ROOT.war#picketlink-default&quot;]<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 2014/01/26 10:19:19,440 ERROR [org.jboss.as.server.deployment.scanner]<br>
&gt; &gt; &gt; (DeploymentScanner-threads - 1) {&quot;JBAS014653: Composite operation failed<br>
&gt; &gt; &gt; and<br>
&gt; &gt; &gt; was rolled back. Steps that failed:&quot; =&gt; {&quot;Operation step-2&quot; =&gt;<br>
&gt; &gt; &gt; {&quot;JBAS014771:<br>
&gt; &gt; &gt; Services with missing/unavailable dependencies&quot; =&gt;<br>
&gt; &gt; &gt; [&quot;jboss.persistenceunit.\&quot;ROOT.war#unifiedpush-default\&quot;jboss.naming.context.java.jboss.datasources.PushEEDSMissing[jboss.persistenceunit.\&quot;ROOT.war#unifiedpush-default\&quot;jboss.naming.context.java.jboss.datasources.PushEEDS]&quot;,&quot;jboss.persistenceunit.\&quot;ROOT.war#picketlink-default\&quot;jboss.naming.context.java.jboss.datasources.PushEEDSMissing[jboss.persistenceunit.\&quot;ROOT.war#picketlink-default\&quot;jboss.naming.context.java.jboss.datasources.PushEEDS]&quot;]}}}<br>

&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; It looks like the MySQL cartridge either wasn&#39;t added or wasn&#39;t able to<br>
&gt; &gt; start<br>
&gt; &gt; successfully. The following command can be used to check the status of the<br>
&gt; &gt; MySQL cartridge:<br>
&gt; &gt;<br>
&gt; &gt; rhc cartridge status -a APP -c mysql<br>
&gt; &gt;<br>
&gt; &gt;  <br>
&gt; &gt; &gt; OR<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 2014/01/26 05:41:46,522 INFO  [org.jboss.as.connector] (MSC service<br>
&gt; &gt; &gt; thread<br>
&gt; &gt; &gt; 1-1) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)<br>
&gt; &gt; &gt; 2014/01/26 05:41:46,922 ERROR<br>
&gt; &gt; &gt; [org.jboss.as.controller.management-operation]<br>
&gt; &gt; &gt; (ServerService Thread Pool -- 62) Operation (&quot;enable&quot;) failed - address:<br>
&gt; &gt; &gt; ([<br>
&gt; &gt; &gt;     (&quot;subsystem&quot; =&gt; &quot;datasources&quot;),<br>
&gt; &gt; &gt;     (&quot;data-source&quot; =&gt; &quot;PostgreSQLDS&quot;)<br>
&gt; &gt; &gt; ]) - failure description: &quot;JBAS014802: Cannot resolve expression<br>
&gt; &gt; &gt; &#39;expression<br>
&gt; &gt; &gt; \&quot;jdbcostgresql://${env.OPENSHIFT_POSTGRESQL_DB_HOST}:${env.OPENSHIFT_POSTGRESQL_DB_PORT}/mypush13\&quot;&#39;<br>
&gt; &gt; &gt; -- java.lang.IllegalStateException: Failed to resolve expression:<br>
&gt; &gt; &gt; ${env.OPENSHIFT_POSTGRESQL_DB_HOST}&quot;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; OR<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; no errors in the logs, but in the deployments directory I found<br>
&gt; &gt; &gt; &#39;ROOT.war.dodeploy&#39; and &#39;ROOT.war.isdeploying&#39; files, but no<br>
&gt; &gt; &gt; &#39;ROOT.war.deployed&#39; file.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Those error seemed to me as random and too strange (by the way, the<br>
&gt; &gt; &gt; creation<br>
&gt; &gt; &gt; of the cartridge is always correct, I never had problems if I created a<br>
&gt; &gt; &gt; new<br>
&gt; &gt; &gt; instance with a never used before name).<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; To investigate further, I then tried to do the same steps with a<br>
&gt; &gt; &gt; completely<br>
&gt; &gt; &gt; different application: &#39;Kitchensink on OpenShift&#39;, and I had the same<br>
&gt; &gt; &gt; error!<br>
&gt; &gt; &gt; After the deletion and the recreation of a cartridge with a same name, I<br>
&gt; &gt; &gt; encountered: &#39;The requested URL /app was not found on this server.&#39;<br>
&gt; &gt; &gt; The steps I have done are:<br>
&gt; &gt; &gt; 1) rhc app create -a kitchensink -t jbossas-7 --from-code<br>
&gt; &gt; &gt; git://<a href="http://github.com/openshift/kitchensink-example.git" target="_blank">github.com/openshift/kitchensink-example.git</a><br>
&gt; &gt; &gt; 2) rhc snapshot save kitchensink<br>
&gt; &gt; &gt; 3) rhc app delete kitchensink<br>
&gt; &gt; &gt; 4) rm -rf kitchensinkhtml5/<br>
&gt; &gt; &gt; 5) rhc app create -a kitchensink -t jbossas-7 --from-code<br>
&gt; &gt; &gt; git://<a href="http://github.com/openshift/kitchensink-example.git" target="_blank">github.com/openshift/kitchensink-example.git</a><br>
&gt; &gt; &gt; 6) Access to the application.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; So the good news is that the error I encountered is not related to this<br>
&gt; &gt; &gt; specific AeroGear cartridges, but the bad news is that is something more<br>
&gt; &gt; &gt; general about OpenShift.<br>
&gt; &gt; &gt; We need to investigate further and find out if there is a way to &quot;flush&quot;<br>
&gt; &gt; &gt; the<br>
&gt; &gt; &gt; deletion, it seems that there is something appended or cached that<br>
&gt; &gt; &gt; prevent<br>
&gt; &gt; &gt; the recreation of a cartridge with a same name.<br>
&gt; &gt;<br>
&gt; &gt; It&#39;s good that the issue you&#39;re running into isn&#39;t specific to the AeroGear<br>
&gt; &gt; cartridge. I&#39;ve tried quite a few times today but I&#39;m not able to reproduce<br>
&gt; &gt; the issue with the AeroGear cartridge or with the kitchensink application<br>
&gt; &gt; using the above steps. I suspect that there is indeed an OpenShift timing<br>
&gt; &gt; issue here. Let&#39;s check with the OpenShift team on this.<br>
&gt; &gt;<br>
&gt; &gt; Farah<br>
&gt; &gt;<br>
&gt; &gt; &gt; We are currently doing some more tests on these process.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; aerogear-dev mailing list<br>
&gt; &gt; &gt; <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
&gt; &gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; aerogear-dev mailing list<br>
&gt; &gt; <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
&gt; &gt;<br>
&gt;<br>
<br>
_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br>
<br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</div>