Oracle Weblogic 12c Shutdown not working for two ports - java

I have recently turned on SSL port 7003 for my managed server on Weblogic, earlier it was running on non-ssl port 7002. I have disabled non-ssl port by unchecking listen port enabled. Now the Managed Server is only working on SSL port 7003. This is when it gets strange..... I turn off managedserver and I could still see 7003 running (I can access the server on browser). Now I turned off Weblogic (stopWeblogic.sh) and still I can access 7003 port. Can someone explain why on earth is this happening? I went on to a lot of sites and no help.
Thank you so much

Most likely the server didn't stop. Check with netstat -tanp and see what process is using the port. If it is java, there you are. If you dare (test or production?) do a kill -9 pid to get rid of it. I assume you are running on Linux, otherwise there are similar commands for Windows (netstat, task manager or pskill).

Related

Force JMX of Apache ActiveMQ to only be accessible from localhost

I have a RHEL6 server running Apache ActiveMQ, and I cannot find a way to disable remote access to JMX.
I can disable JMX entirely, but that restricts the functionality of ActiveMQ, which uses JMX to access the broker to get status information, or communicate shutdown requests (ActiveMQ falls back to SIGKILL!).
I want to have ActiveMQ be accessible through JMX, but only from localhost.
According to Apache's website, remote connections should be disabled by default, but I'm able to connect to the default 1099 port from other machines. As far as I can tell, the settings for JMX are left as default.
I'm aware of a number similar questions, but proposed solutions haven't been working for me, in particular:
Adding -Dcom.sun.management.jmxremote.host=localhost and/or -Dcom.sun.management.jmxremote.local.only=true doesn't help
Adding -Djava.rmi.server.hostname=localhost also doesn't help
This even though this solution and some comments to it seem to indicate that the Java version I'm running (>8u102) fixes some known problems.
Some solutions talk about it being necessary to switch to "coding" (e.g., this or this) but it's unclear to me how such an approach could be used with ActiveMQ.
In bin/env (of the Apache ActiveMQ build) add this:
-Dcom.sun.management.jmxremote.host=127.0.0.1
Then observe that JMX port binds only to the localhost ip
% netstat -na | grep 1099
tcp4 0 0 127.0.0.1.11099 *.* LISTEN

Windows server cannot start Apache tomcat due to port 443 is in use and cannot be killed

Hi I cannot start apache tomcat 7.0.77 under my windows server 2012 due to this conflict,
netstat -a -n -o | findstr 443
TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 4
TCP [::]:443 [::]:0 LISTENING 4
which I cannot kill by kill the pid due to error:
Error: the proces with PID 4 could not be terminated
reason: access is denied.
I cannot change port in the server config file because another port is not being able to accessed in public. So my only choice is to terminate this conflict and use this port for tomcat.
I have tried to restart the server several times and looking for similar posts in this page.
I really don't know what caused this problem since tomcat used to work fine before. Only when I try to deploy new war file from tomcat gui manager then restart, start, stop apache tomcat service under service manager few times and it keep stopping right after I click start.
Any help please !!
Thank you !
I found out the solution by using process hacker at:
https://processhacker.sourceforge.io/
then go to processes kill that process using that port (note: you can lost remote desktop connection if that is the process related or your server could restart, but after a while all will be back, as for my case).

port 8080 is already in use and no process using 8080 has been listed

I am trying to start Tomcat from Eclipse, but a problem occured:
Port 8080 required by Tomcat v6.0 Server at localhost is already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).
I tried to list processes connected to this port using command on Windows:
netstat -aon
But on the listing there is no process with PID = 8080. I also tried:
netstat -aon | find "8080"
But it also didn't find anything. Can anyone help me?
PID is the process ID - not the port number. You need to look for an entry with ":8080" at the end of the address/port part (the second column). Then you can look at the PID and use Task Manager to work out which process is involved... or run netstat -abn which will show the process names (but must be run under an administrator account).
Having said that, I would expect the find "8080" to find it...
Another thing to do is just visit http://localhost:8080 - on that port, chances are it's a web server of some description.
Open eclipse go to Servers panel, right click or press F3 to open Overview window and go to Ports (Modify the server ports). You will get the following:
tomcat adminport
HTTP/1.1
AJP/1.3
You can change the port numbers (e.g. HTTP/1.1 port number 8080 to 8082).
In windows " wmic process where processid="pid of the process running" get commandline " worked for me. The
culprit was wrapper.exe process of webhuddle jboss soft.
If no other process is using the port 8080, Eventhough eclipse shows the port 8080 is used while starting the server in eclipse, first you have to stop the server by hitting the stop button in "Configure Tomcat"(which you can find in your start menu under tomcat folder), then try to start the server in eclipse then it will be started.
If any other process is using the port 8080 and as well as you no need to disturb it. then you can change the port.
In my case, there was a conflict with the virtualization function of Windows 10. This problem occurred after installing Hyper-V, virtual machine platform, and hypervisor platform to use hyper-v, docker, and bluestack together.
Even if I check with netstat, it is not a port in use, and even if I restart Windows and change the port, it does not start up saying that it is in use for all ports.
So, by changing the following services to Disabled in Windows Services, the Tomcat problem was solved, but bluestack, docker, etc. execution became impossible.
After starting Tomcat, when I manually changed the services again, bluestack was executed.
Hyper-V Host Compute Service
HV Host Service
Host network service
Network virtualization service

Can't connect to tomcat webservice

So I've been doing a java webservice in Eclipse in which I have launched on a localhost tomcat from Eclipse. This has worked very good as long as I've been connecting to the tomcat started from Eclipse.
However now I want to try deploy it on my tomcat separated from Eclipse but still on localhost. So I exported my web project to a .war file and deployed it with the tomcat manager app. However now I cant reach it from my client any longer. I'm running the tomcat on port 8080, just as my Eclipse tomcat did. BUT I can go to a reasource URL from my web browser and receive proper information, so the service is running(which the manager app is saying as well).
The client is a android device connected to the same network. The service fetches information from a MySQL database on the same machine. This connection worked fine before exporting it to war on my other tomcat
What am I doing wrong here? Just ask if you need any further information!
Ok so after testing I found it strange that I got connection time-outs and not something else. It also took at least 10 seconds before any feedback occurred. Sooo it felt like a firewall problem which indeed it was.
First I needed to portforward the tomcat port in my router to the machine ip that was hosting it. Then I remembered I had Windows firewall on that very machine which was also blocking conenctions on that port. So I allowed connections on tomcat port and BAM! It worked.
Thanks for all your comments, of course I should have thought about opening my ports before coming here.

Remote Debugging in eclipse

I have an application running in server A. The dev environment is in server B.
I am trying to do remote debugging of app running in server A.
In server A i added following command to service start script
-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=4554,server=y,suspend=n
And service is running in server A.
When i try to launch remote debugging configuration it gives
Failed to connect to remote VM. Connection refused. Connection refused
port 4554 is free in server A.
What other configuration need to be done for this?
Regards
Dheeraj Joshi
Try this.
Set suspend=y, just to make sure you got the JVM line right. This should stop the VM on startup until you connect.
If you're on Unix, bring up the terminal and try telnet [host] [port] - this will quickly let you know if there's anything listening to that port on that host.
Make sure the connection properties in Eclipse are set correctly. Note that the port defaults to 8000.
Use the IP address instead of the host name, to rule out DNS/hostfile problems.
Another way of starting the JVM that I use successfully is:
-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=y
Check if there is a firewall between and/or on the two servers.

Categories