Git push does not reflect changes

The OpenShift forums have been retired.
You can still read and search them, but for help, please post a question on Stack Overflow.

Dear Community,

I have setup my own project with openshift and my url is at https://click4acause-rv1.rhcloud.com/

Yesterday I keep pushing some of my changes for 8 hours or so and everything works out fine, however I decided to try jerkins build and somehow when jerkins is open I could not commit to the git repository of my application.

So I scrap out jerkins and remove it from my application cartridges after which I was able to successfully commit but there is one problem though my changes would not reflect already after I push. I keep pushing the changes for my Constant.java file but the changes does not work:

AppName\src\main\java\com\hashtag\util\Constant.java

I even commit the util folder w/o the file so that it will have a fresh copy and then I added back and commit again but somehow the changes does not reflect. How do I know it does not work? well I have an email mechanism to send an email after the registration and the email contents does not reflect the changes. Plus after you register on my application the URL redirects to wrong path:

https://click4acause-rv1.rhcloud.com/faces/faces/activate.xhtml

If the changes are reflected then the URL should redirect to this one instead:

https://click4acause-rv1.rhcloud.com/faces/activate.xhtml

Another thing I tried is to tail the log and it confirms that my changes does not really reflect because I could not find my system.out, Is there a cache in openshift jboss 7 server that I have to delete? I have tried to restart my application several times and still changes does not reflect:

rhc app restart -a click4acause

Please help, this issue is driving me crazy for a day now.

Thank you.

Cordially,

Jan Michael

Hi Jan;

Can you ssh onto the app and check ~/click4acause/repo/src/... to see if your changes were actually pushed? That will determine whether the problem is actually a cache on JBoss or something in git. To access your gear, use this:
https://www.openshift.com/faq/can-i-access-my-applications-gear

If your remote repo files hasn't been updated, please send the output to your git status/commit/push (that output should be output to console) to see if there's an error.

HTHs;
~Nam

Hi Nam,

Thanks for your reply I appreciate it. Well I just did what you suggested and indeed my files are there and all are updated please see the logs below:

// Java Source

[click4acause-rv1.rhcloud.com util]\> ls -al 
total 20
-rw-r--r--. 1 2299 Aug 25 14:26 Constant.java
-rw-r--r--. 1 3676 Aug 25 14:26 EmailUtil.java
-rw-r--r--. 1 1473 Aug 25 14:26 RandomGenUtil.java
[click4acause-rv1.rhcloud.com util]\>

// WEB-INF/classes

[click4acause-rv1.rhcloud.com util]\> ls -al
total 24
-rw-r--r--. 1 1992 Aug 25 14:26 Constant.class
-rw-r--r--. 1 4629 Aug 25 14:26 EmailUtil.class
-rw-r--r--. 1 2164 Aug 25 14:26 RandomGenUtil.class
[click4acause-rv1.rhcloud.com util]\>

I even did a VI on Constant.java and it's really updated. However how come it's not reflected when running the application? can you help me to clear the cache in jboss 7 openshift? is there a guide in doing this?

Thank you.

Cordially,

Jan Michael

Hi Jan;

Here are some things I can think of after fiddling with https://github.com/openshift/kitchensink-example:
1) On your most recent git push, did you see the output of a long build process?
2) Did it result in a new ~/app-root/runtime/repo/deployments/ROOT.war?
3) After ssh'ed onto the server, did you try removing ROOT.war.deployed and restart JBoss?
4) Review jboss logs for any startup issues in ~/click4acause/logs/.

Please let us know if you ran into anything unusual.

Thanks;  
~Nam
 

Hi Nam,

For some weird reason a made a major commit on my codes and it seemed to work. I have deleted the existing war file, stop the server then restart the server and then push the codes which basically deployed the application. I saw the following being deleted:

remote: Emptying tmp dir: /var/lib/stickshift/f51771ca50874395be9ca1e7307c8c16/click4acause/jbossas-7/standalone/tmp/auth
remote: Emptying tmp dir: /var/lib/stickshift/f51771ca50874395be9ca1e7307c8c16/click4acause/jbossas-7/standalone/tmp/vfs
remote: Emptying tmp dir: /var/lib/stickshift/f51771ca50874395be9ca1e7307c8c16/click4acause/jbossas-7/standalone/tmp/work

Looks like these are the temp folders being used by jboss. Good to take note of this in the future which may require to be deleted if such things happens again. Good thing my application is working now, thanks for your help.

Cordially,

Jan Michael

Hello,

I have an application with JbossAS7. I tried exactly what you said (starting with deleting the war file). I also tried deleting manually the tmp files and folders. Nothing seems to work.

When I restart the application the server restarts but no deployment is made, there is no war file (sinceI deleted it).

When I do a new git push Jboss seems to stop but does not even restart. So I see no build process.

This happened today after I had for many hours issues with my application not working (probably due to the maintenance issue of openshift?).

This has happened before and the only solution I found was to delete completely the applciation and create a new one.

This is very frustrating. Someone please help.

Thank you,

Alex

Are you seeing any errors in your application logs when you do the git push?

Hello,

I m afraid I don't. The only thing I see is in boot.log is:

INFO [org.jboss.as] JBAS015950: JBoss AS 7.1.1.Final "Brontes" stopped in 1218ms

and then nothing happens.

Also on the openshift web site if I click on my application I see status for Jboss: BUILDING and it's stuck there.

Where can I get some help? Should I create a new thread?

Thank you.

FYI.

Problem solved.

I had one Java class that was not pushed to the git repo.

So now I wonder why I did not see any build errors in my logs.

The way I managed to solve this was to ssh in my app and do a manual maven build which ended with errors.

That is strange that you didn't see an error. Sometimes they fly by so fast it's hard to catch them. I've missed them before.

I have created a new app and done my first commit. However, these changes are not reflected when I refresh my apps webpage. All I get is the Welcome to Openshift and an explanation of how to make my first commit.

When I ssh into my app the repo is up to date. I have attempted to restart the entire service "ctl_app restart" but I can't get the changes to reflect my commit.

What can I do to rectify this?

Nevermind - looks like I copied the index page over my own index page by accident. Typical.

Thanks for figuring it out :)