Grails Helloworld tutorial app not working - grails

I feel guilty coming to Stack Exchange with such a trivial issue, but I've been banging my head against it all morning and can't seem to get anywhere. I am trying to run the simple HelloWorld app in the Grails tutorial: http://grails.org/doc/latest/guide/gettingStarted.html#creatingAnApplication
I have Grails installed, I can run it, create the controller and everything, but no matter what page I hit, I get nothing but a blank. Even pages that don't exist, return a blank page and not an error.
For example, I tried http: //localhost:8080/helloworld, obviously, and get nothing but a blank page back. The same thing happens for http: //localhost:8080/hellowrld, http: //localhost:8080/helphelphelp and http: //localhost:8080/pleasefortheloveofpeteworkalready. Always the empty response.
When I try a different port, I get an error. When I stop-app and try, I get an error. When I run grails run-app with port 9090 and try port 8080, I get an error, but on 9090, I get the blank page. So, I assume the server is fielding the requests, but just isn't responding for some reason.
I'm probably missing something super simple, something dumb, but I can't figure out what it is, and the complete lack of feedback is killing me.
Are there logs anywhere I can check? And, is there something obvious I'm missing?
(PS: I assume the environment vars are correct, because I can run Grails no problem. Also, I installed, but never ran, the GGST IDE thing. I rebooted since then, but could that have installed some service that's taking over?)
Thanks,
Peter

The application name is the default "context", so if you create an application called foo (grails create-app foo) it will be available at http://localhost:8080/foo if you run grails run-app. You can use a different port, for example 9090, by running grails -Dserver.port=9090 run-app and you can also use a different context (or none at all).
The run-app script displays the full URL of the application in the output window - you should see something like:
Server running. Browse to http://localhost:8080/helloworld

Related

Grails - Won't open localhost when adding data to bootstrap.groovy

I am trying to learn Grails and following along the guide on grails.org http://guides.grails.org/creating-your-first-grails-app/guide/index.html which to some extend works fine. My issue is, that I follow the guide to the dot, and when I come to part 4.4 about bootstrapping data. I fill in the code in the BootStrap.groovy file in the init folder.
When I then proceed to run my app and try to connec to the url localhost:8080 the site simply will not load. I can acces the dbconsole and see that the data is bootstrapped, so I guess the app is working to some extend. But the site wont load.
When I remove 2 of the Vehicles, the site loads fine. I have tried using grails-clean, and kill all processes on the port 8080, stille nothing helps.
Please help me with this, as I am stuck!
In your save method call, add failOnError: true. It's likely that something is failing when you try to save it. Also keep an eye on your console for error messages.
If that doesn't help, post some exact code.

SonarQube Service Starts, Runs and then Stops?

I have a Windows 2012 R2 server and I managed to install the SonarQube 5.4 server as a Windows Service. I also set up a user so the service can actually start without the infamous "It started then stopped" error a lot of people seem to get. Before installing the server as a windows service, I checked that it worked using StartSonar.bat and it did work just fine, so I was confident when I made it into a service.
But when I try to access http://localhost:9000 there is nothing there, and it appears that shortly after starting the service it stops without any message at all. I can't tell if this is because I try to access the site (which gives me ERR_EMPTY_RESPONSEin Google Chrome) or if it just closes down after a short while.
Anyone got any insight?
I'm a beginner. I came across the same issue and fixed it.
Ensure that the database is running.
My log file (located at sonarqube_home_dir/logs/sonar.log) included the following statement.
Caused by: org.h2.jdbc.JdbcSQLException: Wrong user name or password [28000-176]
Since I'm using the default database, I commented below lines
#sonar.jdbc.username=***
#sonar.jdbc.password=***
at sonarqube_home_dir/conf/sonar.properties.
This must happen due to many reasons like connection problems, permission problems so First, you have to see the logs. /sonarqube-7.6/logs$ tailf sonar.log. then you can find the reason. Once I had the same problem so I did like that. my error is something Directory does not exist: lib/jdbc/mysql
org.sonar.process.MessageException: Directory does not exist: lib/jdbc/mysql reason is I uninstall MySQL and remove all folders name contains "MySQL".
just check whether port 9001 already in used, stop it if already in used.

When I turn on "hhvm" on Homestead, I don't get any syntax error or missing class error, just blank page

I am using homestead as my development environment, I turned on the hhvm option for the site
sites:
- map: homestead.app
to: /home/vagrant/Code/wheremyprojectis
hhvm: true
I found that when there is an exception, everything is fine, but If I forgot to use namespace, got syntax error in the blade templates, I got nothing, blank page. I go check the logs and still nothing, the debug option is true. It's quite frustrating until I turned off the hhvm option.
I know it is not a big deal, but I still want to know is there any way to fix this?
I experienced the same problem. I searched around and found that it seems to be intentional:
https://github.com/facebook/hhvm/issues/4818
https://github.com/facebook/hhvm/issues/2571
Now you can poke through the github issues mentioned above, as well as these stackoverflow questions:
Display fatal/notice errors in browser
hhvm-fastcgi + nginx how to make it display fatal errors in the browser
laravel 5 show blank page on server error (and no laravel log), running with hhvm and nginx
For the time being, it ultimately boils down to writing your own handler, which isn't too bad. You can also tail the errors at /var/log/hhvm/error.log. Any errors that you intentionally want going to the browser you could of course handle using Laravel's error handling and logging.
UPDATE:
I reported this issue(and a fix) to the Laravel github here:
https://github.com/laravel/framework/issues/8744

Django+uwsgi: uwsgi_response_write_body_do(): Broken pipe [core/writer.c line 248]

I have this weird issue in my django application. I am using the admin interface. When I try to load the change page it doesn't render completely and when i see in logs it says:
**uwsgi_response_write_body_do(): Broken pipe [core/writer.c line 248]
IOError: write error**
The page has been working fine before and suddenly this started happening. And also the behavior is inconsistent. If I reload the page multiple times, few times it renders correctly. This issue is happening in production environment and I am not able to replicate it on my local. The production server is using uwsgi 1.9.10 with nginx and django 1.5. Also I am writing custom HTML on page and there is an inline table also on the same page.
Please let me know if anyone knows why it is happening...
that error means the client (browser) disconnected before getting the full response. Check your webserver logs, maybe you hit a timeout

JBoss not responding to valid URLs

I encountered strange behavior of an JBoss AS 7 on linux server. When I deploy war with my application, the server doesn't respond for valid HTTP requests for this app. When I try to GET a valid URL, I can see in logs, that backend functions (e.g. DAO methods) are called, debug logs shows that subsequent tags in my JSF are rendered, I even can see a message Rendering View index.xml, but the response never reaches the client.
When I use a non-existent URL (e.g. index.asd) response is 404 and when I use a wrong page name (e.g. inswxasd.xhtml) the response is 500. Thus it fails only with valid requests.
I tried to connect both remotely (using firefox) and locally (with wget) and I reproduced the problem. The strange thing is that I deploy the war that I already used and then it worked.
EDIT 1:
I've just noticed that when I send a request to, the server process takes 200% of CPU. Additionally it happens for only one application with stack: Hibernate, Spring, JSF 2.0, Primefaces.
EDIT 2:
Here is pastie with jstack output (jstack -l -F <PID>). All threads are blocked.
Additionally I noticed (using top and dumping stack of the JBoss process) that the problem is most probably caused by a thread called http--0.0.0.0-8080-1. Any ideas?
Thanks for help. I reverted the database to previous state, and it started to work. Apparently there was a problem in the data that caused this infinite loop. Now we need to find it, but as it is reproducible, I'll manage.

Resources