Socket connection refused - please help!!!!

My socket programs dont work in linux it shows error -
ot@localhost winc]# java parser
Exception in thread "main" java.net.SocketException: Invalid argument or cannot assign requested address
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.<init>(Socket.java:309)
at java.net.Socket.<init>(Socket.java:124)
at parser.main(parser.java:10)
Even the basic client server programs show this kind of error in linux. what is the cause for it? And the same programs work perfectly when run in windows. i have removed the firewall settings etc and it still doesnot work in linux
Please help me solve the problem . it is very urgent.

Actually i don't know how the firewall can cause the problem, can u please explain me.
Here is the stack trace.
INFO: Thread-3::Wed Dec 03 11:27:00 EST 2008 : resetConnection-->Connection couldn't be established with the Outbound message receiver at: 157.21.29.121:4996
Dec 3, 2008 11:27:05 AM com.lsc.hl7.handler.THOutboundProperties log
INFO: Thread-3::Wed Dec 03 11:27:05 EST 2008 : resetConnection-->Trying to reconnect[in IOException]........
The Message is: Connection refused: connect
The exception trace is :
java.net.PlainSocketImpl.socketConnect(Native Method)
java.net.PlainSocketImpl.doConnect(Unknown Source)
java.net.PlainSocketImpl.connectToAddress(Unknown Source)
java.net.PlainSocketImpl.connect(Unknown Source)
java.net.SocksSocketImpl.connect(Unknown Source)
java.net.Socket.connect(Unknown Source)
java.net.Socket.connect(Unknown Source)
com.lsc.hl7.handler.THOutboundConnHandler.resetConnection(THOutboundConnHandler.java:129)
com.lsc.hl7.handler.THOBHandlerThread.sendMailAndLogAboutORUReceiverConnectionLoss(THOBHandlerThread.java:199)
com.lsc.hl7.handler.THOBHandlerThread.run(THOBHandlerThread.java:118)

