Connecting to an instance of Grails inside Intellij from outside localhost - intellij-idea

Not sure if this is just a minor configuration issue or otherwise, but when I run my grails app from within IntelliJ (via either run or debug), I never seem to be able to hit it from outside my localhost. So I can't hit my server from any of the other machines on the network, or from my phones when I'm trying to do WAP development. Yet, when I do grails run-app from the terminal, things work fine. I imagine it has something to do with how IntelliJ is binding the server, but does anyone have ideas on how to get it working? Thanks again!

In the Intellij configuration that you use to start the server, set 'Server host' to the hostname of your machine. If it is set to 'localhost' you can't connect using the actual hostname of the machine.

You should launch Grails with debug parameters (grailsDebug) and create a Remote debug run configuration in IntelliJ IDEA's Run Configurations combobox. Enter your host name and port there and you can connect now.

Related

Odoo cannot print on server

I deployed my Odoo App on our own server.
When I tested it on my Local Computer, it was just working fine.
But when it deployed, it can't download a Report
The console throw error like this
Error on Console
The App shows a notification of Connection Lost and Reconnect
Any advice?
Thanks
Check your configuration file. When you are working in your local with one worker, the longpolling is not enabled and it doesn't use. If you are going to use with port numbers on the url as the error suggests there are few things you need to check.
Check the conf file for correct ports. If there is no configuration file generate one and to the service with correct ports.
Check that the server ports are accessible from outside of your server. I'd suggest using NGINX and not exposing ports.
reports normally shouldn't go to the longpolling port if that is the case. So setting the web.base.url and web.base.url.freeze parameters in the settings, to avoid changes in the url when accessing from ports.

Remote Debug Weblogic Clustered Servers

I have a java application which is currently deployed in weblogic clustered environment with 2 managed servers. Would like to enable remote debugging for me to investigate further the issue on session data replication. I followed the steps provided here. After restarting the 2 managed servers, it seems the configuration has no effect. I used the same debug config below in my 2 managed servers.
-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8457,server=y,suspend=n
I also tried adding the below line on each managed server startup script.
export debugFlag=true
export DEBUG_PORT=8457
I use telnet command and got this error: Could not open connection to the host, on port 8457: Connect failed.
Linux firewall is already disabled.
Has anyone already encountered this issue? In addition, how to use it for me to enable debug in my IDE (e.g. Eclipse/IntelliJ)
Thanks in advance for the help.
This is already resolved. As advised by #devwebcl, I put the additional script below in my startManagedWebLogic.sh
export JAVA_OPTIONS="${JAVA_OPTIONS} -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8457,server=y,suspend=n"
I put the same argument (e.g. -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8457,server=y,suspend=n) in the Server Start argument section on each managed server in weblogic admin console.
It will make sure that either you start your managed server via weblogic admin console or via shell startup script of each managed server, the same argument will be picked up.

IntelliJ Websphere Server Local, Error running 'Local Deploy': Address localhost:9080 is already in use

I seem to be doing something wrong in my run configuration for IntelliJ. I cannot run the server on the port 9080 because another app has to use the port 9080 and it's not up to me what port that app uses. So please don't tell me to kill the app using the port 9080. This is not a duplicate of this
With the other app running I can start up the server via command line or using an external tool in IntelliJ however I cannot start it though a run configuration. My server requires the other app to be running locally to do local testing however I cannot debug the app due to this extremely annoying issue. IntelliJ is simply picking the port 9080 out of some configuration and checking that port all on its own and deciding to not try starting the server and then somehow at some point deciding to check the port which of course wont be available. Is there a setting that I'm missing or is there another way to handle this so that way I don't run into this issue?
In local deploy there is not an option to change the port number.
From #Andrey's comments the solution turned out to be the server.xml is all that IntelliJ checks and doesn't load the bootstrap.properties right off the get go. So if you are filling in the httpPort number via bootstrap.properties, server.env, or any dynamically loaded properties, IntelliJ will use the default 9080. The solution here was then to simply hardcode the httpPort in <httpEndpoint httpPort=9081 ... /> for local testing

Eclipse Kepler - Glassfish Plugin - unable to start GF 3.1

I'm using Eclipse Kepler WTP + the Glassfish Kepler plugins.
Problem is I'm not able to start my locally installed Glassfish any more with this configuration.
After run the launch configuration the progress bar is at 69% and does not continue. There is nothing in the logs etc. I also tried using a fresh workspace etc. but no success.
The Glassfish version I'm running is 3.1.2. With Eclipse Juno and the corresponding Glassfish plugins everything works just fine.
EDIT Seems to be an issue with the already existing domain inside GF. It is possible to use the plugin when creating a new domain.
Today I encountered the very same problem. For some reason, The Glassfish plugin couldn't start the domain - progess bar at 69%. A while after it stopped because of a time out. I don't know why it couldn't start.
Open the asadmin console : {GLASSFISH_DIRECTORY}/bin/asadmin
execute the start-domain command
Refresh the eclipse Glassfish plugin if needed. You can see that the server has been launched properly.
I know, it doesn't fix the problem. But do remember that the Glassfish plugin only provides a GUI. Command lines are still working if the plugin is not.
(Actually I don't want to create a domain again...)
The problem is eclipse cannot connect to your jmx glassfish port.
Look in your glassfish console por the jmx port where jmx admin service is listening, somethin like this:
2014-01-13T11:08:38.935+0100|Información: JMX005: JMXStartupService had Started JMXConnector on JMXService URL service:jmx:rmi://mywks:8686/jndi/rmi://mywks:8686/jmxrmi
Check this port is running:
telnet mywks 8686
If the port is ok, the problem is eclipse can't connect to port using machine name , in my case the problem was due to proxy configuration.
Open eclipse proxy configuration (windows -> preferences -> network connection), try changing active provicer to "manual" and configure your proxy. If proxy is not the problem, you can try to configure your local machine name as local host loop in your etc/host file.
(Note changing your proxy settings can cause your eclipse stops accessing eclipse market place).
If this not resolves the problem, try to sniff eclipse to glassfish connection using wireshark.
Hope this help.
You probably have forgotten to fill in the root directory as Glassfish. Do that in the setting enviroment for the server in Eclipse.

Intellij Idea 11 fails to connect to JBoss 7.1.1 remotely

I am attempting to deploy a simple exploded war application from idea 11.1.3 to a remote (same machine) JBoss 7.1.1. The War builds fine and starts to deploy, but I keep getting the following message on the attempted deploy:
Error running JBoss 7.1.1.Final: Unable to connect to the
localhost:8080
I am using Intellij's default JBoss 7 Remote configuration, which I've used successfully in the past. I can hit localhost:8080 directly with any browser so I know its responding. Ideas?
I've encountered with the same problem and found solution. May be this problem appeared because I've just switched from Eclipse. So I think someone it can be helpful.
For correct debugging JBoss remotely we need to specify 3 ports:
1) http port ('Port' field of the 'Remote Connection Settings' section) is used to ping JBoss server (periodical checking if the
server is alive) and to produce urls addressing resources on the server - FIRST TAB
2) native management port ('Management port' field of the 'JBoss Server Settings' section) is used to connect to the JBoss management 
interface, to check for the server startup to be finished and to deploy artifacts - FIRST TAB
3) remote socket port - by default on JBoss it 8787 - LAST TAB
After this all will work fine.
I was little bit confusing because if I run JBoss under sudo – remote debug worked just fine.