I want to connect to Weblogic from IDE in remote debug mode. I have added set JAVA_OPTIONS=-Xdebug -Xrunjdwp:transport=dt_socket,address=54840,suspend=n,server=y
to startWebLogic.cmd. After the start the weblogic server print out Listening for transport dt_socket at address: 54840. But when I try to connect I get an error:
Unable to open debugger port : java.net.ConnectException "Connection refused: connect"
I checked the remote debug on 54840 port with Apache Tomcat and everything is good. Please, tell me what is wrong with Weblogic.
WebLogic Server Version: 12.1.2.0.0 development mode.
Check the position of this added message. Noticed in File startWeblogic.cmd,
set DOMAIN_HOME=C:\Oracle\Middleware\Oracle_Home\user_projects\domains\ebilling_domain
for %%i in ("%DOMAIN_HOME%") do set DOMAIN_HOME=%%~fsi
call "%DOMAIN_HOME%\bin\setDomainEnv.cmd" %*
If you add this message before the above. The message will be override by the related code in setDomainEnv.cmd.
if "%debugFlag%"=="true" (
set JAVA_DEBUG=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=%DEBUG_PORT%,server=y,suspend=n -Djava.compiler=NONE
set JAVA_OPTIONS=%JAVA_OPTIONS% %enableHotswapFlag% -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole...
) else (
set JAVA_OPTIONS=%JAVA_OPTIONS% %enableHotswapFlag% -da
)
I have connected the remote server successfully.
Despite the fact the thread is kind of ancient, maybe I still can help a bit.
It seems weblogic comes ready to run in debug mode. I was able to use it setting the following environment variable:
Windows powershwell
$env:debugFlag = 'true'
Linux
export debugFlag=true
It happens that weblogic start scripts come ready to use this variable and it sets port 8453 as default for you to attach your debugger (probably with any moddern IDE).
If you still need to change that default port you can use another env variable (follow the above patterns for windows ad linux):
DEBUG_PORT = 54840
This way you probably wont have to mess with weblogic scripts.
I'm using weblogic 12c (12.1.3), folowing this article, and it worked fine for my case: https://www.linkconsulting.com/oracle/weblogic-remote-debugging-using-jdeveloper
Regards!
Related
I have an application signed for microsoft store which starts a web socket server on localhost (0.0.0.0:8081) on launching. Then I run python script with websocket client on the same host and try to connect to server (ws://127.0.0.1:8081) and it couldn't connect. But I can connect without any problems if I run this python script from another PC. Actually it works fine on local PC on another platforms: Win7, MacOS.
What i tried:
disabled windows firewall and defender
tried to add exception for application using CheckNetIsolation LoopbackExempt
tried to connect using different ip (0.0.0.0, 127.0.0.1, pc name)
It seems like I have to switch/set on/off some option for application or win10, but I can't find it
Thanks for help in advance
I found a solution https://learn.microsoft.com/en-us/windows/iot-core/develop-your-app/loopback
if you want to connect smth to win application on win 10 you should run
CheckNetIsolation.exe LoopbackExempt -is -n=your application
permanently
the best way to add it to start up menu
We are running "helloworld" example from https://grpc.io/docs/quickstart/cpp.html#update-a-grpc-service and we received the following ERROR:
14: Connect Failed
Greeter received: RPC failed.
The server and the client are listening on: 0.0.0.0:50051. The Server is running.
First we receive just a packet on the server and the client crashes, I checked it with tcpdump. We checked on different hosts as well as on the same host but it didn't work for either cases.
Should we change a different IP or different Port number?
I got the same issue on my PC(OS: ubuntu 16.04 LTS, protobuf 3.4.0)
so I search for the reason and I found this:
Reason
If on a linux machine, the environment has the usual "http_proxy" environment variable configured, gRPC will take that into account when trying to connect, however, will then proceed to ignore the companion no_proxy setting:
For example:
$ env
http_proxy=http://106.1.216.121:8080
no_proxy=localhost,127.0.0.1
$ ./greeter_client
D0306 16:00:11.419586349 1897 combiner.c:351] C:0x25a9290 finish old_state=3
D0306 16:00:11.420527744 1896 tcp_client_posix.c:179] CLIENT_CONNECT: ipv4:106.1.216.121:8080: on_writable: error="No Error"
D0306 16:00:11.420567382 1896 combiner.c:145] C:0x25a69a0 create
D0306 16:00:11.420581887 1896 tcp_client_posix.c:119] CLIENT_CONNECT: ipv4:106.1.216.121:8080: on_alarm: error="Cancelled"
I0306 16:00:11.420617663 1896 http_connect_handshaker.c:319] Connecting to server 127.0.0.1:50051 via HTTP proxy ipv4:106.1.216.121:8080
Basically, it's using the http_proxy url to connect even though localhost is in the no_proxy list. Since the default for no_proxy includes localhost on most linux machines; the end result is that any user with an http_proxy configured will never be able to connect to localhost. --- [1]
Other solution
You can enable grpc tracing with
export GRPC_TRACE=all && ./greeter_server and same thing for the client.
Verification
Terminal 1
Terminal 2
That should do the trick
ps. for more information about GRPC_TRACE - gRPC environment variables
Reference
gRPC doesn't respect the no_proxy environment variable
I'm trying to install the enterprise edition of neo4j on an existing EC2 (Amazon linux) instance. So far I've
wget "link to enterprise"
untar the file
renamed and moved the folder to NEO4J_HOME
then went into the config files for neo4j.properties to make the following changes:
# Enable shell server so that remote clients can connect via Neo4j shell.
remote_shell_enabled=true
# The network interface IP the shell will listen on (use 0.0.0 for all interfaces)
remote_shell_host=127.0.0.1
# The port the shell will listen on, default is 1337
remote_shell_port=1337
EDITED Christophe Willemsen pointed out that for my original error, I had forgotten to restart the server at that point but I was still unable to access the web server while it was running. So to make it more clear, I've edited the remaining post:
I went to neo4j-server.properties and uncommented:
org.neo4j.server.webserver.address=0.0.0.0
And start the server
NEO4J_HOME/bin/neo4j start
WARNING: Max 1024 open files allowed, minimum of 40 000 recommended. See the Neo4j manual.
Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:-OmitStackTraceInFastThrow
Starting Neo4j Server...WARNING: not changing user
process [28557]... waiting for server to be ready..... OK.
http://localhost:7474/ is ready.
checking the status:
NEO4J_HOME/bin/neo4j status
Neo4j Server is running at pid 28557
I can run the shell but the when I go to localhost 7474 I still can not connect
Any help would be appreciative. The only tutorial or help I've found assumed I was starting from scratch with a new instance. If someone could provide some instructions for installing or fix my configuration that would be great.
Thanks!
You have to edit neo4j-server.properties and uncomment the line with:
org.neo4j.server.webserver.address=0.0.0.0
So that the db listens on an external interface not just localhost, and you have to open the port (7474) in your firewall rules.
Make sure to secure access to the db though:
http://neo4j.com/docs/stable/security-server.html
How do you typically debug the ESB code? I am using log statements but they are kind of lost in system logs. Is there a better mechanism to be used?
Thanks,
You can do remote debugging from your IDE with ESB code.
First start the ESB server script with debug option as follows.
wso2server.sh -debug 5005
where the number is any port number used for remote debugging from your IDE.
Then run debug in your IDE with whatever the port number you assigned.
First, you have to setup debug configurations in your IDE which is can be learned using this wso2 article
Then start the ESP server with debug option as follows.
<esb_home>/bin/wso2server.sh -debug 5005
After you start the server you will get this message:
Listening for transport dt_socket at address: 5005
Then start debugging from your IDE!
This is the debug configuration I used:
You can use eclipse IDE.
Start ESB using below command.
wso2server.bat debug 8000 -Desb.debug=true
Setup eclipse remote java application.setup ESB server.
I just can't seem to get step debugging to work in CF 8 and Eclipse. Eclipse is running on my local machine and CF 8 is running on a non-local "intraweb" development server.
I think I have everything setup correctly:
RDS Working fine
Server configured to allow line debugging on port 5005 (port 5005 is not being used on server)
Added -DDEBUGGER_SERVER_PORT=5005 to the jvm.config file to force the debugging service to use port 5005.
In the RDS Configuration in Eclipse, the "test connection" is successful.
In RDS configuration, the "Test Debugger" button returns "Test debugger failed" with details that the server is listening on port 5005 but is not the port set in CF Administrator, which doesn't make sense since it IS the port that is set in CF Administrator.
If I restart the CF Server and hit the "test debugger" button, I will get the "test debugger was successful" message, but if I then hit it again a second time and on subsequent times, the connection will fail. (Trying to run the debug configuration directly after a restart will also fail.)
Would anyone have any ideas?
Thanks Jeff
The problem is solved. We had a special firewall setup (outside of windows server) and the port was being blocked. Unblocked the port, and everything works.
We had this problem too. If you are using IIS, turn off compression for Application Files (found in the "Service" tab in properties).