Similar Messages

  • ORACLE 9.2.0 thin Connection Refused  Please Help.

    I am using the ojdbc14.jar ORACLE JDBC driver. I have installed it in a folder d:\bpa\oracle. I have also set the classpath using the eclipse IDE to the file. I can register the driver no problem
    However when I try to connect I get the following Connection refused error:
    java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153093120)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
         at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3678)
         at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:352)
         at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:365)
         at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:547)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:347)
         at java.sql.DriverManager.getConnection(Unknown Source)
         at java.sql.DriverManager.getConnection(Unknown Source)
         at Helloworld.main(Helloworld.java:30)
    My code is very simple at the moment as I am just testing this stuff:
    public class Helloworld {
         public static void main(String[] args)
              try {
                   Class.forName("oracle.jdbc.driver.OracleDriver");
              } catch (ClassNotFoundException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         try {
    DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
              Connection con = DriverManager.getConnection("jdbc:oracle:thin:@203.56.110.153:1521:IDBP", "system", "manager");
         System.out.print(" This has succeeded" );
         } catch (SQLException e1) {
              // TODO Auto-generated catch block
              e1.printStackTrace();
              return;
         } finally{
              System.out.print("This is a another test");
    I have done the Telnet thing and there is no response that says cannot connect . I am sure NOT how to be certain that my telnet session is OK because the cmd prompt does not come back with anything. just blank.
    Do I need the oracle client on my machine when I try to run this?... I did not think so...
    I am a java newbie so pleeeeeeeeez help

    Please, please, please, please do not use the "SYSTEM" account (unless you are a super-duper Oracle DBA and actually want to modify the way Oracle works).
    The SYSTEM and SYS accounts are special and primarily for Oracle internal stuff; I'm a 50%-time Oracle DBA and I log in as one of them no more than 6 times a year. I believe it's possible that those accounts can be configured to require local access, which could your problem.
    The best way to debug Oracle connection problems (if it doesn't work in JDBC and you don't have a clue), is to figure out your credentials and connection strings using some other product. Oracle's SQL*PLUS client (not the web-based iSQL thingie, but the standalone client) is good for sorting out credentials and confirming remote DB reachability, which is often the problem, but it's not a JDBC-based product and configuring it is a little arcane too if you don't have a handy DBA to help. Still, it's a very powerful tool.
    There are also lots of Java/JDBC generic clients, pehaps the simplest to get up and running is HenPlus (sort of a generic SQL*Plus, actually).
    http://henplus.sourceforge.net/
    Read the docs, but basically you just give it a JDBC driver and a connection URL and it works (or doesn't). If you can't get that working, then you know there's a problem with the IP, the SID or service (you're using SID format) or the user credentials.

  • Can't connect RFCOMM socket: Connection refused

    I am trying to use my mobile as bluetooth modem but I am stuck at the initial step.
    shadyabhi@archlinux-N210 ~ $ rfcomm connect 0
    Can't connect RFCOMM socket: Connection refused
    My rfcomm.conf:
    rfcomm0 {
    # # Automatically bind the device at startup
    bind yes;
    # # Bluetooth address of the device
    device 00:25:47:9F:AA:07;
    # # RFCOMM channel for the connection
    channel 2;
    # # Description of the connection
    comment "Nokia N73";
    Guyz, please help me solve the issue. I have tried googling but no luck. And I already have my laptop as trusted devices in my phone.

    i don't know how and why but appeared a new device on my phone called "james1711" and with this my pin is accepted when i type rfcomm connect 0; but after one minute of trying to connect appear another error in the shell:
    Can't connect RFCOMM socket: Resource temporarily unavailable

  • I just got the new ipod touch (5th generation) and it will show up on my computer but it will not show up on itunes and it won't connect. Please help!

    I just got the new ipod touch (5th generation) and it will show up on my computer but it will not show up on itunes and it won't connect. Please help!

    See:
    iOS: Device not recognized in iTunes for Windows
    You need iTunes version 10.7

  • I lost my iPhone 3 days ago.. it wasn't connet to internet and I don't know how find it without the connection.. please help me and give me some advices!!

    I lost my iPhone 3 days ago.. it wasn't connet to internet and I don't know how find it without the connection.. please help me and give me some advices!!

    Change your passwords.

  • I am have trouble with 2 new 21.5" iMacs losing wifi connection from my network. I have 4 other vintage iMacs that never lose connection. Please help.

    I am have trouble with 2 new 21.5" iMacs losing wifi connection from my network. I have 4 other vintage iMacs that never lose connection. Please help.

    This subject has been talked/written about a lot, after Lion was introduced. A solution from Apple has not yet been published, everybody is waiting.
    Try for instance https://discussions.apple.com/thread/3734081?start=15&tstart=0, but there are more discussion groups with the same subject: frequently lost WiFi-connections in newer Macs running Lion or up.

  • Have updated my ipad2 to IOS6 , but now Iam unable to make facetime over wifi ...it keeps displaying connection lost. please help

    Have updated my ipad2 to IOS6 , but now Iam unable to make facetime over wifi ...it keeps displaying connection lost. please help.
    Also my facebook application is also not working .it just hangs itself. tried uninstalling and reinstalling. yet it isnt working. please help

    Try This...
    Close All Open Apps...  Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430

  • Network Connection Was Refused - PLEASE help me this time...

    To be perfectly honest, I'm quite irritated. I want answers. And if there is no answer, I want someone to tell me such. I've posted three times before, twice on someone else's topic, and once on my own. This is my last ditch effort. PLEASE help me. I really enjoy the use of your product, and I don't want to give up on it.
    Many people are having issues with their network connection. I know I'm not the only one. Some diagnostics say the connection to iTunes works, but for some reason still won't open the music store. In my case, it says it isn't.
    I went to my parents' house this holiday and stole their broadband high speed internet connection, hoping that the new connection might make iTunes work. Nope. So now I'm fresh out of ideas.
    Here is the information I posted on an earlier post below. PLEASE help me answer my question. I'm really missing my iTunes. It's been a long time since I've had it, and there are a bunch of songs I plan to download if I am able to get it back. Thank you so much!
    I downloaded the newest version of iTunes, without realizing that there were so many problems with it. The installation went off without a hitch, and it was able to open up my library. However, whenever I try to access the music store, the message "iTunes could not connect to the Music Store. The network connection was refused. Make sure your network settings are correct and your network connection is active, then try again" appeared. I tried redownloading it, but that didn't solve the problem. I got frustrated, and finally was able to download 7.01. That didn't work either. So I downloaded the older version that I used to have. The same error message appeared. NOW I'm mad, because I can't even get the older version back. I want my older version back... I never had a problem with your products before, but right now I'm slowly losing faith. PLEASE help me.
    I can't run a diagnostics on my network connection anymore, but I had posted my first diagnostics on the old post, referencing back to when I was still trying to fix the newest version. I'll post the diagnostics below the post.
    I have a wireless connection, since I live in an apartment complex right now. I didn't have the same connection type when I first downloaded iTunes a year or more ago, but I was able to work iTunes under this connection before I uploaded.
    Please help me. I want my music store back.
    Microsoft Windows XP Home Edition Service Pack 2 (Build 2600)
    Dell Computer Corporation Inspiron 1150
    iTunes 7.0.2.16
    Current user is an administrator.
    Network Adapter Information
    Adapter Name: {7BAB081D-F40E-4AF6-97A6-1C8958EEC8C7}
    Description: Dell Wireless WLAN 1350 WLAN Mini-PCI Card - Packet Scheduler Miniport
    IP Address: 172.17.0.73
    Subnet Mask: 255.255.255.0
    Default Gateway: 172.17.0.1
    DHCP Enabled: Yes
    DHCP Server: 172.17.0.1
    Lease Obtained: Wed Nov 08 16:19:50 2006
    Lease Expires: Thu Nov 09 04:19:50 2006
    DNS Servers: 172.17.0.1
    24.196.64.39
    24.196.64.40
    Network Connection Information
    Active Connection: LAN Connection
    Connected: Yes
    Online: Yes
    Using Modem: No
    Using LAN: Yes
    Using Proxy: No
    SSL 3.0 Support: Enabled
    TLS 1.0 Support: Disabled
    Firewall Information
    Windows Firewall is off.
    Connection attempt to Apple web site was unsuccessful.
    The network connection was refused.
    Connection attempt to iTunes Store was unsuccessful.
    The network connection was refused.
    Secure connection attempt to iTunes Store was unsuccessful.
    The network connection was refused.

    this is atleast the third theard i have found on this... SOMEONE AT APPLE PLEASE HELP.. I HAVE THE SAME PROBLEM!!!

  • Connection refused. Help please!

    hi guys, i used the following code to try to connect to sql server 2005.
              try {             Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");             Connection conn = DriverManager.getConnection("jdbc:sqlserver://localhost;integratedSecurity=true");                   } catch (Exception e) {             e.printStackTrace();         }
    and i got the following exception:
    com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host  has failed. java.net.ConnectException: Connection refused: connect         at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)         at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)         at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)         at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)         at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
    i know this question might have been asked but i was unable to find out the solution from previous posts.
    thanks very much.
    Edited by: J.T on 08-Oct-2008 16:04
    Edited by: J.T on 08-Oct-2008 16:31
    Edited by: J.T on 08-Oct-2008 16:32

    The error is probably caused by the port number where the SQL Server is listening for the client connection.
    If port number is different than the default number, you must specify the port number in the connection url
    Also check the API for getConnection
    [http://java.sun.com/j2se/1.4.2/docs/api/java/sql/DriverManager.html]
    Connection conn = DriverManager.getConnection("jdbc:sqlserver://localhost:portnumber;username,password");

  • My computer does not recognize the Airport Connection.  Please Help

    I just purchased the Apple Base Station and Apple Extreme. My internet connection is made through a DSL Modem(My carrier is Frontier Communications). I am having a very hard time getting my computer to recognized the Airport. Can someone please help me. Thanks

    Unplug the modem power. Connect an ethernet cable from the modem to the AEBS WAN (circle of dots port. Connect an ethernet cable to the LAN (<->) port, and to the ethernet port on your computer. Run the AirPort Admin utility. Configure your base station, giving it a name, administrator password, network name (SSID) and a password. Select a Configure option (ethernet or PPPoE, fill in any ISP information. Update the base station. Disconnect your computer.
    Shut Down the computer. Make sure your AirPort Extreme card is firmly snapped into its socket, and that the antenna wire if snapped into place. Boot up. On the computer, go to System Preferences>Network and make sure PPPoE is disabled on your Ethernet Tab. You should now be able to see your network in the AirPort Menulet. Log on to your network and see if AirPort Admin Utility can be run (it should). Quit AirPort Admin Utility.
    Plug in the power to the modem and run a web browser. Can you connect to the internet (you should be able to)?

  • Socket Connection - Character Set - Help

    Hello:
    I am creating a socket using UTL_TCP package. After making a successful connection, I have to send data in ISO-8859 format. The message should look something like this.
    STX followed by data in ascii followed by ETX.
    STX and ETX are ascii for 2 and 3.
    I have the data in STRING. example 'DOWNLAOD ME TO THE SERVER'. This string is currently in VARCHAR2 variable.
    I would like to know how can I convert the above data to ASCII string and then prefix it with STX and suffix with ETX before I send it down the socket. I think I have to use utl_encode package but am not sure where to start.
    Please help.
    Thanks.

    Do not understand your problem. It seems to me that you simply need to create a varchar2 string that contains the ASCII text you want to transmit via TCP using the socket connection you have creared, using the API call UTL_TCP.WRITE_LINE (write string without a TCP linefeed char) or UTL_TCP.WRITE_LINE (with linefeed).

  • Network connection problems, please help!

    I have had an iPod Touch (4th generation) for over a year now and it worked fine. Today, something went wrong with my network connection. One moment it says that I'm connected to a network, and a few seconds later it says I'm not connected... Then a few seconds later it's connected again. I have full wifi bars, and it does it throughout my whole house. The wifi symbol keeps going on and off. I tried turning my Verizon Westell Model 6100G Modem off and back on because this normally fixes my wifi connection problems. This didn't work. Then I tried turning my iPod off and back on. This didn't work. I tried turning the wifi off and back on. This didn't work. I tried forgetting my network and signing back in. This didn't work. I also tried resetting the network, and this didn't work either. I'm not having any connection problems with my laptop, it's working fine. It's only my iPod. I'm still able to use the wifi, but for a split second, it will not work. I'm not sure what else to do. It's very annoying! I'm going to see if it does this at other peoples houses with their wifi. Can any one tell me what's wrong and how I should fix it? My only theory is a broken antenna...Please help! Thanks!

    I have two things you could try.
    1. Plug your iPod into the host computer that which the network is based around because sometimes the network has trouble identifying a device if it has been a while since you plugged it into the computer.
    2. Find some way to get your network information (IP address, Subnet Mask, Router, DNS numbers) from another device on the network (e.g. laptop). Then go to Settings > Wi-FI and find your router and tap the blue arrow to the right of the name and tap the tab that says "Static" and enter this information accordingly. Then exit back to the network names menu and re-enter your passcode for your network (assuming you have a passcode)

  • New Infinity connect issues - please help

    We are having ongoing issues with getting BT infinity installed to our new house.  I really need someone that can actually help us find out what is wrong and how we can resolve the issues we are having.
    It all started a few months ago when we ordered BT infinity and a new phone line to our new Chapel conversion house.
    Initially there were some issues with the engineer being unable to get the phone line to the house. After numerous phone calls and several engineers visits, we these have now been resolved and we do have a working telephone.
    The problem seems to be with the Infinity. Nobody can give me an answer as to why we have not yet got a connection.
    When the phone engineer visited he said that he would try and connect the Infinity in the green box. – When he went to do this he tried to obtain our patching information and was informed that there was no live order for infinity on our number… As there was nothing more he could do he left.
    We then checked with BT and they confirmed that we do have an order for infinity and that there was a problem that needed and engineer to look at. (We have a box and are paying for the service already…
    We were told last week that an engineer was going to attend on Monday 13th Jan and that we definitely would have a connection by last Monday at the latest… - no engineer attended despite my wife spending her 3rd day in the house waiting for an engineer!
    She phone BT on Tuesday and was told that there was a problem and she would be contacted by Thursday Morning at the latest. – Needless to say , No phone call!!
    We really need to sort this connection out.  Is there anyone who can take this and run with it until it’s sorted? – We are getting nowhere talking to random individuals who have no real history of our connection history.
    Please Help!
    Doug

    Hi dougchapel,
    Thanks for posting and welcome!
    I'm sorry for the problems you're having getting set up on BT Infinity.  I can help get you sorted from here.  Click on my username and under the "about me" section you'll see the link to get in touch with us.
    Cheers,
    Robbie
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • Firefox won't establish a connection. Please help

    Hello,
    My Mozilla Firefox has worked for ages and all of a sudden when my father tried to open it, it came up with a message saying:
    'Unable to connect
    Firefox can't establish a connection to the server at www.ebay.com.au.
    The site could be temporarily unavailable or too busy. Try again in a few
    moments.
    If you are unable to load any pages, check your computer's network
    connection.
    If your computer or network is protected by a firewall or proxy, make sure
    that Firefox is permitted to access the Web.'
    I have checked all the settings and everything looks right, my internet is connected fine, other apps using the internet works fine, I have checked the fire wall and I have tried to troubleshoot problems. Nothing seems to be working it just keeps saying the same thing. I don't know what else to do, can someone please help me? I need to get it working before tomorrow because my father uses it and he knows how to use it and where everything is. Please, please help.
    Thank-you heaps!
    Zoe

    UAC is turned off ?
    Did you firefox "Run as administrator" ?
    thanks

  • Ipod error message when connected. Please help

    Windows XP
    I have had my 30 gigabyte ipod for almost a year and i've never had any problems with it before. But recently our area wasn't able to get broadband. So i was unable to download the recent ipod and itunes updates. I have done that now.. but i think something has affected my ipod. When i plug it into my computer nothing comes up on my ipod screen and i can continue browsing music etc.. i know this isn't supposed to happen. And on my computer an error message comes up saying "USB device not recognized. One of the USB devices attached to this computer has malfunctioned, and Windows does not recognise it. "
    Please help me!

    Okay. So i'll tell you the steps i have taken. I've uninstalled all the ipod updaters i had on my computer, eg 2006 and 2005.. and i reinstalled the latest version of itunes. I also went to device manager and all that but it only came up in the list at "unknown device" and i uninstalled the driver and tried to reinstall it but it came up saying it was an unknown device again. I tried right clicking on it and going "scan for hardware updates" but it told me the one i have installed is the nearest match. I also tried connecting my ipod to my computer in disc mode which did nothing. But i have discovered my ipod charges when i plug it in.. but the computer freezes on the black dos screen (as it always has for me when i turn the computer on with the ipod plugged in) and the ipod remains charging. but it seems if i plug it in after windows has loaded it's not even recognised.
    I'm sorry for making it so long but i really really need help

Maybe you are looking for