vjy chin

Ranch Hand
+ Follow
since Feb 17, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by vjy chin

Thanks for the reply. I will check with the team to see if it is possible, but I dont think it would be. I am kind of stuck with the versions.

I also see this happen only when the server is not hit for sometime, so it kind of times out and re-establishes connections or atleast that is what I am thinking.

Any other suggestions. Thanks.

13 years ago
If this is not the appropriate forum, please move it to the right one.

We have an application. The architecture is as below

1 load balancer (apache), which redirects to 2 app servers (jboss). The site is working fine and I am able to access it fine. But sometimes, randomly the homepage takes a while (like 30-40 secs)
to load. I tried checking the logs but could not figure out why.

I used the httptraffic analyzer, fiddler to see the traffic, but it just says the request/response took 30 secs or so.

I checked the apache access logs, mod_jk.log.

My configurations are below


mod-jk.conf
-----------



-----------------------------
-------------------------------


uriworkermap.properties
------------------------

# Simple worker configuration file
#

# Mount the Servlet context to the ajp13 worker
/=loadbalancer
/*=loadbalancer


-----------------------------
-------------------------------

workers.properties
-----------------



-----------------------------
-------------------------------

my jboss server.xml - $JBOSS_HOME/server/default/deploy/jbossweb.sar/server.xml
-------------------


<Connector protocol="AJP/1.3" port="8009" address="${jboss.bind.address}"
redirectPort="8443" />


---------------------------------
---------------------------------


The logs from access log is below

The issue where it took time - look at the seconds column



The one after the issue


---------------------------------


Would it be a cache or timeout issue?

Any help is appreciated. Thanks.
13 years ago
Thanks for the response. There is a groovy script which gets executed when the instance is brought up and initializes, downloads the war, deploys in tomcat and so on.

But I know the war file is fine, since I manually get the jsps from that war file (from the same machine) and copy it to the application folders.

Thanks.
14 years ago
Thanks William and Jimmy.

The JSP files are in the war file. So if the jsps are not deployed properly, I had to manually un-war the app, copy the jsps files. MANIFEST does look good.

The app will be deployed when the tomcat is off. It is the part of application deployment process (bring up a new amazon instance). But even when tomcat is running and deploy the war file, I see this issue.

Thanks.
14 years ago
The way the app works is, a war file is downloaded from another place and copied into the webapps folder and the tomcat service is started. Most of the times the war file is deployed properly, but sometimes it is not, mostly there will just be empty folders and not the jsp or other files.

I have also tried to manually copy the war file to the webapps folder after deleting the existing war and the war folder.

Thanks.
14 years ago
I did check the log files and I could not see anything that would explain this.

14 years ago
I am using apache-tomcat-6.0.20 server. I deploy .war file when the server is running, but sometimes the war file is not deployed properly. The folders are there, but not the jsp files. So I have to manually unzip the war file and copy all the files.

As I said, this happens sometimes, is there anything that I need to check.

The tomcat is a service and I have turned on the autoDeploy attribute in server.xml.

Any suggestions welcome. Thanks.
14 years ago
Thanks, I will check it and let you know how it goes.
14 years ago
I am using jboss-5.1.0.GA and I have a question about port forwarding.

By default, jboss forwards the https request to 8443 and I want to change it to some other port, for e.g. 5000. What should I do?

I changed the settings in jboss-5.1.0.GA\server\default\deploy\jbossweb.sar\server.xml




I changed all the port values in the file to 5000, but when I restarted the server, all values changed back to 8443. So when I tried accessing the url as https://localhost:5000, it is not working.


Any ideas/suggestions.


Thanks.
14 years ago
Check out http://www.security-forums.com/. It is a good one. It has whole bunch of topics.
14 years ago
I am trying to write a java program and eventually a web app to do the following.

1. get the server name, username, password from the user and ssh to the linux box.

2. goto a folder, open a script file (the file has different function calls, I need to comment all other function calls and just un-comment the one I want to use)

#call_1
call_2
#call_3
#call_4

I know it should always use the call_2 for this, but other programs or users can comment/uncomment these calls. So I need to make sure of it.

3. Execute the nohup command to run the script
4. May be (this is to be decided) send an email once its done.

I think we can do this from a java program, but not sure about the step 2. Do we need a script for that?

I started using JSch - Java Secure Channel, but I get "com.jcraft.jsch.JSchException: Auth fail". I found that I need to change /etc/ssh/sshd_config file. But for me that is not an option because of compliance issues. So how else can I go about this.

Any help is appreciated. Thanks.
14 years ago
I am also having the same issue.

Thanks.
14 years ago
Joe,

Thanks for the reply. The code I posted is modified as I had to remove some unwanted code and comments which were not relevant, hence the line number change. I did not mean to mislead, thats why I mentioned the statement.

Also, the servlet output "user_id" is set in the code before which I did not post, but did post a comment in line 48. I will also change the instance variables.

Am I calling the servlet correctly, as I am able to access it via the same url, but I am not seeing my print statements from the servlet(My first statement in the doPost method is a print).

Thanks.
14 years ago
Paul,

Thanks for the reply. I need to use the existing xsl, modify it so it gets the user information and gets data from database and display data according to the results which I got from the database.

To get the user information, I need servlet, then I need to access java class.

So the user information will come from AjaxServlet, I do not need to display that. So I might not be able to do what you suggested.

Anyways, I thought of another way of doing it,

1. xsl calling a java class without any parameters
2. call a servlet inside the java class
3. get the person details in servlet and send it to java class
4. use the person details and call the database and get the details and send it back to xsl.

I am struck in step 3. I am sending the value as objectstream and getting as objectstream in the java class, but I get "java.io.StreamCorruptedException: invalid stream header". I have posted this in the I/O forum.

Thanks for your help again Paul.

I apologize if its not in the right forum. I am trying to call a servlet from java class and get data from the servlet to the java class. I am having some issues(java.io.StreamCorruptedException: invalid stream header) with it.

My Java class




My Servlet class is







The exception I get is



The error line is ObjectInputStream in = new ObjectInputStream(aConnection.getInputStream());

I also wanted to know if I am able to access my servlet as I did, since the servlet print statements are not getting executed. I tried the same servlet URL in the browser, atleast I get the user values printed in the log file, but XML error in the browser display.

What am I missing here? Thanks for the help.
14 years ago