I am working through the example in the Liferay documentation; I have created and built the little greeting applet and gotten no errors at compile or build. I don't get any errors at deployment, either, but the application is showing up.
The deployment says it is copying my war file to portal-dir/deploy. I have determined that I can copy the war file there, though something (I guess in the server) removes it after a few seconds. But when I go to look at it in a browser off my local server, it is not there.
Does anyone know what I should look at to fix this?
No need to fix anything here -this is how autodeployment works. Web archives found in deploy directory are removed from there, extracted, processed by Liferay and in the end you should be able to find them in ${catalina.home}\webapps (assuming that you're using a Tomcat bundle).
Related
Using Kentico 9, while I was away it appeared that something changed! While our production site appears to be working fine our staging site is not. When I try to access the staging site it is unable to "find" any of the related CSS or JS files and therefore displays the site without any of those files. Another part of the problem is that the same thing is happening in the admin portal and since the admin portal relies on those CSS and JS files to work I can't troubleshoot there.
When I try to get to the resource directly in a browser: e.g. iddba-staging.azurewebsites.net/CMSPages/GetResource.ashx?stylesheetfile=/App_Themes/Default/bootstrap.css it fails.
When I try to access it directly at the prod site: www.iddba.org/CMSPages/GetResource.ashx?stylesheetfile=/App_Themes/Default/bootstrap.css as I would expect it provides me the opportunity to save the file.
Our site(s) are hosted in Azure.
Any idea of where to turn next? Thanks.
Also on a possibly unrelated note, I have also noticed an error in the logs on staging that is not on prod:
.NET Runtime version 4.0.30319.0 - Loading profiler failed. Failed trying to receive from out of process a request to attach a profiler.
Not sure if this might be related. Thanks.
Once I realized that getresource.aspx was a dynamic file and the css and js files were either already in the database or were in respective directories it looked at the dlls that power Kentico. In this case I decided to see if there were any differences in the bin directories of prod and staging. I don't know how they became out of sync but they had. Since the problems I had appeared to be serving up CSS files I noted that one file CMS.LessCss.dll was in prod and not in staging so I copied that file in. As soon as that file was copied Kentico threw an error with the word Jurassic in it (odd!). I found a file Jurassic.dll that was in Prod and not in Staging so I moved it.
Voila! The site was back, serving CSS and JS files on the front end and in administration. We are still clicking through all our pages to see if anything else is not working but for now we are good and if I have any further questions I will look in bin first since there are still files that live in prod that are not in staging and I don't want to re-populate unnecessary files. I am just not sure how the directories got out of sync in the first place... or at least no one here has admitted to having messed around! Yet.
Thanks for all your help.
I messed up. I needed to reset my computer and wipe it clean. In doing so, I mistakenly committed incorrect code (a lot of it) to source control. Now, going to retrieve it and discovering its the wrong stuff. I have the correct code published - Is it at all possible to get this code that's up in Azure?
You can download a copy of the deployed code via the KUDU interface. Please note that this is the deployed code, and it won't be the source if you are using a compiled language such as C#.
Please see this blog for details on how to access the KUDU interface. If you click on debug console and then powershell, you will see a file browser (picture shown at bottom of blog post). There is a download button for each folder. Simply navigate to where your files are stored and download.
Yup. Assuming you want the repo not the deployed (compiled) code- Go into Kudu/DebugConsole and grab the repository folder from /site/.
It has a clone of your local git repo in it.
I have a project Pyramid Application. I store it on git and pull the branch to the server when I need update. Until now I was working on Koding but lately decided to check out azure and it's developer's benefits.
After I've created ubuntu server virtual machine (which actually is what runs under Koding) I've downloaded my project using git pull, but forgot to change the branch to the one I'm working on atm. So I did, but server still shows me the old page (like I didn't checkout the other branch). So I checked sftp and files show me they have been updated.
Why am I still seeing the old page?
Now I know the reason why! (at least I think, but please. correct me if I'm wrong)
I noticed that there was .pyc file for every .py file, and those are "compiled" (bit of simplification?) python files as I understood it. And it seemed to me that they were not "compiled" on app launch. But they compiled with setup.py... edit dates suggest that.
So the reason why I didn't see the changes I did in code was that... http.server was using old "compiled" files instead of the source files! But is that normal/expected behaviour? Dunno. There are many other quetions now, but main question was answered so I mark this as answer until someone gives better answer.
A few months ago, I was making changes to this web application for a client. It's a JSP web application with tomcat as the web server. I've made the changes, tested it (of course), and left the application to the client's hands. They have come back to me and mentioned that a specific area of the website is not working. I go in and check the area, indeed it wasn't working but it was working a few months ago when I made the changes.
The issue encountering a very unusual. Every page in the directory in question (/tomcat/webapps/website/english/login) throws a java.lang.ClassNotFoundException.
To troubleshoot the issue, I've tried creating a blank JSP with "hello world" and no coding and still throws a java.lang.ClassNotFoundException. I create the same JSP page outside of this directory and it is fine
Steps taken to replicate this issue:
I enter into the directory in question (tomcat/webapps/website/english/login)
Create a JSP page called test.jsp that literally has "hello world" only (no coding)
On the browser, I navigate to test.jsp. It throws a java.lang.ClassNotFoundException
I enter into the directory one up from login (tomcat/webapps/website/english)
Create a JSP page called test2.jsp that literally has "hello world" only (no coding)
On the browser, I navigate to the test2.jsp page. It works
I've done other test but could not find the issue. See below for some methods performed
Moved the web application into a different directory (tomcat/webapps/website2). Everything, including the /english/login directory, works
Deleted the web application directory and recreated the directory path, still giving me the exception
Checked permissions. The directory in question has the same permissions as everything else in the web application (including the files)
With the results from the tests, I believe the issue is the directory itself (/tomcat/webapps/english/login). Everytime I move the directory, everything works.
Mind you that I was making changes to the web application using a text editor (notepad++) not on eclipse, building the application using TeamCity (which compiled fine), the server runs under linux and I have no access to the build script but I believe ANT is used as the builder
So my question is, what is causing this issue? To have all the files in a specific directory to look for a class?
Any clues/help is much appreciated. I've been working on this problem for a few days. It's mind boggling
Cheers!
I would check the class path being used with PS -ef and look for the process. The error logs should point to a specific class. Those two clues can help determine if is config or war issue.
A possibility that I have seen is that in a tomcat config file, the paths allowed are explicitly defined. Also, a config file could map a specific path to a java class.
Found the answer to my own problem. The issue originates in Tomcat. The web server converts the JSP file into a .java file then compiles it. For some odd reason, Tomcat was not doing this for all my files in a specific folder.
Solution is to go into Tomcat's work folder, drill down until you see your webapp's name and delete the folder. This will force Tomcat to rebuild all the visited pages.
A safer way (which didn't work for me. Did not delete the webapp in the work folder) is to log into Tomcat and undeploy the webapp all together. This should delete the webapp folder in the work folder of tomcat.
Hope this helps for those experiencing similar issues
I am doing my first deployment on AWS (using Elastic Beanstalk), and I am completely new to this.
I built a personal website using NodeJS / Express, and on my local machine it loads just fine. Once I was ready to deploy a v1, I created an AWS account and set up a new EBS application environment for Node. I set up the static files to load from /public, set my node version, and set the launch command as node app.js, but those were the only options I changed.
I zipped up my site (using CNTL + Click -> Compress on a selection of all site files) and uploaded that zip, and after some time, it came up all green. Clicking the link to load my site though, I get a half finished version. Looking at my console, I see that I am getting 4 files as 404, and because of that, 4 failures from RequireJS.
These 4 files are backbone views, and are contained in a folder with 4 other JS files that are all loading just fine (I can open them in the chrome dev tools source tab from the deployed version). I am confused how just these 4 files would go missing.
Is there some way to FTP into where ever my files are contained, to confirm the files are in fact not present? And barring that, what steps are available to figure out what is occurring here? Like I said, it looks and loads just fine locally, and I am at a loss as to where to even start debugging something like this. The AWS docs I have read so far only tell me to do exactly what I have been doing.
Repo for the project is here: https://github.com/RyanMG/trustycode
And the deployment is here: http://trustycode.elasticbeanstalk.com/
The files it is having trouble with are under public/javascript/views/ (CodeView, AboutView, PhotoView, DesignView)
Any ideas / advice?
Is there some way to FTP into where ever my files are contained, to confirm the files are in fact not present?
You can ssh into the EC2 instance of the Elastic Beanstalk app using your pem file.
Check files in /var/app/current
I don't have the reputation to comment, but that is one of those common gotchas I found myself switching to OSX from GNU/LINUX at work. OSX is case insensitive; linux world is case sensitive.