<div dir="ltr">Farah/Andrea,<div><br></div><div>is that on _creation_ or,also w/ any redirect from http -> 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"><<a href="mailto:avibelli@redhat.com" target="_blank">avibelli@redhat.com</a>></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>
> Da: "Farah Juma" <<a href="mailto:fjuma@redhat.com">fjuma@redhat.com</a>><br>
> A: "Andrea Vibelli" <<a href="mailto:avibelli@redhat.com">avibelli@redhat.com</a>>, <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
> Inviato: Lunedì, 27 gennaio 2014 22:28:07<br>
> Oggetto: Re: [aerogear-dev] Upgrading process for the OpenShift AeroGear UPS cartridge<br>
<div class="HOEnZb"><div class="h5">><br>
> After some more digging, I think I might know what's going on here. Andrea,<br>
> are you using Firefox? I wasn't able to reproduce the issue with Chrome but<br>
> was able to reproduce it just now with Firefox. The underlying issue seems<br>
> to be that Firefox tends to save 301 redirects until you close it and<br>
> re-open it. Note that when you delete an OpenShift instance and re-create<br>
> it, its IP address changes. When accessing <a href="http://app-namespace.rhcloud" target="_blank">http://app-namespace.rhcloud</a><br>
> after re-creating the instance, you'll actually be redirected to<br>
> <a href="https://app-namespace.rhcloud/app" target="_blank">https://app-namespace.rhcloud/app</a>. However, when using Firefox, this URL<br>
> seems to get mapped to the old IP address resulting in this error: 'The<br>
> requested URL /app was not found on this server.' After deleting and<br>
> re-creating an OpenShift instance with the same name, if you restart<br>
> Firefox, you should once again be able to access the application. I've<br>
> verified that this does work.<br>
><br>
> Similar issues with Firefox were actually mentioned in some OpenShift forum<br>
> posts as well:<br>
><br>
> <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>
> <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>
><br>
><br>
> Farah<br>
><br>
> ----- Original Message -----<br>
> > From: "Farah Juma" <<a href="mailto:fjuma@redhat.com">fjuma@redhat.com</a>><br>
> > To: <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
> > Sent: Monday, January 27, 2014 1:07:31 PM<br>
> > Subject: Re: [aerogear-dev] Upgrading process for the OpenShift AeroGear<br>
> > UPS cartridge<br>
> ><br>
> ><br>
> > > From: "Andrea Vibelli" <<a href="mailto:avibelli@redhat.com">avibelli@redhat.com</a>><br>
> > > To: <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
> > > Sent: Monday, January 27, 2014 12:27:04 PM<br>
> > > Subject: [aerogear-dev] Upgrading process for the OpenShift AeroGear UPS<br>
> > > cartridge<br>
> > ><br>
> > > Hello all,<br>
> > ><br>
> > > I just wanted to let you know that Farah is working on AGPUSH-504, a<br>
> > > snapshot/restore approach for upgrading the downloadable cartridge.<br>
> > > The overall idea is to take a snapshot of the database (and other<br>
> > > configuration) for an older existing cartridge instance, delete this old<br>
> > > instance, and then create a new instance based on the latest cartridge<br>
> > > version and restore the new instance's database (and other configuration)<br>
> > > to<br>
> > > the state in the snapshot. The new instance must have the same name as<br>
> > > the<br>
> > > old instance. The main thing that she needed to determine was what needed<br>
> > > to<br>
> > > be included in the snapshot that's not already part of the MySQL<br>
> > > database.<br>
> > > The SimplePush token key was one of these things (we generate this value<br>
> > > when a cartridge instance is created and it is used by the server for<br>
> > > encryption and decryption of endpoint URLs). The standalone.xml file also<br>
> > > needed to be backed up just in case the user made any changes to it.<br>
> > > (Creating a backup of this file allows users to manually merge back any<br>
> > > changes they may have made.)<br>
> > ><br>
> > > The snapshot/restore action hooks she has created can be found in [1].<br>
> > ><br>
> > > The steps she has been using to try upgrading from an 0.8.1 instance are<br>
> > > listed below. It would be great if you could try out these steps as well.<br>
> > > There's one important caveat though: because an 0.8.1 instance won't have<br>
> > > the necessary snapshot hook, you'll need to manually perform some<br>
> > > commands<br>
> > > to save the necessary data (step 3 below). If we include these<br>
> > > snapshot/restore action hooks in the 0.10.0 cartridge release, users will<br>
> > > be<br>
> > > able to make use of these hooks for future upgrades, e.g., for upgrading<br>
> > > from 0.10.0 to 0.11.0.<br>
> > > <br>
> > > 1) Create an 0.8.1 cartridge instance<br>
> > > rhc create-app mypush<br>
> > > "<a href="https://cartreflect-claytondev.rhcloud.com/reflect?github=aerogear/openshift-origin-cartridge-aerogear-push&commit=8aada257de52157a837db23a9f7b1a8574fdffab" target="_blank">https://cartreflect-claytondev.rhcloud.com/reflect?github=aerogear/openshift-origin-cartridge-aerogear-push&commit=8aada257de52157a837db23a9f7b1a8574fdffab</a>"<br>
> > > mysql-5.1<br>
> > ><br>
> > > 2) Log into the admin console, change password, create push applications,<br>
> > > create variants, send push notifications, etc.<br>
> > ><br>
> > > 3) ssh into your instance and perform these commands (this step manually<br>
> > > captures needed data)<br>
> > > echo "$OPENSHIFT_AEROGEAR_PUSH_TOKEN_KEY" ><br>
> > > $OPENSHIFT_DATA_DIR/aerogear_push_token_key<br>
> > > cp $OPENSHIFT_AEROGEAR_PUSH_DIR/standalone/configuration/standalone.xml<br>
> > > $OPENSHIFT_DATA_DIR/standalone.snapshot.xml<br>
> > ><br>
> > > 4) Create a snapshot of the 0.8.1 instance: rhc snapshot save mypush<br>
> > ><br>
> > > 5) Delete the 0.8.1 instance: rhc app delete mypush<br>
> > ><br>
> > > 6) Delete the local directory on the local machine (from step 1, you<br>
> > > should<br>
> > > have a directory named 'mypush')<br>
> > ><br>
> > > 7) Create a new cartridge instance (this uses her fork of the 0.9.0<br>
> > > cartridge<br>
> > > repository that contains the snapshot/restore action hooks)<br>
> > > rhc create-app mypush<br>
> > > "<a href="https://cartreflect-claytondev.rhcloud.com/reflect?github=fjuma/openshift-origin-cartridge-aerogear-push&commit=956a4fc09edc93fe76394b86b265ceb1d238ccaf" target="_blank">https://cartreflect-claytondev.rhcloud.com/reflect?github=fjuma/openshift-origin-cartridge-aerogear-push&commit=956a4fc09edc93fe76394b86b265ceb1d238ccaf</a>"<br>
> > > mysql-5.1<br>
> > ><br>
> > > 8) Restore the instance: rhc snapshot restore mypush -f<br>
> > > /PATH/TO/mypush.tar.gz<br>
> > ><br>
> > > 9) You should now be able to log into the admin console with the same<br>
> > > password you previously set, see existing push applications, variants,<br>
> > > send<br>
> > > push notifications, etc.<br>
> > ><br>
> > > One disadvantage of this snapshot/restore approach is the extra work for<br>
> > > the<br>
> > > user. It would be nice to have a single command that can do the snapshot,<br>
> > > delete, create, and restore all at once. She is going to start looking<br>
> > > into<br>
> > > this "wrappering" functionality.<br>
> > ><br>
> > ><br>
> > > Why am I writing about this?<br>
> > ><br>
> > > I have made some test about the above steps. At a first glance, it seemed<br>
> > > that something was broken between steps 6 and 7.<br>
> > > Doing various tests, what I saw in the logs (server.log) were different<br>
> > > errors:<br>
> > ><br>
> > > 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>
> > > JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in<br>
> > > 296088ms<br>
> > > - Started 349 of 524 services (52 services failed or missing<br>
> > > dependencies,<br>
> > > 119 services are passive or on-demand)<br>
> > > 2014/01/26 10:19:18,344 INFO [org.jboss.as.server]<br>
> > > (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment<br>
> > > "ROOT.war"<br>
> > > was rolled back with failure message {"JBAS014771: Services with<br>
> > > missing/unavailable dependencies" =><br>
> > > ["jboss.persistenceunit.\"ROOT.war#unifiedpush-default\"jboss.naming.context.java.jboss.datasources.PushEEDSMissing[jboss.persistenceunit.\"ROOT.war#unifiedpush-default\"jboss.naming.context.java.jboss.datasources.PushEEDS]","jboss.persistenceunit.\"ROOT.war#picketlink-default\"jboss.naming.context.java.jboss.datasources.PushEEDSMissing[jboss.persistenceunit.\"ROOT.war#picketlink-default\"jboss.naming.context.java.jboss.datasources.PushEEDS]"]}<br>
> > > 2014/01/26 10:19:19,390 INFO [org.jboss.as.server.deployment] (MSC<br>
> > > service<br>
> > > thread 1-2) JBAS015877: Stopped deployment ROOT.war in 1125ms<br>
> > > 2014/01/26 10:19:19,393 INFO [org.jboss.as.controller]<br>
> > > (DeploymentScanner-threads - 2) JBAS014774: Service status report<br>
> > > JBAS014775: New missing/unsatisfied dependencies:<br>
> > > service jboss.naming.context.java.jboss.datasources.PushEEDS<br>
> > > (missing)<br>
> > > dependents: [service<br>
> > > jboss.persistenceunit."ROOT.war#unifiedpush-default", service<br>
> > > jboss.persistenceunit."ROOT.war#picketlink-default"]<br>
> > ><br>
> > ><br>
> > > 2014/01/26 10:19:19,440 ERROR [org.jboss.as.server.deployment.scanner]<br>
> > > (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed<br>
> > > and<br>
> > > was rolled back. Steps that failed:" => {"Operation step-2" =><br>
> > > {"JBAS014771:<br>
> > > Services with missing/unavailable dependencies" =><br>
> > > ["jboss.persistenceunit.\"ROOT.war#unifiedpush-default\"jboss.naming.context.java.jboss.datasources.PushEEDSMissing[jboss.persistenceunit.\"ROOT.war#unifiedpush-default\"jboss.naming.context.java.jboss.datasources.PushEEDS]","jboss.persistenceunit.\"ROOT.war#picketlink-default\"jboss.naming.context.java.jboss.datasources.PushEEDSMissing[jboss.persistenceunit.\"ROOT.war#picketlink-default\"jboss.naming.context.java.jboss.datasources.PushEEDS]"]}}}<br>
> ><br>
> ><br>
> > It looks like the MySQL cartridge either wasn't added or wasn't able to<br>
> > start<br>
> > successfully. The following command can be used to check the status of the<br>
> > MySQL cartridge:<br>
> ><br>
> > rhc cartridge status -a APP -c mysql<br>
> ><br>
> > <br>
> > > OR<br>
> > ><br>
> > ><br>
> > > 2014/01/26 05:41:46,522 INFO [org.jboss.as.connector] (MSC service<br>
> > > thread<br>
> > > 1-1) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)<br>
> > > 2014/01/26 05:41:46,922 ERROR<br>
> > > [org.jboss.as.controller.management-operation]<br>
> > > (ServerService Thread Pool -- 62) Operation ("enable") failed - address:<br>
> > > ([<br>
> > > ("subsystem" => "datasources"),<br>
> > > ("data-source" => "PostgreSQLDS")<br>
> > > ]) - failure description: "JBAS014802: Cannot resolve expression<br>
> > > 'expression<br>
> > > \"jdbcostgresql://${env.OPENSHIFT_POSTGRESQL_DB_HOST}:${env.OPENSHIFT_POSTGRESQL_DB_PORT}/mypush13\"'<br>
> > > -- java.lang.IllegalStateException: Failed to resolve expression:<br>
> > > ${env.OPENSHIFT_POSTGRESQL_DB_HOST}"<br>
> > ><br>
> > ><br>
> > > OR<br>
> > ><br>
> > ><br>
> > > no errors in the logs, but in the deployments directory I found<br>
> > > 'ROOT.war.dodeploy' and 'ROOT.war.isdeploying' files, but no<br>
> > > 'ROOT.war.deployed' file.<br>
> > ><br>
> > ><br>
> > > Those error seemed to me as random and too strange (by the way, the<br>
> > > creation<br>
> > > of the cartridge is always correct, I never had problems if I created a<br>
> > > new<br>
> > > instance with a never used before name).<br>
> > ><br>
> > > To investigate further, I then tried to do the same steps with a<br>
> > > completely<br>
> > > different application: 'Kitchensink on OpenShift', and I had the same<br>
> > > error!<br>
> > > After the deletion and the recreation of a cartridge with a same name, I<br>
> > > encountered: 'The requested URL /app was not found on this server.'<br>
> > > The steps I have done are:<br>
> > > 1) rhc app create -a kitchensink -t jbossas-7 --from-code<br>
> > > git://<a href="http://github.com/openshift/kitchensink-example.git" target="_blank">github.com/openshift/kitchensink-example.git</a><br>
> > > 2) rhc snapshot save kitchensink<br>
> > > 3) rhc app delete kitchensink<br>
> > > 4) rm -rf kitchensinkhtml5/<br>
> > > 5) rhc app create -a kitchensink -t jbossas-7 --from-code<br>
> > > git://<a href="http://github.com/openshift/kitchensink-example.git" target="_blank">github.com/openshift/kitchensink-example.git</a><br>
> > > 6) Access to the application.<br>
> > ><br>
> > > So the good news is that the error I encountered is not related to this<br>
> > > specific AeroGear cartridges, but the bad news is that is something more<br>
> > > general about OpenShift.<br>
> > > We need to investigate further and find out if there is a way to "flush"<br>
> > > the<br>
> > > deletion, it seems that there is something appended or cached that<br>
> > > prevent<br>
> > > the recreation of a cartridge with a same name.<br>
> ><br>
> > It's good that the issue you're running into isn't specific to the AeroGear<br>
> > cartridge. I've tried quite a few times today but I'm not able to reproduce<br>
> > the issue with the AeroGear cartridge or with the kitchensink application<br>
> > using the above steps. I suspect that there is indeed an OpenShift timing<br>
> > issue here. Let's check with the OpenShift team on this.<br>
> ><br>
> > Farah<br>
> ><br>
> > > We are currently doing some more tests on these process.<br>
> > ><br>
> > ><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><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><br>
> ><br>
><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>