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]

Similar Messages

  • Rmiregistry: Port already in use error

    Hi,
    I'm running the following comand to start a registry service listening on port 1099. I'll start and stop it several times with control-C and everything will work fine but if I do this a few times, it will get to the point that when I try to start it again I get a message
    saying the port is already in use(but I killed the service). Is there a way to start and stop the rmiregistry several times without it getting hung? I'm sure if you get into a production issue with this you need a way to get around it? Besides using the proper command, what can you do to free up a port? Note, I also noticed that netstat shows multiple entries listening on port 1099! Was this from re-trying the command when it failed or from the times that it was successful? Any help appreciated.
    Thanks,
    Peter
    C:\>rmiregistry -J-Djava.security.policy=C:\jdk1.3.0_02\jre\lib\security\pkjava2.policy
    java.rmi.server.ExportException: Port already in use: 1099; nested exception
    is:
    java.net.BindException: Address in use: JVM_Bind
    java.net.BindException: Address in use: JVM_Bind
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:408)
    at java.net.ServerSocket.<init>(ServerSocket.java:173)
    at java.net.ServerSocket.<init>(ServerSocket.java:85)
    at
    sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMIDirectSocketFactory.java:30)
    at
    sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMIMasterSocketFactory.java:312)
    at
    sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:559)
    at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:200)
    at
    sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:172)
    at
    sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:319)
    at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:119)
    at
    sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:125)
    at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:95)
    at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:81)
    at sun.rmi.registry.RegistryImpl.main(RegistryImpl.java:320)
    C:\>netstat -a
    Active Connections
    Proto Local Address Foreign Address State
    TCP reminetopk:135 0.0.0.0:0 LISTENING
    TCP reminetopk:135 0.0.0.0:0 LISTENING
    TCP reminetopk:1028 0.0.0.0:0 LISTENING
    TCP reminetopk:1030 0.0.0.0:0 LISTENING
    TCP reminetopk:1032 0.0.0.0:0 LISTENING
    TCP reminetopk:1033 0.0.0.0:0 LISTENING
    TCP reminetopk:1099 0.0.0.0:0 LISTENING
    TCP reminetopk:1099 0.0.0.0:0 LISTENING
    TCP reminetopk:1099 0.0.0.0:0 LISTENING
    TCP reminetopk:1409 0.0.0.0:0 LISTENING
    TCP reminetopk:1893 0.0.0.0:0 LISTENING
    TCP reminetopk:1972 0.0.0.0:0 LISTENING
    TCP reminetopk:2026 0.0.0.0:0 LISTENING
    TCP reminetopk:2359 0.0.0.0:0 LISTENING
    TCP reminetopk:2367 0.0.0.0:0 LISTENING
    TCP reminetopk:2369 0.0.0.0:0 LISTENING
    TCP reminetopk:7318 0.0.0.0:0 LISTENING
    TCP reminetopk:8082 0.0.0.0:0 LISTENING

    I have exactly the same problem. At first it was happening with the use of the "rmiregistry" command, but now my code creates the registry using registry = LocateRegistry.createRegistry(port) and I end up with the same problem.
    I too end up with (typically) 3 listening sockets (as reported by netstat), that don't seem to be owned by any processes. So without a process to kill, the only way to get rid of them is to reboot.

  • 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

  • Soap port already in use (856B) GW 703

    Anyone run into this problem where if you have multiple POA's on single server and if you enable SOAP to use default port of 7191 on both POA's, one or other POA complains about "soap port already in use (856B)" and shuts down that POA.
    BES doesn't seem to have option for add'l port number assignments? Or is there a workaround to allow both POA's to listen on same port number?
    Any help is greatly appreciated!
    Thanks

    On Tue, 22 Sep 2009 13:36:02 +0000, josejimenez wrote:
    > Anyone run into this problem where if you have multiple POA's on single
    > server and if you enable SOAP to use default port of 7191 on both POA's,
    > one or other POA complains about "soap port already in use (856B)" and
    > shuts down that POA.
    Makes sense. You can't run multiple services on the same server using
    the same IP address and port.
    > Or
    > is there a workaround to allow both POA's to listen on same port number?
    Use multiple IP addresses and bind each POA to a specific IP.
    Joe Marton
    Novell Knowledge Partner
    SUSE Linux Enterprise 11 is ready for action.

  • 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 !

  • Tomcat Error : OutPutstream is already being used for this request

    I'using Jdev3.2 to develop an application based on the dataweb
    beans.
    I'm using the EditCurrentRecord, and the function UseListOfValue
    to disply lovs.
    I deployed the application on tomcat, when the page is displayed
    an execption occur which is 'OutPutstream is already being used
    for this request'
    can someone help me please
    THX in advance
    Ghassen

    can someone help?
    Please

  • Port already in use Error right after applying Patch 1 for Coherence 3.6

    I'm having an issue with Patch1 of Coherence 3.6. I am not able to start two DefaultCacheServer instances. Its giving me the following error when I try load the 2nd one.
    =**2010-08-17 15:56:21,550-Logger@9247854 3.6.0.1 ERROR Coherence- 2010-08-17 15:56:21.550/2.156 Oracle Coherence GE 3.6.0.1 <Error> (thread=Proxy:ExtendTcpProxyService:TcpAcceptor:TcpProcessor, member=2): error binding ServerSocket to 172.16.173.164:9095: java.net.BindException: Address already in use: bind
         at sun.nio.ch.Net.bind(Native Method)
         at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
         at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.acceptor.TcpAcceptor.configureSocket(TcpAcceptor.CDB:25)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.acceptor.TcpAcceptor$TcpProcessor.onEnter(TcpAcceptor.CDB:26)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:14)
         at java.lang.Thread.run(Thread.java:619)
    It looks to me something to do with ExtendTcpProxyService. I have that hardcoded to go to 9095.
    Do you have any work around for this issue?

    I am seeing a similar problem (not sure if 3.6.01 related since I have only tried with this release yet - I always run on the bleeding edge on my dev machine).
    If I do NOT specify tangosol.coherence.localport explicitly I get a message that 8088 is in use. If I understand things right should not Coherent try to increment the port number (I have even tried seting tangosol.coherence.localport.adjust to true explicitly) but this does not seem to happen.
    It gets even stranger since when I run the Windows command that checks for open ports 8088 is not listed as in use....
    The same thing happen if I specify 8088 explicitly (still no auto increment).
    If I however explicitly specify another free port (say 8089) it works...
    Really strange...
    /Magnus

  • Game port already in use quit other application and try again?

    ok didnt know where to post it but, i got a mac mini and im up to date on all updates. I play warcraft three frozen throne computer game on it. I play a few matches or so in custom games then boom a message pops up saying that another application is using a needed gaming port, please quit other application and try again. I have no idea what it is talking about because the only thing im running is warcraft three. I have no clue how to fix this, so if anyone knows please help me out here.

    Thanks Mr. Goodwin - that was the high tech way of finding who is using port 8300.
    I did a low tech search - edited hyperion/logs/ configtool.log and found that a previous administrator configured Planning to use that port:
    +(May 05, 2008, 10:30:23 PM), com.hyperion.cis.config.wizard.Tomcat5DeploymentPanel, DEBUG, Checking for valid Tomcat serverName+
    +(May 05, 2008, 10:30:23 PM), com.hyperion.cis.config.wizard.AppServerDeploymentPanel, DEBUG, Deploy component [1]: Planning+
    +(May 05, 2008, 10:30:23 PM), com.hyperion.cis.config.wizard.AppServerDeploymentPanel, DEBUG, Server Name: HyperionPlanning+
    +(May 05, 2008, 10:30:23 PM), com.hyperion.cis.config.wizard.AppServerDeploymentPanel, DEBUG, Listen Port: 8300+
    +(May 05, 2008, 10:30:24 PM), com.hyperion.cis.config.wizard.Tomcat5DeploymentPanel, DEBUG, Checking for valid Tomcat serverName+
    Question now is this, since Planning has already been configure to use Tomcat at port 8300, why can't I configure it to use that port again? Anyways, I guess I should not select "Deploy to Application server" on the Config tool.
    Edited by: user643332 on Mar 25, 2009 12:42 PM

  • LMS 4.2 Why is TCP port 514 used and how to close it?

    An internal security scan showed that TCP port 514 is open on the Cisco Prime LMS 4.2.4 server.  The security team is concerned that this port is commonly used for rsh, which is not encrypted and may use plain text logins or poorly authenticated logins.  The port being open is documented in the "Installing and Migrating ..." manual for LMS 4.2 where it says that this TCP port 514 is used for Remote Copy Protocol in the direction from the server to device.  The well-known port associated with a service is usually on the target host, not on the host that initiates the connection, so this is a little confusing.  I see that there is no rsh service in /etc/inetd.conf, but there is an rsh service in /etc/xinetd.conf.  This LMS is not configured to use RCP for anything, as far as I can tell.
    Can I close TCP port 514 on this server without disasterous results, and how do I do that?
    Or, how do I satisfy the security team that having this port open is not a security concern?
    Thanks for any help.
    Dave

    I have a love/hate relationship with security audits like that. Happy to know the profile of a server but then hating to have to justify everything their "report" "concludes" (95% of which is usually just dressed up too output from Nessus or whatever).
    Problem is with appliance servers running a packaged application like LMS, mucking with the OS settings (rc files etc.) can break things in unexpected ways. I'm more in favor of putting it on a segmented network and applying access-control lists or firewall rules inbound vs. trying to take apart the system and put it back together using only the parts you think are necessary (a bit of hyperbole there but it's to make a point).
    Call it defense in depth and declare victory and then move on with using the tool to actually manage the network instead of defending its configuration to the Stasi.

  • RMIregistry: Port 1099 already in use

    When I start rmiregistry, I get the following exception:
    java.rmi.server.ExportException: Port already in use: 1099
    What could be using Port 1099? How do I find out the mapping between ports and services? Thanks?

    Alpha_Lord, I'm sorry I don't understand what you're talking about.
    I don't remember posting the same question twice. If it was, it might've been because I refreshed the browser because the loading hang. And, if it wasn't, maybe someone else posted the same question.

  • Unknown open TCP ports on router

    Anyone know how to close these open ports on my Cisco 7606 router?
    Anyone know what these TCP ports are used for?
    49   - Not sure what this one is other than what IANA reports about TCP port 49
    4510
    4509
    2222
    I'm sure I could add an ACL to block communications to my router based on this ports but would rather figure out how to close 'em so this already overloaded router doesn't have additional processing.
    Cisco-7606# sh tcp br all
    TCB       Local Address           Foreign Address           (state)
    12EFC1C0  172.16.8.3.14401        10.8.2.14.49              TIMEWAIT
    1CC4F57C  172.16.8.3.26963        10.8.2.14.49              TIMEWAIT
    1A419F90  0.0.0.0.4510            *.*                       LISTEN
    1C581740  0.0.0.0.4509            *.*                       LISTEN
    1A417BBC  0.0.0.0.2222            *.*                       LISTEN
    12FB03A8  10.8.10.2.2222          10.8.1.42.4690            CLOSEWAIT
    12FB099C  10.8.10.2.2222          10.8.1.42.2233            CLOSEWAIT
    12FA7DF0  10.10.0.3.2222          10.8.1.15.4878            CLOSEWAIT
    1CD47780  10.10.0.3.2222          10.8.1.15.3917            CLOSEWAIT
    1CDDBCE0  10.8.10.2.2222          10.8.1.42.3964            CLOSEWAIT
    Cisco-7606# sh ver | i image
    System image file is "disk0:c7600rsp72043-advipservicesk9-mz.122-33.SRD3.bin"
    Tks
    Frank

    Frank
    I can offer some suggestion about one of your port numbers. TCP port 49 is used for TACACS. If you are using TACACS for authentication, or authorization, or accounting then we know why port 49 is open and blocking TCP49 will prevent TACACS from working with your router.
    I have no insights or suggestions about the other port numbers that you mention.
    HTH
    Rick

  • Address already in use,Please help me!

    I install solaris in vm6.
    At first ,it will run fine,but today when i restart it , I get these error
    inetd[337]:Failed to bind to the port of service instance svc:/network/swat/tcp:default,proto tcp:Address already in use.
    Too many bind failures for instance svc:/network/swat/tcp/:default, transitioning to maintenance
    in.ndpd[333] :solicit_event:giving up on pcn0
    syslogd:line 24:WARNING:loghost could not be solved.then i can login but when i connect it with ssh , I will be disconnected every 1-2 minutes,Please help me,
    Thanks very much

    Have you received any help on this issue..I'm seeing the same thing on one of my servers, alhoug I don't get disconnected...This error is spitting out to the console upon boot up..

  • Port 80 In Use

    Attempting to run Apache 2.2.9 on a freshly updated system; can't get it to start, however, as something else appears to be holding port 80 and is denying a socket connection.  I haven't any idea what service it is, other than what I can garner from
    a quick probe via a telnet client:
    HTTP/1.1 400 Bad Request
    Content-Type: text/html; charset=us-ascii
    Server: Microsoft-HTTPAPI/2.0
    Date: Wed, 04 Feb 2015 15:12:57 GMT
    Connection: close
    Content-Length: 326
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
    <HTML><HEAD><TITLE>Bad Request</TITLE>
    <META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
    <BODY><h2>Bad Request - Invalid Verb</h2>
    <hr><p>HTTP Error 400. The request verb is invalid.</p>
    </BODY></HTML>
    netstat -ao identifies it as PID 4, but that's simply "System", so it leads nowhere.
    Older information mentioned this could be the Web Deployment Agent Service but this doesn't appear to exist in Win10.  There's no good information in the Firewall or Event Viewer.

    Hi,
    The TCP port: 80 is used by System by default. For your problem, is there any detailed error message with this problem?
    In my opininon, it would be better to use Process Monitor to captuer the Apache start process to find the reason of this problem.
    You can access to the link below to download Process Monitor:
    https://technet.microsoft.com/en-us/sysinternals/bb896645.aspx
    How to capture a Process Monitor trace:
    http://blogs.msdn.com/b/dswl/archive/2010/01/10/how-to-capture-a-process-monitor-trace.aspx
    Learning Example:
    Using Process Monitor to Troubleshoot and Find Registry Hacks:
    http://www.howtogeek.com/school/sysinternals-pro/lesson5/all/
    Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    On the other hand, if your doubt the port 80 was using by other unknown process, it would be better to use Network Monitor to capture the trace of port 80.
    Roger Lu
    TechNet Community Support

  • Port '22' is already in use (px2-300d)

    I used to be able to ssh to my px2-300d, using ssh -l root root px2-300s.local password: sohorootpassword
    Suddenly, today, trying to 'Allow remote access for support (SSH and SFTP)' on the Support Diagnostocs page of my NA (http://px2-300d.local./manage/diagnostics.html) I am unable to set the 'Root Password', because when I hit 'Apply', it comes back with a pop-up window saying 'Port '22' is already in use'.
    I tried to restart the NAS (and my home computer), but the problem remains, and I ran out of ideas how to get back to being able to ssh to my NAS.
    The reason I need this is a) occasionally I must fix some files in a way that would be a chore by using sftp, which somewhat surprisingly works, as I assume sftp is using port 22!, b) I can't stand having a computer (and the NAS is one of them) and not be able to login to it.
    Peter
    px2-300d Firnware 4.0.6.19294 BIOS R00T12
    ssh from a MacBook Pro running Snow Leopard
    Port scan:
    Port Scan has started…
    Port Scanning host: 10.0.1.15
    Open TCP Port: 21     ftp
    Open TCP Port: 22     ssh
    Open TCP Port: 80     http
    Open TCP Port: 111    sunrpc
    Open TCP Port: 139    netbios-ssn
    Open TCP Port: 443    https
    Open TCP Port: 445    microsoft-ds
    Open TCP Port: 548    afpovertcp
    Open TCP Port: 873    rsync
    Open TCP Port: 34309
    Port Scan has completed…
    Solved!
    Go to Solution.

    Hi pbernus,
    Is SFTP enabled on the protocols page? You may need to disable it to enable SSH since they use the same port number.
    Have questions and need answers?
    Search the database for answers to FAQ's, software/driver downloads, tutorials, news, features and more!
    LenovoEMC Support & Downloads
    LenovoEMC North America Support Contact Page

  • Should I install Apache Web server to use Jakarta Tomcat Servlet engine?

    Hello,
    I have some problems and now have a question:
    Should I install Apache Web server to use Jakarta Tomcat Servlet engine?
    JTK home page is available via http://localhost:8080
    Tomcat ver 3.1.3
    Thanks.

    No, you don't need to run Apache webserver (httpd) to run Tomcat. Tomcat by default runs on port 8080, but you can set it to any port, including 80, if you have permission to do so (on *nix systems, you need root permissions to run services on any port below 1024).
    Tomcat is a webserver as well, just one that includes a servlet container and JSP processor. So it will serve your html files, images, etc (aka static content), just as well as Apache httpd, in addition to being able to run servlets and JSPs.
    Apache httpd has more options for serving static content than Tomcat, so many people prefer to use it as their main webserver and only use Tomcat as a sort of "plugin" to handle servlets and JSPs. This can be achieved through a connector. Instructions on how to set this up are on the Jakarta website.
    So you could use Apache and Tomcat combined, next to each other, or totally separated. In many cases, just Tomcat will do.

Maybe you are looking for