The Grails system with which we've been working fine for several months now has a problem whereby the /login/auth page appears blank.
The problem with the build only occurs on a deployed Tomcat or standalone system and not on local development machines where it works fine. There is no error appearing on the console at all.
The Network tab in Chrome shows a 404 error. We've put console debug messages in the auth() method within LoginController and these are not showing up.
In intellij Idea works fine, after generate the .war file (./gradlew assemble) the system not work.
If you get an 404 error, you should check all of the config files e.g. database settings. Somewhere must be a difference in those settings. Usually it is database connection which causes such kind of errors.
You can also check Catalina.log in the Tomcat server directory to find errors.
Related
I have run into a very serious problem where I can longer deploy a war of a Grails 2.2.5 web application on Tomcat. The build (with 'grails war') proceeds without a problem, and I deploy it to Tomcat. I retsart Tomcat, and the web application simply does not run. It comes up with the deploying message, but clearly doesn't get as far as running Bootstrap.groovy, because logging from there doesn't show up in the log. No error messages are given, but the web app is simply not running.
I ran into a similar problem a few days ago on a different server which I solved by upgrading to Tomcat 7, but this one is already running Tomcat 7. I have no idea why this has started happening, unless it is something obscure to do with the recent change in Maven where only TLS 1.2 connections are allowed (a change which occurred a week or so ago).
So what could be happening? Is there some way I can log what is happening as the web app starts up, such that I might be able to see where the problem is occurring?
If it is of any relevance, it works OK when I do 'grails run-war' on my development machine.
I've been making some changes to my MVC project which earlier today was running fine. However, I installed some new software including PostGreSql and npgsql for Visual Studio and now when I run my project it seems IIS can no longer find localhost. The actual message is 'Cannot reach this page. Make sure the web address http://localhost:4068 is correct'.
I've checked that my IIS is running and I've tried deleting my IISExpress folder, deleting the config file in .vs/config but so far nothing seems to work and I don't even know what it was that caused it. If anyone has had this issue, please let me know how you resolved it.
The most likely scenario is that your project's properties have changed.
Have you checked the web settings? (right click on project -> properties)
You need to put an entry in your c:\Windows\System32\Drivers\etc\hosts File like
127.0.0.1 localhost
Or simply try http://127.0.0.1:4068 as url
Editing the file needs administrative rights so you might run your editor as administrator.
I created an ASP.Net project (.net 4.7.1), it's basically the default temple project without any change at all!
I created a build to publish it to an Azure WebApp- result : works just fine.
then I cloned the build and this time I target a virtual directory (I built the virtual directory from the portal and ticked it as an application)
surprisingly, although it has published successfully ( I doubled check from console), but when I browse it , it doesn't work and I get te below error:
HTTP Error 502.5 - Process Failure Common causes of this issue: The
application process failed to start The application process started
but then stopped The application process started but failed to listen
on the configured port Troubleshooting steps: Check the system event
log for error messages Enable logging the application process' stdout
messages Attach a debugger to the application process and inspect
it doesn't make sense to me, so I tried with different project type and .net version but the result is the same!
I found a workaround if I deploy pure HTML file (without asp.net) in the root, then the virtual directories will start working.
it looks like it's related to the fact that web.config of the virtual directory inserts something from the config of the root.
My problem is similar to AWS: None of the Instances are sending data but has a slightly different error message.
I have a Rails application running on ElasticBeanstalk, and it appears to be running correctly. Periodically, Enhanced Health Monitoring sends me error messages such as:
Environment health has transitioned from Ok to Degraded. 20.0 % of the
requests are failing with HTTP 5xx.
where the percentage varies up to 100%. Even though I've made no changes, a minute later I get a followup message telling me that everything is back to normal:
Environment health has transitioned from Degraded to Ok.
I've downloaded the full logs from ElasticBeanstalk but I don't know exactly where to look (there are around 20 different log files in various directories).
I'm currently using the free AWS tier with the smallest instances of database, server, etc. Could this be the cause? Which of the log files should I be looking in, and what should I be looking for?
I run rails apps on Elastic Beanstalk and have found it helpful to think about Beanstalk as a computer (in this case an Amazon EC2 instance) running your rails app and a web server (either Passenger or Puma). When you get a 500 error, it could be because your rails app didn't properly deploy–in which case Passenger or Puma will return an error—or your app is deployed properly but encountered an error just like it might on your local machine.
In either case, to diagnose an error, download the full logs from your AWS console (open the correct app environment and then choose Logs > Request Logs > Full logs > Download). Deployment errors are harder to diagnose, but I recommend starting by looking in var-XX/logs/log/eb-activity.log. I suspect your error is coming from your rails app itself, in which case I recommend looking in var-XX/app/support/logs/passenger.log and production.log. To find a 500 error, search for "500 Internal" and then treat the error like you would any other rails error.
You can go to the EC2 instance and run the application just like you would run on your local machine and see the logs.
You can ssh into your EC2 instance using the command eb ssh and go to /opt/python/ directory (It will be different for Ruby or other programming languages).
/opt/python/run is the directory where you will find the version of your application which is run from the EC2 instance. Look for the directory venv and app inside run directory.
Note: The above folder structure is for Python but a similar folder structure post deployment can be found for any other programming language. Just look for the standard directory structure for the deployment environment for your programming language.
For Python:
/opt/python: Root of where you application will end up.
/opt/python/current/app: The current application that is hosted in the environment.
/opt/python/on-deck/app: The app is initially put in on-deck and then, after all the deployment is complete, it will be moved to current. If you are getting failures in your container_commands, check out out the on-deck folder and not the current folder.
/opt/python/current/env: All the env variables that eb will set up for you. If you are trying to reproduce an error, you may first need to source /opt/python/current/env to get things set up as they would be when eb deploy is running.
/opt/python/run/venv: The virtual env used by your application; you will also need to run source /opt/python/run/venv/bin/activate if you are trying to reproduce an error.
I know it is a little late but I wanted to comment the trick I use to find the error, I use to connect via ssh and then, once in the app I try to enter "rails console" It uses to fail, but it shows normally the error you´re making. This little trick saved my life several times. Hope it helps!
I have a rails app running in 2 different locations. The first is a developer VM. When I run the app on a thin server there, I can visit it from my desktop PC. I also have the app running with (as far as I can tell) an identical configuration on another VM. I am unable to view the site from my desktop when I try to connect there. Can anybody think of a reason? I do have an Apache server running on the 2nd VM, is that an issue?
The exact nature of the failure is that when trying to connect from another location, the browser just never responds. It doesn't display an error message or give a 404. The loading graphic on the tab just continues to spin.
Thanks.