glassfish is not accessible, even though domain started - java

I have had glassfish installed and running on my server for a few weeks now everything was working fine but today its behaving very weirdly,
I first tried to access the admin page but it wouldnt load, so i tried to stop the domain, when I ran asadmin stop-domain domain1, the command just sat there doing nothing, tried starting the domain again, it said the domain is already running.
so I restarted the server. Still had the same issue, then went to taskmanager and stopped the glassfish server from there, started the domain again from asadmin.
now on localhost:4848 it shows the page for glassfish server is loading but nothing happens beyond that, once it showed me the login page but after I entered the credentials it didn't go any further just kept loading, non of the applications on the server are also accessible.
I checked the logs and there is nothing abnormal there just shows the regular server loading logs. My firewall is also disabled.
At this point I am completely stumped about what else I could try.
one of the application page finally loaded after a long time it is showing gc overhead limit reached, so apparently i have a memory leak somewhere

Please check that your DNS is working properly. Check host localhost, host servername.example.com and whatever the IP address that is returned for that with host <ipaddr> to make sure you are getting proper DNS resolution for all three items.

Related

Glassfish server domain stops running for no obvious reason

I have a glassfish 4 server installed on a Linux server. Apart from the Glassfish server default domain1, I created another domain - domain4.
Domain1 and domain4 have .WAR files of same application deployed on each of them.
But the domain4 keeps stopping for no obvious reason. I have to manually restart it with the 'sh asadmin start-domain domain4' command . This happens several times a day and it's tiring and frustrating to users. The domain1 doesn't have that issue.
I searched for solutions on google and StackOverflow.Most answers pointed to memory issues.
I increased the swappiness of the Linux so it can use more of the virtual memory if it needs more memory. However this did not work .
I asked the web host to increase the RAM from 2GB to 4 GB. This still did not solve the issue.
I undeployed the app from domain4, but the domain still goes down after a while.
I created another domain - domain5 without deploying any app on it. Yet, domain5 still goes down. Which means the problem is not from the app. But domain1 keeps running without issues.
*I even stopped domain1, to see if it was the cause and allowed domain5 to run . But after a while, domain5 still went down.
While monitoring the Linux server memory usage, I noticed the system doesn't even use up to 60% of RAM. The Glassfish server log and glassfish log didn't show any errors that point to any cause.
Does anyone have an idea of what could be the cause of this? Thank you
I created a service for the glassfish domain using the command:
asadamin>create-service domainName
it's been stable now for weeks.

The application on Angular does not receive a response from the server

There is an application on Angular, the backend is an application on Java-Spring.
Both of them are running on a server in a shared network, on a Windows OC machine in VirtualBox (Linux).
The essence of the problem is that when you try to open a web application in a browser, it runs completely on one computer out of five with Windows OC and on one of one on Linux OC.
The browser is everywhere Chrome, only in Linux Mozilla
The application itself is launched, but it does not receive data from the backend at startup.
At the same time I get an error
Failed to load resource:
http://10.151.78.6:5003/es-serv/api/v1/get-data/sh1 net::ERR_CONNECTION_RESET
Here is the controller method that receives requests, there is no call to it in the logs
#GetMapping("/get-data/" + RestApiConstants.VARIABLE_NAME)
public ResponseEntity<ListResponse<DataDto>> getData(
#PathVariable(RestApiConstants.PARAM_NAME_WORD) String name) {
log.info("getData -> start");
return converterDtoService.converterDataDto(name);
}
Moreover, if you just try to open the link in the browser bar
http://10.151.78.6:5003/es-serv/api/v1/get-data/sh1
Then I get the data every time, I have never noticed any failures.
Very similar to the problem with CORS, but then the browser gives a specific error to all requests. Yes, and cors is disabled in the Java application. And even then it is not clear why it still works on some browsers.
It doesn't look like a timeout problem either, because I get an error instantly, and when the server doesn't respond, some time passes and it's noticeable.
And another such moment, I added a forced data reading button to the application. And after 20-30 attempts to read the data, the answer may still come to those computers that did not receive them.
If it was a problem with the network, then it is unclear why on the same computer from the same browser, the GET request typed in the browser line gets answers all the time, without a single pass.
Tell me where to look to understand the reason?
The problem was solved by updating the browsers to the latest version. And before that, the browser version was not very old. I don't understand how this could affect the transmission of the GET request over the network?

no process listening on port 8080 but shows already in use

I try to start a Spring boot project. It worked fine originally, but after I restart my computer for some reason, I keep getting the messages "Port xxxx was already in use".
And Even if I change the port, I still get this error. I'm pretty sure I have no process in use.
Though it might be solved when I restart my computer, I was still wondering the problem.

Java Program failing to connect to MQ "unable to connect to queue manager, check remote access to MQ installation"

To clarify the issue. I am running an MQ simulator jar given to us by a vendor (essentially to verify or MQ setup prior to them delivering MQ functionality).
The program works, when I run it from my laptop.
I get "unable to connect to queue manager, check remote access to MQ installation" when I run it from the linux dev server (which is where we actually want to verify the connectivity from). Same exact MQ properties as when I run from my windows laptop. I ran telnet from the server to the host and port and confirmed that worked. So I imagine there shouldn't be any firewall rule preventing the connection.
The program doesn't actually print out an error code, just the message (which I am pretty sure is the first question that is going to get asked of me).
I've been talking to the folks that set up MQ, and they are really making it sound like it isn't an issue on their end despite the fact most everything I can find on this message is indicating it is probably a problem with configuration there.
Not super linux savvy so any tips on any way I can monitor and get more information on a root cause other than this error message I am seeing would be great.

Tomcat returns 404 status

I was trying to change the user who runs the tomcat process.
In process of changing I have added new user and made tomcat run under him.
how now if i ping the tomcat, I get 404 error.
I am not sure how to proceed.
Can I check if tomcat has loaded all the classes ?
Can I check anything else to make sure tomcat loaded the servlets.
Is there anything else I can check to resolve this 404 error.
Thanks a lot
You didn't say what operating system you are using. Look in your tomcat logs directory and verify that tomcat actually started up. A lot of times the log will be called catalina.out. It should say "server starting up in X ms". Also, look at the running processes on your system. There should be a Java process running for Tomcat. You can also use netstat or dig on Linux to see if there is a process listening on a particular port. You can check what port Tomcat should be listening on by looking in the conf directory and looking at the Tomcat server configuration in the server.xml file.

Categories

Resources