Problem while starting Apache Tomcat Server (Ports already in use)...

Hi,
I am using an Eclipse IDE for web service Client creation.. Also I have used Apache Tomcat5.5 Server inorder to run the application*...*
While starting Tomcat Server, I am getting an error that the port numbers are already in use.
So, I have changed the port numbers in the Server.xml file.
But, still it is throwing the same error , even though the port numbers are not in use.
Can any one please provide some suitable solution for this ASAP....
I need very urgent and so please provide some solution..
Thanks in Advance,
roopa

Hey...
Did u start restarting your machine after you changed the ports..
Is your tomcat server running perfectly after you changed the port number...
I had a similar prob.. But i jus reinstalled both and gave different port numbers while re-installling.
Jus give it it a try.. The ports need to be refreshed.. So try rebooting yr machine first !
All the best !

Similar Messages

  • Problem while starting Apache/Tomcat as a NT Service

    We are having a virtual folder which is mapped to a network physical folder.In this case while starting Apache/Tomcat as NT service it fails to map that folder.If we start the Tomcat as a Standalone service(using start menu) it works fine.I don't know which one is best whether starting tomcat as standalone or NT service.Provide a better solution

    You want to run it as an NT Service if you want Tomcat running when you are logged off. Otherwise, you can just run it manually.

  • Problem in configuring Apache Tomcat Server

    Hi, I am facing problem in configuring Apache Tomcat server. I have downloaded its version 4.1.18 from the Internet. After unzipping and installing it, I have enabled the Root Context, enabled the Invoker Servlet, haven't changed the port to 80 from default 8080, have turned on the Servlet Reloading, have set the Java_Home variable in autoexec.bat, and have changed the DOS memory setting to 4096.
    Also, the concerned lines in my autoexec.bat file look like this:
    path c:\windows;c:\windows\command;c:\jdk1.2;c:\jsdk2.0;
    c:\JavaWebServer2.0;c:\jakarta-tomcat-4.1.18
    set java_home=c:\jdk1.2
    set tomcat_home-c:\jakarta-tomcat-4.1.18
    set classpath=.;c:\ServDevel;.;c:\jakarta-tomcat-4.1.18\common\lib\servlet.jar;.;c:\jsdk2.0\lib\servlet.jar;.;
    Still, after having done all this, when I start the server using startup.bat (which happens without any problems) and type in http://localhost:8080/ on the browser to test the server, nothing happens. It doesn't show me the Tomcat Welcome screen. I get an error page saying "This page is not available". Why? Where am I going wrong?
    Sushant

    1) Try http://127.0.0.1:8080
    2) set tomcat_home-c:\jakarta-tomcat-4.1.18
    Is the minus-sign after tomcat_home also in the autoexec.bat?
    Replace it with an equals-sign
    3) When you run startup.bat, is a new command window opened and are the following three lines displayed at the end? It should stay open, otherwise something is wrong (unless running as a service).
    INFO: Initializing Coyote HTTP/1.1 on port 8080
    Starting service Tomcat-Standalone
    Apache Tomcat/4.1.18

  • Problems while starting the Managed Server through Node Manager..

    When I was trying to start a Managed Server using the Nodemanager , I am getting the following error :
    NodeManager not configured to receive commands from host : emis-develop
    I have the "nodemanager.hosts" file under the directory "c:\bea\wlserver6.1\config" and even while invoking the script for the startnodemanager , I am indicating this in the script ! Any ideas for this problem ??

    The system is vulnerable to security attacks, since it trusts certificates signed by the demo trusted CA.> You may configure custom Identity and Trust in weblogic. It is not recommended to use Demo Trsut and Demo Identity for environments higher to Dev. -
    http://download.oracle.com/docs/cd/E14571_01/web.1111/e13707/identity_trust.htm#i1202182
    Regards,
    Anuj

  • Problem i starting Apache web server

    # service httpd start
    Got message like :--------------------------
    Redirecting to /bin/systemctl start  httpd.service
    Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.
    on checkig log file ::  -----------------------------------------------i found this.   
    # journalctl -xn
    -- Logs begin at Sun 2013-01-27 20:38:14 IST, end at Mon 2013-01-28 13:57:43 IST. --
    Jan 28 13:56:50 nitk.admin systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
    Jan 28 13:56:50 nitk.admin httpd[26019]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/httpd/conf.d/aeolus-conductor.con
    Jan 28 13:56:50 nitk.admin httpd[26019]: httpd (no pid file) not running
    Jan 28 13:56:50 nitk.admin systemd[1]: Failed to start The Apache HTTP Server.
    -- Subject: Unit httpd.service has failed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/li … temd-devel
    -- Documentation: http://www.freedesktop.org/wiki/Softwar … e9d022f03d
    -- Unit httpd.service has failed.
    -- The result is failed.
    Jan 28 13:56:50 nitk.admin systemd[1]: Unit httpd.service entered failed state
    Jan 28 13:57:43 nitk.admin nova-compute[1318]: 2013-01-28 13:57:43 1318 AUDIT nova.compute.resource_tracker [-] Free ram (MB): 3377
    Jan 28 13:57:43 nitk.admin nova-compute[1318]: 2013-01-28 13:57:43 1318 AUDIT nova.compute.resource_tracker [-] Free disk (GB): 49
    Jan 28 13:57:43 nitk.admin nova-compute[1318]: 2013-01-28 13:57:43 1318 AUDIT nova.compute.resource_tracker [-] Free VCPUS: 8
    Jan 28 13:57:43 nitk.admin nova-compute[1318]: 2013-01-28 13:57:43 1318 INFO nova.compute.resource_tracker [-] Compute_service record updated for nitk.admin
    Jan 28 13:57:43 nitk.admin nova-compute[1318]: 2013-01-28 13:57:43 1318 INFO nova.compute.manager [-] Updating host status
    (END)
    Can anyone help me to decide, where is the problem???????????
    content of the file    ;   /usr/lib/systemd/system/httpd.service
    [Unit]
    Description=The Apache HTTP Server
    After=network.target remote-fs.target nss-lookup.target
    [Service]
    Type=notify
    PIDFile=/var/run/httpd/httpd.pid
    EnvironmentFile=/etc/sysconfig/httpd
    ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND
    ExecReload=/usr/sbin/httpd $OPTIONS -k graceful
    ExecStop=/usr/sbin/httpd $OPTIONS -k graceful-stop
    PrivateTmp=true
    [Install]
    WantedBy=multi-user.target
    Last edited by hunter.ashish (2013-01-28 08:32:52)

    Could you check if you have this directory? (It can be empty):
    /var/run/httpd
    permissions should be root:root, mod:755

  • Problem while starting Sample POrtal Server

    Hi,
    I have installed Web Logic Platform 8.1 from the bea site. When I try to run the
    Example portal server, it throws following error:
    <23-Jul-2003 12:52:25 o'clock BST> <Error> <JDBC> <BEA-001150> <Connection Pool
    "cgPool" deployment failed with the following error: 0:Could not create pool connection.
    The DBMS driver exception was: SQL-server rejected establishment of SQL-connection.
    Pointbase Server may not be running on localhost at port 9093..> <23-Jul-2003
    12:52:25 o'clock BST> <Error> <JDBC> <BEA-001151> <Data Source "p13n_dataSyncDataSource"
    deployment failed with the following error: DataSource(p13n.dataSyncDataSource)
    can't be created with non-existent Pool (connection or multi) (cgPool).> <23-Jul-2003
    12:52:25 o'clock BST> <Error> <JDBC> <BEA-001151> <Data Source "p13n_sequencerDataSource"
    deployment failed with the following error: DataSource(p13n.sequencerDataSource)
    can't be created with non-existent Pool (connection or multi) (cgPool).> <23-Jul-2003
    12:52:25 o'clock BST> <Error> <JDBC> <BEA-001151> <Data Source "p13n_trackingDataSource"
    deployment failed with the following error: DataSource(p13n.trackingDataSource)
    can't be created with non-existent Pool (connection or multi) (cgPool).> <23-Jul-2003
    12:52:25 o'clock BST> <Error> <JDBC> <BEA-001151> <Data Source "ebusinessPool"
    deployment failed with the following error: DataSource(weblogic.jdbc.jts.ebusinessPool)
    can't be created with non-existent Pool (connection or multi) (cgPool).> <23-Jul-2003
    12:52:25 o'clock BST> <Error> <JDBC> <BEA-001151> <Data Source "cgDataSource"
    deployment failed with the following error: DataSource(cgDataSource) can't be
    created with non-existent Pool (connection or multi) (cgPool).> <23-Jul-2003 12:52:25
    o'clock BST> <Error> <JDBC> <BEA-001151> <Data Source "contentDataSource" deployment
    failed with the following error: DataSource(contentDataSource) can't be created
    with non-existent Pool (connection or multi) (cgPool).> <23-Jul-2003 12:52:25
    o'clock BST> <Error> <JDBC> <BEA-001151> <Data Source "commercePool" deployment
    failed with the following error: DataSource(weblogic.jdbc.jts.commercePool) can't
    be created with non-existent Pool (connection or multi) (cgPool).> <23-Jul-2003
    12:52:25 o'clock BST> <Error> <JDBC> <BEA-001151> <Data Source "portalFrameworkPool"
    deployment failed with the following error: DataSource(portalFrameworkPool) can't
    be created with non-existent Pool (connection or multi) (cgPool).> <23-Jul-2003
    12:52:25 o'clock BST> <Alert> <JMS> <BEA-040052> <JMSServer "cgJMSServer" store
    failed to open java.io.IOException: JMS JDBC store, connection pool = <cgPool>,
    prefix = <weblogic>: connection pool does not exist. java.io.IOException: JMS
    JDBC store, connection pool = <cgPool>, prefix = <weblogic>: connection pool does
    not exist at weblogic.jms.store.JDBCIOStream.throwIOException(JDBCIOStream.java:359)
    Does any body know the cause of the problem.
    Please help?
    Thanks Aydan

    If you haven't solved this yet, it looks as if your DB server is not
    running, hence any elements that rely on a db server, such as connection
    pools and elements that use those pools such as datasources are not
    going to start correctly.
    It seems that properties are not properly assigned in the
    startPointBase.cmd script on Windows NT (haven't verified behaviour on
    2000 although I know it works out of the box on Solaris). I'd suggest
    starting the pointbase server manually with the correct pointbase.ini
    file and then starting WLS/WLP afterwards.
    Aydan wrote:
    Hi,
    I have installed Web Logic Platform 8.1 from the bea site. When I try to run the
    Example portal server, it throws following error:
    <23-Jul-2003 12:52:25 o'clock BST> <Error> <JDBC> <BEA-001150> <Connection Pool
    "cgPool" deployment failed with the following error: 0:Could not create pool connection.
    The DBMS driver exception was: SQL-server rejected establishment of SQL-connection.
    Pointbase Server may not be running on localhost at port 9093..> <23-Jul-2003
    12:52:25 o'clock BST> <Error> <JDBC> <BEA-001151> <Data Source "p13n_dataSyncDataSource"
    deployment failed with the following error: DataSource(p13n.dataSyncDataSource)
    can't be created with non-existent Pool (connection or multi) (cgPool).> <23-Jul-2003
    12:52:25 o'clock BST> <Error> <JDBC> <BEA-001151> <Data Source "p13n_sequencerDataSource"
    deployment failed with the following error: DataSource(p13n.sequencerDataSource)
    can't be created with non-existent Pool (connection or multi) (cgPool).> <23-Jul-2003
    12:52:25 o'clock BST> <Error> <JDBC> <BEA-001151> <Data Source "p13n_trackingDataSource"
    deployment failed with the following error: DataSource(p13n.trackingDataSource)
    can't be created with non-existent Pool (connection or multi) (cgPool).> <23-Jul-2003
    12:52:25 o'clock BST> <Error> <JDBC> <BEA-001151> <Data Source "ebusinessPool"
    deployment failed with the following error: DataSource(weblogic.jdbc.jts.ebusinessPool)
    can't be created with non-existent Pool (connection or multi) (cgPool).> <23-Jul-2003
    12:52:25 o'clock BST> <Error> <JDBC> <BEA-001151> <Data Source "cgDataSource"
    deployment failed with the following error: DataSource(cgDataSource) can't be
    created with non-existent Pool (connection or multi) (cgPool).> <23-Jul-2003 12:52:25
    o'clock BST> <Error> <JDBC> <BEA-001151> <Data Source "contentDataSource" deployment
    failed with the following error: DataSource(contentDataSource) can't be created
    with non-existent Pool (connection or multi) (cgPool).> <23-Jul-2003 12:52:25
    o'clock BST> <Error> <JDBC> <BEA-001151> <Data Source "commercePool" deployment
    failed with the following error: DataSource(weblogic.jdbc.jts.commercePool) can't
    be created with non-existent Pool (connection or multi) (cgPool).> <23-Jul-2003
    12:52:25 o'clock BST> <Error> <JDBC> <BEA-001151> <Data Source "portalFrameworkPool"
    deployment failed with the following error: DataSource(portalFrameworkPool) can't
    be created with non-existent Pool (connection or multi) (cgPool).> <23-Jul-2003
    12:52:25 o'clock BST> <Alert> <JMS> <BEA-040052> <JMSServer "cgJMSServer" store
    failed to open java.io.IOException: JMS JDBC store, connection pool = <cgPool>,
    prefix = <weblogic>: connection pool does not exist. java.io.IOException: JMS
    JDBC store, connection pool = <cgPool>, prefix = <weblogic>: connection pool does
    not exist at weblogic.jms.store.JDBCIOStream.throwIOException(JDBCIOStream.java:359)
    Does any body know the cause of the problem.
    Please help?
    Thanks Aydan

  • Problem in starting Apache Tomcat 4.0

    I have recently installed Apache Tomcat 4.0 (on Windows 2000). When i try to run the server i get the following message. Can someone help me in figuring this out?
    Catalina.start: LifecycleException: null.open: java.net.BindException: Address
    in use: JVM_Bind
    LifecycleException: null.open: java.net.BindException: Address in use: JVM_Bin
    d
    at org.apache.catalina.connector.http.HttpConnector.initialize(HttpConne
    ctor.java:1116)
    at org.apache.catalina.core.StandardService.initialize(StandardService.j
    ava:454)
    at org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
    a:552)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:775)
    at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
    at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
    at java.lang.reflect.Method.invoke(Native Method)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218)
    ----- Root Cause -----
    java.net.BindException: Address in use: JVM_Bind
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.PlainSocketImpl.bind(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at org.apache.catalina.net.DefaultServerSocketFactory.createSocket(Defau
    ltServerSocketFactory.java:118)
    at org.apache.catalina.connector.http.HttpConnector.open(HttpConnector.j
    ava:946)
    at org.apache.catalina.connector.http.HttpConnector.initialize(HttpConne
    ctor.java:1114)
    at org.apache.catalina.core.StandardService.initialize(StandardService.j
    ava:454)
    at org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
    a:552)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:775)
    at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
    at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
    at java.lang.reflect.Method.invoke(Native Method)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218)

    Hi Syed,
    Did you set up 2 environment variables:
    JAVA_HOME points to your jdk
    CATALINA_HOME points to your tomcat
    --Paul                                                                                                                                                                                                                                                       

  • Problem  while starting j2sdkee1_3_01-win  server

    I have installed j2sdkee-1_3_01-win .
    I have set all the path and class paths which are required.
    compilation of a small servlet program was successful.But when I
    Execute the command D:\start j2ee -verbose it is giving a error like
    D:\Program is not recognised as internal or external command,operable programm or batch file

    Hi
    Go to your soa domain root folder/bin and open setSOADomainEnv.cmd file in any text editor. Search for -Xmx1024m and replace that with -Xmx512m. I would prefer copy this entire line and comment one old line and edit the new line with this new value of 512m. So that you know what you changed later on. I do something like this on my side
    REM JEGGA changed -Xmx1024m to -Xmx512m
    set DEFAULT_MEM_ARGS=-Xms512m -Xmx512m
    REM set DEFAULT_MEM_ARGS=-Xms512m -Xmx1024m
    Now you should be able to start the domain. Still 2GB is kind of low memory to start SOA Domain with AdminServer and managed server. One other option you have is while Creating SOA Domain, do NOT use all the defaults, instead check the boxes like to changed managed servers etc. And remove the soa managed server during this process and remove the cluster. Just have only one Admin Server and all the SOA Modules deployed to this AdminServer only. In this way, you will have SOA Domain with only one AdminServer and you can start this admin server alone. You can deploy any SOA Application on this domain and it should work fine.
    Refer this thread for creating single server soa domain:
    Re: Combining two WLS domains
    Thanks
    Ravi Jegga

  • Problem while integrating windows file server into SAP KM using WEBDAV

    Hi
    I am trying to integrate windows file server into SAP KM using WEBDAV . I have downloaded the kerberos ini filter and included in the windows system. I am only trying to bring the files in the same system into KM but with no luck. When i check the log file in the kerberos folder i am getting
    <b>12:02:22 10828/10476 E OnPreprocHeaders: Found 0 UserPrincipalNames for ADSI Filter (&(objectCategory=person)(objectClass=user) (userPrincipalName=xxxx))</b>.
    In the log i am getting the following
    ERROR! Delegation Flag:Use any authentication protocol: NOT ACTIVE
                           Open 'Active directory Users and Computers'. Choose <domain> -> 'Computers'.
                           Right-click 'IDBSRV8' and choose 'Properties'.
                           Select 'Delegation' and 'Trust this computer for delegation to specified services only'.
                           Select 'Use any authentication protocol'.
                    ERROR! The Trusted-to-Authenticate-for-Delegation flag is not set for SPN 'HOST/idbsrv8.idbhq.org'.
                           Please check the SPN by calling 'setspn -l IDBSRV8'.
                           If the SPN is well known, configure the Trusted-to-Authenticate-for-Delegation flag:
                           Open 'Active directory Users and Computers'. Choose <domain> -> 'Computers'.
                           Right-click 'IDBSRV8' and choose 'Properties'.
                           Select 'Delegation' and 'Trust this computer for delegation to specified services only'.
                           Select 'Use any authentication protocol' and choose 'Add'.
                           Select 'Users or Computers' and enter IDBSRV8 as object name.
                           Add the ServicePrincipalName HOST/idbsrv8.idbhq.org.
    Can anybody please help me in this regard???
    Regards,
    Ganesh N
    Message was edited by:
            Ganesh Natarajan

    Hi Ganesh,
    this error message tells you that there is no user in your active directory that has the userPrincipalName xxxx.
    The SSO22KerbMapModule works as follows.
    1. It receives a SAP Logon Ticket from the WebDAV request.
    2. If valid the SAP username is extracted. In your case the SAP username is xxxx.
    3. It then searches for a user in AD. It does so using the attribute in the ini-file that has been specified to contain the SAP username. In your case the SAP username should be identical with the userPrincipalName.
    So you have to make sure that the portal user id (j_user) is mapped to the same AD user attribute  that is specified in the ini-file .
    Best regards,
    Andre

  • Problem while starting the managed server

    Hi
    We have following configuration :-
    We have 2 physical sesrvers :-
    Server1 and Server2 in Sun Cluster running Solaris 10.
    We also have Oracle DB server 9.2.0.8 in RAC mode, one instance each on Server1 & Server2.
    Server 1 :-
    cluster1 :- 1 Managed Server running
    Server 2 :-
    cluster2 :- 1 Managed Server running
    we are getting following error in admin server log :-
    <Error> <NodeManager> <BEA-300034> <Could not execute command "kill" for server "cluster1" using the node manager. Reason: Connection refused. Couldn't connect to NodeManager. Check that it is running at localhost:5556.>
    Recently we have enabled the Connection Filter.
    also getting following info in logs :-
    <Notice> <Socket> <BEA-000445> <Connection rejected, filter blocked Socket[addr=192.193.164.8,port=53666,localport=8001], weblogic.security.net.FilterException: [Security:090220]rule 16>
    <Notice> <Socket> <BEA-000445> <Connection rejected, filter blocked Socket[addr=163.37.174.126,port=58284,localport=8002], weblogic.security.net.FilterException: [Security:090220]rule 17>
    Is it because of any misconfiguration in Connection filter ?
    Or filter is not allowing the request for ipaddress and port of Managed Server in cluster1
    Thanks in advance .. :)

    Thanks for the information.
    Node Manager is not used.
    I found problem in Connection filter.
    169.187.186.76 - address ManagedServer1
    169.187.186.77- address Managed server2
    169.187.186.51 :- Admin Server (8001 is http and 8002 is https)
    Tunneling is enable for Managed Server
    Please help me understanding below things is there any ambiguity in this rules :-
    In the script to stop Managed server we are using t3 protocol like : t3://ip:port but its not allowing t3 protocol .whereas t3 protocol is no where denied in rules.
    If I use https to issue request still not working
    <connection-filter>weblogic.security.net.ConnectionFilterImpl</connection-filter>
    <connection-filter-rule>127.0.0.1 169.187.186.51 8001 allow</connection-filter-rule>
    <connection-filter-rule>172.16.0.129 169.187.186.51 8001 allow</connection-filter-rule>
    <connection-filter-rule>172.16.1.1 169.187.186.51 8001 allow</connection-filter-rule>
    <connection-filter-rule>169.187.186.59 169.187.186.51 8001 allow</connection-filter-rule>
    <connection-filter-rule>169.187.186.51 169.187.186.51 8001 allow</connection-filter-rule>
    <connection-filter-rule>169.187.186.76 169.187.186.51 8001 allow</connection-filter-rule>
    <connection-filter-rule>192.168.10.4 169.187.186.51 8001 allow</connection-filter-rule>
    <connection-filter-rule>172.16.4.1 169.187.186.51 8001 allow</connection-filter-rule>
    <connection-filter-rule>169.187.186.77 169.187.186.51 8001 allow</connection-filter-rule>
    <connection-filter-rule>169.187.186.60 169.187.186.51 8001 allow</connection-filter-rule>
    <connection-filter-rule>172.16.0.130 169.187.186.51 8001 allow</connection-filter-rule>
    <connection-filter-rule>172.16.1.2 169.187.186.51 8001 allow</connection-filter-rule>
    <connection-filter-rule>192.168.10.5 169.187.186.51 8001 allow</connection-filter-rule>
    <connection-filter-rule>172.16.4.2 169.187.186.51 8001 allow</connection-filter-rule>
    <connection-filter-rule>ocs1.in.citicorp.com 169.187.186.51 8002 allow https</connection-filter-rule>
    <connection-filter-rule>* 169.187.186.51 8001 deny</connection-filter-rule>
    <connection-filter-rule>* 169.187.186.51 8002 deny</connection-filter-rule>
    Thanks in Advance .......

  • Multiple LV instances, web server cannot start, port already in use

    Hi there,
    I have a general question about webserving VIs in case either
    a) multiple instances of the LV development environment are running (this is possible in windows XP for instance when "switch users" is allowed and each user launches LV)
    b) multiple compiled LV executables are run by the same user
    c) any mixture of the two above
    I have an application case when either of the three above would be a very good solution, was not for the problem encountered. Say, b): the user is given two deployed executables, and can decide to run either or both concurrently. Moreover, I want these applications to be visible on the web, so they are compiled with the webserver turned on, default settings.
    The problem I've seen (LV8.5.1, winXp for sure, but I think I've seen it as well in linux and other versions as well) is that each new instance of the LV engine tries to get hold of the tcp port (default 80), so that all instances beyond the first complain about "The Web Server cannot start. Is the Web Server port already in use?"
    While I can understand the origin of the message, and found some posts on the forums somehow related to it, I don't like it too much. 
    I could think only of two workarounds here: 1) set different web server ports for each LV instance, and instruct the remote users to direct their browsers to a webserverort link to access each VI; 2) run all the applications from the same instance of the LV dev system. The latter is not so convenient for me, due to conflicts in global VIs between all instances of the applications [compiling executables IS a way to privatize memory spaces in this case, AND global variables are imho well justified for the fairly complex application I have in mind here].
    Is there a third, more elegant solution perhaps, which I'm missing?
    Thanks, Enrico

    NathanK wrote:
    What is it in particular that you dislike about the message?
    How would you like LabVIEW to behave in this case?
    No problem with the message, but I'd just be very happy if a single
    web server would serve all my instances of the executables on the same
    port. I.e., if 2.exe is open and wants to start another server on the
    same port used already by 1.exe, then 2.exe becomes served by the
    server already opened. Am I demanding too much? Am I missing some
    necessary logic?
    At the moment, anyway, I'm stuck with the vi being served correctly,
    but not the compiled application, and I can't figure out why. It's
    LV8.5.1, and yes, I have in the .ini
    WebServer.DirectoryIndex="index.htm"
    WebServer.LogPath=C:\Program Files\National Instruments\LabVIEW 8.5\www.log
    WebServer.MimeTypes="htm;text/html;gif;image/gif;j​pg;image/jpeg;png;image/png;txt;text/plain;html;te​xt/html;jpeg;image/jpeg;css;text/css;llb;applicati​on/x-labview-llb;vi;application/x-labview-vi;doc;a​pplication/msword;dot;application/msword;bin;appli​cation/octet-stream;exe;application/octet-stream;r​tf;application/rtf;pdf;application/pdf;ai;applicat​ion/postscript;eps;application/postscript;ps;appli​cation/postscript;csh;application/x-csh;gtar;appli​cation/x-gtar;gz;application/x-gz;sh;application/x​-sh;tar;application/x-tar;zip;application/zip;hqx;​application/mac-binhex40;ua;audio/basic;wav;audio/​wav;tif;image/tiff;tiff;image/tiff;xbm;image/x-xbi​tmap;rtx;text/richtext;qt;video/quicktime;mov;vide​o/quicktime;avi;video/x-msvideo;movie;video/x-sgi-​movie;aif;audio/aif;aifc;audio/aif;aiff;audio/aif;​aim;application/x-aim;dif;video/x-dv;div;video/x-d​v;js;application/x-javascript;pntg;image/x-macpain​t;xlb;application/vnd.ms-excel;xls;application/vnd​.ms-excel;ppa;application/vnd.ms-powerpoint;ppt;ap​plication/vnd.ms-powerpoint;pps;application/vnd.ms​-powerpoint;pot;application/vnd.ms-powerpoint;pwz;​application/vnd.ms-powerpoint;mid;audio/mid;midi;a​udio/mid;enc;video/mpeg;m1v;video/mpeg;mp2;video/m​peg;mpa;video/mpeg;mpe;video/mpeg;mpeg;video/mpeg;​mpg;video/mpeg;psd;image/x-photoshop;bmp;image/bmp​;pic;image/pic;ra;audio/vnd.rn-realaudio;rf;image/​vnd.rf-realflash;rm;application/vnd.rn-realmedia;r​p;image/vnd.rn-realpix;ram;audio/x-pn-realaudio;rm​m;audio/x-pn-realaudio;rnx;application/vnd.rn-real​player;rt;text/vnd.rn-realtext;rv;video/vnd.rn-rea​lvideo;smi;application/smil;ssm;application/stream​ingmedia;sithqx;application/mac-binhex40;sit;appli​cation/x-stuffit"
    WebServer.Port=80  [### or 8000]
    WebServer.Enabled=True
    WebServer.RootPath=C:\Program Files\National Instruments\LabVIEW 8.5\www
    WebServer.TcpAccess="c+*"
    WebServer.ViAccess="+*"
     [hints welcome here]. That is, I'm at the moment unable to use even my workaround 1 above.
    Enrico

  • Problem connecting oracle database to jsp pages using Apache Tomcat server 8.0

    Well...I tried too many things..googled so many times..but still could not find solution to my problem.
    I use windows 8 Enterprise Edition(if this has to do something with the problem)
    Oracle 11.2.0
    Apache Tomcat server 8.0
    JDK 1.7
    My oracle is installed in the D: drive and tomcat in c:. i copied the ojdbc6.jar file from oracle to lib directory of tomcat server.
    Then i set  CLASSPATH in environment variables as "C:\Program Files\Apache Software Foundation\Tomcat 8.0\lib\ojdbc6.jar" in system variables
    My path variable is set as "C:\Program Files\Java\jdk1.7.0_02\bin".
    My program is as follows in notepad:
    <%@ page import="java.sql.*" %>
    <html>
    <body>
    <%
    Connection conn;
    Statement st;
    ResultSet rs;
    try{
    new oracle.jdbc.driver.OracleDriver();
    String dbURL="jdbc:odbc:oracle:thin:@localhost:1521:XE";
    String userId="system";
    String pwd="moon";
    conn=DriverManager.getConnection(dbURL,userId,pwd);
    st=conn.createStatement();
    rs= st.executeQuery("SELECT * FROM login");
    while(rs.next())
    System.out.println(rs.getString(1)+""+rs.getString(2));
    catch(Exception e){}
    %>
    </body>
    </html>
    I get too many errors then
    eroors
    org.apache.jasper.JasperException: An exception occurred processing JSP page /page2.jsp at line 14
    11: String userId="system";
    12: String pwd="moon";
    13:
    14: conn=DriverManager.getConnection(dbURL,userId,pwd);
    15: st=conn.createStatement();
    16:
    17: rs= st.executeQuery("SELECT * FROM login");
    Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    root cause
    javax.servlet.ServletException: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:905)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:834)
         org.apache.jsp.page2_jsp._jspService(page2_jsp.java:102)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
         org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    Nothing solved this problem.

    >> Nothing solved this problem.
    Can't fix a problem 'till an actual problem is identified.
    >> ODBC Driver Manager ... Data source name not found
    That appears to be ODBC drivers looking for a DSN (Data Set Name). If it wants a DSN, the DSN has to be specified in the code, and the DSN has to be configured in the windows host ODBC applet. So that is at least two squirrels to get in the right tree before moving forward. A ...host:...[port:]SID|service name are some of the bits needed in a jdbc connect string, and that is in no way related to DSNs. A Whole Different Animal. If it wants a DSN that might be what needs to go in the URL bit.
    And ODBC setups can be confusing, especially if an x64 OS is in the mix- if that is the case there are two different ODBC configuration applets, one for x64 the other for x86, and if one gets as far as talking to an actual database it might toss an architecture error. Only way to fix that "problem" is *delete* the ODBC DSN and then run the correct (maybe the x86) ODBC config utility, and set up the DSN. Again.

  • Problem while starting weblogic server 10.3.3.0

    Hi,
    I have installed the Weblogic server 10.3.3.0 on machine which has Microsoft Windows XP 2002, Service pack3. RAM - 2GB
    On that Weblogic server 10.3.3.0 i have installed SOA 11.1.1.2.0 and applied the patch set 2 on SOA 11.1.1.2.0 to upgrate it to SOA 11.1.1.3.0. I have used XE database which is installed on another machine.
    After the installation of SOA 11.1.1.3.0 I have created one domain.
    While starting the Admin server of that domain, it prompt me with an error as :
    ** Setting up SOA specific environment for win...
    PATH=D:\ORACLE~1\MIDDLE~1\patch_wls1033\profiles\default\native;D:\ORACLE~1\MIDDLE~1\patch_ocp353\profiles\default\native;D:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\native\win\32;D:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\bin;D:\ORACLE~1\MIDDLE~1\modules\ORGAPA~1.1\bin;D:\ORACLE~1\MIDDLE~1\JDK160~1\jre\bin;D:\ORACLE~1\MIDDLE~1\JDK160~1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Windows Imaging\;C:\WINDOWS\Tools\Wintools;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;;D:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8;D:\OracleWebLogic\Middleware\Oracle_SOA1\soa\thirdparty\edifecs\XEngine\bin
    USER_MEM_ARGS=-Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m
    JAVA_OPTIONS= -Xverify:none
    ** End SOA Specific environment setup for win.
    JAVA Memory arguments: -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m
    WLS Start Mode=Development
    CLASSPATH=D:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\ext\jdbc\oracle\11g\ojdbc6dms.jar;D:\OracleWebLogic\Middleware\Oracle_SOA1\soa\modules\user-patch.jar;D:\OracleWebLogic\Middleware\Oracle_SOA1\soa\modules\soa-startup.jar;;D:\ORACLE~1\MIDDLE~1\patch_wls1033\profiles\default\sys_manifest_classpath\weblogic_patch.jar;D:\ORACLE~1\MIDDLE~1\patch_ocp353\profiles\default\sys_manifest_classpath\weblogic_patch.jar;D:\ORACLE~1\MIDDLE~1\JDK160~1\lib\tools.jar;D:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;D:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;D:\ORACLE~1\MIDDLE~1\modules\features\weblogic.server.modules_10.3.3.0.jar;D:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;D:\ORACLE~1\MIDDLE~1\modules\ORGAPA~1.1/lib/ant-all.jar;D:\ORACLE~1\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;D:\OracleWebLogic\Middleware\Oracle_SOA1\soa\modules\oracle.soa.common.adapters_11.1.1\oracle.soa.common.adapters.jar;D:\ORACLE~1\MIDDLE~1\ORACLE~1\soa\modules\commons-cli-1.1.jar;D:\ORACLE~1\MIDDLE~1\ORACLE~1\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;D:\ORACLE~1\MIDDLE~1\ORACLE~1\modules\oracle.xdk_11.1.0\xsu12.jar;D:\ORACLE~1\MIDDLE~1\modules\features\weblogic.server.modules.xquery_10.3.1.0.jar;D:\OracleWebLogic\Middleware\Oracle_SOA1\soa\modules\db2jcc4.jar;D:\ORACLE~1\MIDDLE~1\USER_P~1\domains\SOACOE\config\soa-infra;D:\OracleWebLogic\Middleware\Oracle_SOA1\soa\modules\fabric-url-handler_11.1.1.jar;D:\OracleWebLogic\Middleware\Oracle_SOA1\soa\modules\quartz-all-1.6.5.jar;D:\OracleWebLogic\Middleware\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\oracle.soa.fabric.jar;D:\OracleWebLogic\Middleware\Oracle_SOA1\soa\modules\oracle.soa.adapter_11.1.1\oracle.soa.adapter.jar;D:\OracleWebLogic\Middleware\Oracle_SOA1\soa\modules\oracle.soa.b2b_11.1.1\oracle.soa.b2b.jar;D:\ORACLE~1\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jrf.jar;D:\ORACLE~1\MIDDLE~1\WLSERV~1.3\common\derby\lib\derbyclient.jar;D:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\lib\xqrl.jar
    PATH=D:\ORACLE~1\MIDDLE~1\patch_wls1033\profiles\default\native;D:\ORACLE~1\MIDDLE~1\patch_ocp353\profiles\default\native;D:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\native\win\32;D:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\bin;D:\ORACLE~1\MIDDLE~1\modules\ORGAPA~1.1\bin;D:\ORACLE~1\MIDDLE~1\JDK160~1\jre\bin;D:\ORACLE~1\MIDDLE~1\JDK160~1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Windows Imaging\;C:\WINDOWS\Tools\Wintools;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;;D:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8;D:\OracleWebLogic\Middleware\Oracle_SOA1\soa\thirdparty\edifecs\XEngine\bin
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http:\\hostname:port\console *
    starting weblogic with Java version:
    Starting WLS with line:
    D:\ORACLE~1\MIDDLE~1\JDK160~1\bin\java -client -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m -Dweblogic.Name=AdminServer -Djava.security.policy=D:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy -Xverify:none -da -Dplatform.home=D:\ORACLE~1\MIDDLE~1\WLSERV~1.3 -Dwls.home=D:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=D:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server -Ddomain.home=D:\ORACLE~1\MIDDLE~1\USER_P~1\domains\SOACOE -Dcommon.components.home=D:\ORACLE~1\MIDDLE~1\ORACLE~1 -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Djrockit.optfile=D:\ORACLE~1\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jrocket_optfile.txt -Doracle.domain.config.dir=D:\ORACLE~1\MIDDLE~1\USER_P~1\domains\SOACOE\config\FMWCON~1 -Doracle.server.config.dir=D:\ORACLE~1\MIDDLE~1\USER_P~1\domains\SOACOE\config\FMWCON~1\servers\AdminServer -Doracle.security.jps.config=D:\ORACLE~1\MIDDLE~1\USER_P~1\domains\SOACOE\config\fmwconfig\jps-config.xml -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Digf.arisidbeans.carmlloc=D:\ORACLE~1\MIDDLE~1\USER_P~1\domains\SOACOE\config\FMWCON~1\carml -Digf.arisidstack.home=D:\ORACLE~1\MIDDLE~1\USER_P~1\domains\SOACOE\config\FMWCON~1\arisidprovider -Dweblogic.alternateTypesDirectory=D:\ORACLE~1\MIDDLE~1\ORACLE~1\modules\oracle.ossoiap_11.1.1,D:\ORACLE~1\MIDDLE~1\ORACLE~1\modules\oracle.oamprovider_11.1.1 -Dweblogic.jdbc.remoteEnabled=false -da:org.apache.xmlbeans... -Dsoa.archives.dir=D:\OracleWebLogic\Middleware\Oracle_SOA1\soa -Dsoa.oracle.home=D:\OracleWebLogic\Middleware\Oracle_SOA1 -Dsoa.instance.home=D:\ORACLE~1\MIDDLE~1\USER_P~1\domains\SOACOE -Dtangosol.coherence.clusteraddress=227.7.7.9 -Dtangosol.coherence.clusterport=9778 -Dtangosol.coherence.log=jdk -Djavax.xml.soap.MessageFactory=oracle.j2ee.ws.saaj.soap.MessageFactoryImpl -Djava.protocol.handler.pkgs="oracle.mds.net.protocol|oracle.fabric.common.classloaderurl.handler|oracle.fabric.common.uddiurl.handler|oracle.bpm.io.fs.protocol" -Dweblogic.transaction.blocking.commit=true -Dweblogic.transaction.blocking.rollback=true -Djavax.net.ssl.trustStore=D:\ORACLE~1\MIDDLE~1\WLSERV~1.3\server\lib\DemoTrust.jks -Dem.oracle.home=D:\OracleWebLogic\Middleware\oracle_common -Djava.awt.headless=true -Dums.oracle.home=D:\OracleWebLogic\Middleware\Oracle_SOA1 -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=D:\ORACLE~1\MIDDLE~1\patch_wls1033\profiles\default\sysext_manifest_classpath;D:\ORACLE~1\MIDDLE~1\patch_ocp353\profiles\default\sysext_manifest_classpath weblogic.Server
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Any help How to resolve this error.I have increased the virtual memory of the drive in which i have done the installation.
    Thanks
    Mala

    Hi
    Go to your soa domain root folder/bin and open setSOADomainEnv.cmd file in any text editor. Search for -Xmx1024m and replace that with -Xmx512m. I would prefer copy this entire line and comment one old line and edit the new line with this new value of 512m. So that you know what you changed later on. I do something like this on my side
    REM JEGGA changed -Xmx1024m to -Xmx512m
    set DEFAULT_MEM_ARGS=-Xms512m -Xmx512m
    REM set DEFAULT_MEM_ARGS=-Xms512m -Xmx1024m
    Now you should be able to start the domain. Still 2GB is kind of low memory to start SOA Domain with AdminServer and managed server. One other option you have is while Creating SOA Domain, do NOT use all the defaults, instead check the boxes like to changed managed servers etc. And remove the soa managed server during this process and remove the cluster. Just have only one Admin Server and all the SOA Modules deployed to this AdminServer only. In this way, you will have SOA Domain with only one AdminServer and you can start this admin server alone. You can deploy any SOA Application on this domain and it should work fine.
    Refer this thread for creating single server soa domain:
    Re: Combining two WLS domains
    Thanks
    Ravi Jegga

  • Problem occured while starting the Manged server of weblogic9.2

    Hi all,
    I am cnfiguring the OWSM on 2 machine which are in Clustering mode(Pre-Prod Env)
    I have done the installation of SOA SUITE10.1.3.1 for the same.
    After installation , i started Admin server.
    But i am facing issue while starting the managed server of weblogic9.2 through admin Server Console.(which are clustered).The managed Server state goes to ADMIN and raise the error that failed to start the server.It does not go into RUNNING state.
    The error i was recieved is :
    *####<May 13, 2009 10:21:01 AM IST> <Info> <ServletContext-/bea_wls_internal> <ggneai65> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1242190261158> <000000> <HTTPClntLogin: Login rejected with code: 'Failed', reason: java.net.ProtocolException: HTTP tunneling is disabled*
    *     at weblogic.rjvm.http.HTTPServerJVMConnection.acceptJVMConnection(HTTPServerJVMConnection.java:88)*
    *     at weblogic.rjvm.http.TunnelLoginServlet.service(TunnelLoginServlet.java:80)*
    *     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)*
    *     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)*
    *     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)*
    *     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)*
    *     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)*
    *     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3244)*
    *     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)*
    *     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)*
    *     at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2010)*
    *     at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1916)*
    *     at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)*
    *     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)*
    *     at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)*
    *'>*
    because of which deployment of OWSM failed at managed server.
    please help me for the same ASAP.
    its urgent.
    Regards
    Gaurav

    That is an INFO message you received and would not stop a managed server from starting. To get rid of that INFO message, enable tunneling on the admin server.
    Check your node manager log file to see why the managed server is not starting.

  • Tomcat Servlet - TCP Port Already in Use?

    My problem is that tomcat/servlet is not releasing its TCP port after my servlet closes the port. Next time a servlet tries to use the port it gets an error "Port already in use". Using netstat I can see the port is still in use. If I stop tomcat and restart it, the port is released. I have not had this sort of problem writing C programs that use sockets.
    My setup is Fedora Core 6 with JDK1.5_14 and Tomcat 5.5.26. I know it's not the latest, but sockets and streams have been around for a long time.
    Actual implementation uses a trivial javaserver page to instantiate a class to create/accept connection from a client (JApplet). After connection, it starts a thread to receive data. I am using ServerSocket(), InputStreamReader(), and OutputStreamWriter(). On ServerSocket I set ReuseAddress to true.
    I have try/catch on all my I/O and use tomcat context log for error and OK messages. Data transfer is perfect. Detect close by client works. In the context log I see close of streams and ServerSocket occur with no exceptions. Then, I manually close the jsp window. No indication of any problems. If I use different port 2nd time (e.g. 50001) it all works perfect. If I use my default (50000) again, servlet gets an error during bind, "Port already in use".
    2.5 years with Java. 5 years with Linux and C.
    Please advise or refer

    rwengr wrote:
    My problem is that tomcat/servlet is not releasing its TCP port after my servlet closes the port. Next time a servlet tries to use the port it gets an error "Port already in use". Using netstat I can see the port is still in use. If I stop tomcat and restart it, the port is released. I have not had this sort of problem writing C programs that use sockets.Nice.... Not sure that matters though.
    >
    My setup is Fedora Core 6 with JDK1.5_14 and Tomcat 5.5.26. I know it's not the latest, but sockets and streams have been around for a long time.
    Actual implementation uses a trivial javaserver page to instantiate a class to create/accept connection from a client (JApplet). Bleah! Don't use a JSP for that. Use a servlet at worst. At best use a Servlet to start some other socket manager class which you can/have tested outside the Servlet Container environment.
    After connection, it starts a thread to receive data. I am using ServerSocket(), InputStreamReader(), and OutputStreamWriter(). On ServerSocket I set ReuseAddress to true.
    I have try/catch on all my I/O and use tomcat context log for error and OK messages. Data transfer is perfect. Detect close by client works. In the context log I see close of streams and ServerSocket occur with no exceptions. Then, I manually close the jsp window. Closing the browser window has no affect on the server.
    No indication of any problems. If I use different port 2nd time (e.g. 50001) it all works perfect. If I use my default (50000) again, servlet gets an error during bind, "Port already in use".
    2.5 years with Java. 5 years with Linux and C.
    Please advise or referShow some code. If you just want some generic advice it would be to close the port, as soon as you don't need it anymore. But you know that. Without any further code I think that is about all that can be said.
    P.S. Make the code as small as possible, compilable, but still demonstrating the problem. Also see: [this tutorial as an example...|http://www.javaworld.com/javaworld/jw-12-1996/jw-12-sockets.html?page=1]

Maybe you are looking for