Connection refused is not raising an exception

Hi, I am having problems getting my code to recognise that a url refuses a connection, eg "http://tigers.com.au".
Opening the url in a browser correctly shows that a connection is refused.
However, in Java (1.6_07) code as below, no exception is raised, and the response code is 200 OK.
Even though no exception is raised, the content that is returned by the InputStream is actually from somewhere else (my local development server), so it seems that the connection is not actually successful.
The code works fine for other urls that does accept a connection, eg it works fine for "http://www.tigers.com.au".
Why is my code not raising an exception for cases where the url refuses a connection? Or is there a bug in Java?
Grateful for any help.
          BufferedReader in = null;
          String s=null;
          HttpURLConnection urlCon = null;
          URL url = null;
          try {
               url = new URL("http://tigers.com.au");
               urlCon = (HttpURLConnection) url.openConnection(); 
               urlCon.connect();
               System.out.println("urlCon after connect: "+urlCon.getURL());
                     System.out.println("Response code: ["+urlCon.getResponseCode()+"] "+urlCon.getResponseMessage());
               in = new BufferedReader( new InputStreamReader(urlCon.getInputStream()));
               while ( (s=in.readLine()) != null) {
                    System.out.println("s: "+s);                    
          catch (Exception e) {
               System.out.println("Exception: "+e);
          }

Have found that wildcard addresses matches any address of the local system, and that in IPv4, the wildcard address is 0.0.0.0. Can check for this with InetAddress.isAnyLocalAddress().
This means that I could potentially handle these cases by adding code to "ping" a host such as "tigers.com.au" using
InetAddress address = InetAddress.getByName(name);
if (InetAddress.isAnyLocalAddress() {
.... do something, eg raise exception
}But this is not fully satisfactory, as I would rather know that a "connection refused" exception is raised, which is actually the case with "tigers.com.au" (as all the browsers seem able to detect). I am not entirely sure what the relationship is between a site that has "connection refused" and it returning an ip address of 0.0.0.0. I don't think they are synonymous.
Any thoughts?

Similar Messages

  • ACE connection refused but not when accesing directly the server

    Hello,
    I am facing the following problem when I try to load a specific webpage using the VIP:
    If I skip the load balancer and hitting the real server, then the page is correctly loaded:
    I capture traffic and I saw that the VIP sends a 400 http error to both real server and to my laptop IP (10.160.8.73)
    Has someone any idea why this is happening?
    Thanks in advance
    Ion

    Hi,
    This may help you:
    The ACE's tengig port is always /1.
    Let's say your ACE is in slot 3. It's backplane interface would then be
    Te3/1. You then use
    the monitor command to configure the source (SPAN) port to this interface.
    monitor session 1 source interface TenGigabitEthernet 3/1 both
    monitor session 1 destination interface GigabitEthernet x/y
    monitor session 1 filter vlan 510 - 511 , 640 , 652 - 656        <---- Line
    is optional and will capture only specified VLANs
    Configure the destination (SPAN) port as a trunk port so that the VLAN IDs
    will be preserved:
    interface Gix/y
    switchport
    switchport trunk encapsulation dot1q
    switchport mode trunk
    switchport nonegotiate
    Be sure that the network analyzer connected to the destination port can
    monitor VLAN tags
    (a trunked port). Here is a link on how to configure NICs using some of the
    Intel chipsets to
    pass the VLAN tagging info:
    http://support.intel.com/support/network/sb/CS-005897.htm
    Wireshark has posted this info, as well as how to configure NICs with the
    Broadcom chipset:
    http://wiki.wireshark.org/CaptureSetup/VLAN#head-e0dc0f9fe0cc6b1b1866d78da7b97ead34dca1d8
    With IOS Release 12.2(18)SXD and later releases, when a destination port is
    a trunk, you can
    use the list of VLANs allowed on the trunk to filter the traffic transmitted
    from the
    destination port.  This should not be necessary if you configured the
    optional 'filter' line
    in the monitor session configuration.
    interface Gix/y
    switchport
    switchport trunk encapsulation dot1q
    switchport trunk allowed vlan 102, 103
    switchport mode trunk
    switchport nonegotiate
    For additional information, see:
    http://www.cisco.com/en/US/docs/switches/lan/catalyst6500/ios/12.2SXF/native/configuration/guide/span.html#wp1036881
    http://www.cisco.com/en/US/products/hw/switches/ps708/products_tech_note09186a008015c612.shtml#topic6
    Cesar R
    ANS Team

  • Erratic connection refused exception

    Hi all,
    I have a thread in my program that periodically tries to do a Naming.lookup to a remote machine, and proceeds to do other things if there is no exception (this may be compared roughly to pinging the remote server to see if it is up and running).
    While this works fine on most occasions, I sometimes get exceptions like:
            Connection refused to host: remotehost; nested exception is:
            java.net.ConnectException: Connection refused: no further informationfor no apparent reason. This persists for a few cycles of the thread, after which, again for no apparent reason, my client is able to do a Naming.lookup as usual.
    I've made sure that the network connection between the two machines is active, and both of them are alive when these exceptions occur, so I'm not able to pin down the problem.
    I'm starting up a rmiregistry instance in the remote server using LocateRegistry.createRegistry(1099), instead of starting the rmiregistry program from the command line. Could this be a cause for problem?
    I'm using Windows 2000 server with jre 1.3.1 on both machines.
    Thanks,
    Sudarshan

    1. Sometimes just putting in a retry works. Set up a loop and do a naming and if a connection error, wait a few seconds and try it again.
    2. Why do you need multiple look-ups? Once your client gets the remote object there is no longer any need for the RMI Registry. Save the remote object and call the Server directly.

  • Connection refused to host: connection timed out

    I have been struggling with this problem a couple of days now so I really hope someone can help me. I am trying to get rmi to work in a NAT environment. We use a firewall, so I have opened port 1099 and 2020 which I use as a fixed port for communication (just to be sure it is not a firewall thing); I use the following code:
    //server
    public class ComputeEngine extends UnicastRemoteObject
    implements Compute
    public ComputeEngine() throws RemoteException {
    super();
    public String getMessage() {
    return "you have successfully connected to the server";
    public static void main(String[] args) {
    if (System.getSecurityManager() == null) {
    System.setSecurityManager(new RMISecurityManager());
    try {
    String port = args[0];
    try {
    RMISocketFactory.setSocketFactory(new FixedPortRMISocketFactory(Integer.parseInt(port)));
    } catch (IOException e) {
    e.printStackTrace();
    LocateRegistry.createRegistry( 1099 );
    catch (RemoteException e1) {
    e1.printStackTrace();
    String name = "rmi://localhost/Compute";
    try {
    Compute engine = new ComputeEngine();
    Naming.rebind(name, engine);
    System.out.println("ComputeEngine bound");
    while(true); //stay alive
    } catch (Exception e) {
    System.err.println("ComputeEngine exception: " + e.getMessage());
    e.printStackTrace();
    public Socket createSocket(String host, int port)
    throws IOException {
    System.out.println("creating socket to host : " + host + " on port " + port);
    return new Socket(host, port);
    * Create a server socket on the specified port (port 0 indicates
    * an anonymous port) and writes out some debugging info
    * @param port the port number
    * @return the server socket on the specified port
    * @exception IOException if an I/O error occurs during server socket
    * creation
    * @since JDK1.1
    public ServerSocket createServerSocket(int port)
    throws IOException {
    port = (port == 0 ? portnumber : port);
    System.out.println("creating ServerSocket on port " + port);
    return new ServerSocket(port);
    //client
    public class ComputePi {
    public static void main(String args[]) {
    if (System.getSecurityManager() == null) {
    System.setSecurityManager(new RMISecurityManager());
    try {
    String name = "rmi://" + args[0] + "/Compute";
    Compute comp = (Compute) Naming.lookup(name);
    System.out.println("connected to server");
    System.out.println(comp.getMessage());
    } catch (Exception e) {
    System.err.println("ComputePi exception: " + e.getMessage());
    e.printStackTrace();
    I start the client with:
    java -Djava.security.policy=policy.all -jar client.jar 194.2.4.6:1099
    I start the server with:
    java -Djava.rmi.server.codebase="file:/C:\RMI\\server.jar" -Djava.rmi.server.hostname="194.2.4.6" -Djava.security.policy=policy.all -jar server.jar 2020
    As you can see I set the "-Djava.rmi.server.hostname" property which should be a solution to the NAT problem. However I keep getting the following exception!!??!!:
    ComputePi exception: Connection refused to host: 194.2.4.6; nested exception is:
         java.net.ConnectException: Connection timed out: connect
    java.rmi.ConnectException: Connection refused to host: 194.2.4.6; nested exception is:
         java.net.ConnectException: Connection timed out: connect
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
         at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
         at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
         at sun.rmi.server.UnicastRef.newCall(Unknown Source)
         at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         at java.rmi.Naming.lookup(Unknown Source)
         at client.ComputePi.main(ComputePi.java:14)
    Caused by: java.net.ConnectException: Connection timed out: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
         at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
         ... 7 more
    Can anyone help me with this, please??????
    kind regards,
    Christiaan

    Yes, i can ping it from the client.
    I have also noticed that when i run my server with the option -Djava.rmi.server.hostname=IP the applications stops automatically after a few minuts...
    I'm not using nothing about codebase. I have the stub and skel classes in server and client machines..
    I add the complete exception:
    Client exception: java.rmi.ConnectException: Connection refused to host: external_IP; nested exception is:
    java.net.ConnectException: Connection timed out: connect
    java.rmi.ConnectException: Connection refused to host: external_IP; nested exception is:
    java.net.ConnectException: Connection timed out: connect
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185
    at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
    at example.hello.Server_Stub.sayHello(Unknown Source)
    at example.hello.Client.main(Client.java:55)
    Caused by: java.net.ConnectException: Connection timed out: connect
    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:426)
    at java.net.Socket.connect(Socket.java:376)
    at java.net.Socket.<init>(Socket.java:291)
    at java.net.Socket.<init>(Socket.java:119)
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirect
    SocketFactory.java:22)
    at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMaster
    SocketFactory.java:128)
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
    ... 5 more

  • IDOC send step not running with exception in BPM?

    Hello,
    hope this is a simple question, but we are running with a problem here which is not answered well in SAP help or sdn. Possibly I didn´t find the right blog.
    Situation:
    We created a BPM with a send step (IDOC receiver) in a block (after a receive step starting the BPM) (That´s simple so far!).
    The send step (async IDOC) in the block is connected in its attributes in field "system error" to an exception branch defined in the same block.
    In this except.branch the process should send back to sender system a message via RFC and the last step in this exception branch is to interrupt the proces.
    But now we tried to do a test. In this test we modified the receiver address of the send step (IDOC reciver) so that the receiver could not be reached, which results in a system error in SXMB_MONI (Service unavailable).
    But this doesn´t work. The BPM starts the send step to the unavailable receiver, SXMB_MONI shows a system error step, but then the BPM continues with the next step after the block without starting the exception branch.
    Any idea why the exception branch is not called?
    Best regards
    Dirk

    Hello again,
    we are one step further now.
    We did the same with an RFC instead of the IDOC send step.
    Same result:
    The service is not reachable. So the step results in an system error.
    But as we could see in the monitoring SXMB_MONI the block with the exception and this send step (RFC) is passed before the step gives back this error!
    So it looks like connection problems do not trigger an exception?
    Any help is welcome!
    Best regards
    Dirk

  • Please Help - Connection Refused

    Hello,
    I am having trouble connecting to cloudscape database, have been working OK for the past
    couple weeks with an application that I have writen but now big problems!
    java -Djdbc.drivers=COM.cloudscape.core.RmiJdbcDriver Testjava.sql.SQLException: Connection refused to host: localhost; nested exception is:
    java.net.ConnectException: Connection refused: connect
    at RmiJdbc.RJDriver.connect(RJDriver.java:156)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:140)
    at COM.cloudscape.core.RmiJdbcDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:193)
    at Test.getConnection(Test.java:14)
    at Test.main(Test.java:54)
    *I am running cloudscape
    *set the class paths to point at
    - RmiJdbc.jar
    - cloudclient.jar
    I have written a small test program to check problem,
    //////////////////////////////////CODE LISTING/////////////////////////////////////////////
    import java.sql.*;
    import java.util.*;
    public class Test
    { static Connection conn = null;
    static Statement stmt = null;
    static ResultSet rset = null;
    private Test()
    public static Connection getConnection(String url) throws SQLException
    { DriverManager.setLoginTimeout(10);
    return DriverManager.getConnection(url);
    public static void close(Statement stmt)
    { if(stmt != null)
    { try
    { stmt.close();
    }catch(Exception e)
    { e.printStackTrace();
    public static void close(Connection conn)
    { if (conn != null)
    { try
    { conn.close();
    }catch(Exception e)
    { e.printStackTrace();
    public static void close(ResultSet rset)
    { if (rset != null)
    { try
    { rset.close();
    }catch(Exception e)
    { e.printStackTrace();
    public static void main(String [] args)
    { try
    { String url= "jdbc:cloudscape:rmi://localhost:2005/cloudscapeDB;create=true";
    conn = getConnection(url);
    stmt = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
    }catch(SQLException e)
    { e.printStackTrace();
    close(rset);
    close(stmt);
    close(conn);
    Please Help me!!!!

    It is obvious that noone is going to reply to me, so I have kind of solved this for myself,
    for some unknown reason my origonal program that worked fine doesnt now.!?!?!??!?
    However decided to approach problem from another side, and give both my desk and head a break.
    Below is now how I am connecting to a database and return a connection to it, it works,
    public static Connection getConnection() {
    String databaseName = "jdbc:rmi://" + "localhost" + ":1099/jdbc:cloudscape:CloudscapeDB;autocommit=true;create=true";
    try {
    Class.forName("RmiJdbc.RJDriver");
    } catch (ClassNotFoundException e) {
    System.out.println("PopulateTables: caught getting connection: " + e);
    Connection con = null;
    try {
    con = DriverManager.getConnection(databaseName); // , user, password);
    } catch (java.sql.SQLException se) {
    System.out.println("PopulateTables: caught getting connection: " + se);
    return con;
    Thanks me.

  • Connection refused problem..., please help.

    I am running the server on PC (Windows 98) and I got
    this message:
    java.rmi.ConnectionException: Connection refused to host: 33186; nested exception is:
    java.net.ConnectException: Connection refused: no further information
    I got both server and client policy. So this is the way I run the server:
    java -Djava.security.policy=server.policy CalcServer
    where CalcServer is the name of the server.
    anybody can help please post.
    Thanks,
    Ted.

    sorry, I forgot to run rmiregistry.
    Problem solved.

  • Error while deploying module with iasdeploy : Exception while createXmlDocument() : connection refused

    Hi to you all,
    I work with iAS 6.0 sp2 on Solaris.
    For 1 day, I get that exception when trying to deploy or remove my modules (servlets + JSP) with the iasdeploy tool :
    Exception while createXmlDocument()
    java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native method)
    at com.netscape.server.deployment.WebbAppReg.run(compiled code)
    at com.netscape.server.deployment.WebbAppReg.main(Unknown source)
    The war archive is put in the JAR directory, unpacked in the APPS/modules directory, but the servlets of the module have the null GUID in the registry ({000000 000000 000000}. And so, I have the GX error when trying to invoke them.
    What appends ? Is it a iAS process which is unable ?
    Please help !
    Paul-Emile

    I think you have not put the xml files in the war file.
    You need to put them under WEB-INF/ directory. Manually generate the guids using kguidgen script and try to deploy the war module. It should work fine. If it doesnot work please send me the file. So that I can further investigate and find out where exactly the problem is.Other wise you can use the deploytool.
    Please let me know if this works fine.
    Thanks for visiting our web forum.

  • Lion Server postfix mail not being delivered to mailboxes. "SMTP restriction `reject_invalid_helo_hostname' after `permit' is ignored" and "connect to private/policy: Connection refused" errors.

    All, Im stumped. In fact I have been on the phone with Apple Support and this has been escalated to the top engineers, as I think its got them too..
    Anyway, here is my problem..
    I'm running an Mac Mini with OS X 10.7.4 Server. I have had mail running on it for 2 months or so, without any issues. The mail was actually migrated from 10.6 in March, and It actually went smoothly. I have 3 domains which all recieve mail and they all work (or did up until 2 weeks ago)..
    So the story is this.. I can send mail from my domains, without issue.  imap and dovecot must be working.. cause all the stored mail, can be read with the mail IMAP client.. I can even transfer mail messages from one mailbox to another with Mail client. Sending mail is a breeze, it still works and the recipients still recieve their mail. But I noticed I wasnt getting any mail at all from those mailboxes... no mail, no spam, nothing.. which is unusal. I fired up Server admin and checked out the SMTP log, and this is what it showed for every email recieved: (xxxxxx is just me hiding sensitive info)
    Jul 21 14:25:20 xxxxxxxx postfix/postscreen[65857]: CONNECT from [17.158.233.225]:41909
    Jul 21 14:25:26 xxxxxxxx postfix/postscreen[65857]: PASS OLD [17.158.233.225]:41909
    Jul 21 14:25:26 xxxxxxxx postfix/smtpd[65858]: connect from nk11p03mm-asmtp994.mac.com[17.158.233.225]
    Jul 21 14:25:26 xxxxxxxx postfix/smtpd[65858]: warning: restriction `reject_invalid_helo_hostname' after `permit' is ignored
    Jul 21 14:25:27 xxxxxxxx postfix/smtpd[65858]: warning: connect to private/policy: Connection refused
    Jul 21 14:25:27 xxxxxxxx postfix/smtpd[65858]: warning: problem talking to server private/policy: Connection refused
    Jul 21 14:25:28 xxxxxxxx postfix/smtpd[65858]: warning: connect to private/policy: Connection refused
    Jul 21 14:25:28 xxxxxxxx postfix/smtpd[65858]: warning: problem talking to server private/policy: Connection refused
    Jul 21 14:25:28 xxxxxxxx postfix/smtpd[65858]: NOQUEUE: reject: RCPT from nk11p03mm-asmtp994.mac.com[17.158.233.225]: 451 4.3.5 Server configuration problem; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<nk11p99mm-asmtpout004.mac.com>
    Jul 21 14:25:28 azathoth postfix/smtpd[65858]: disconnect from nk11p03mm-asmtp994.mac.com[17.158.233.225]
    Ok, now what is odd, is these rejected messages are not even appearing in the mail queue in Server Admin. I have no idea why there are not being delivered
    Ive checked my postfix main.cf file and master.cf files they both look ok.. Ive even replaced them with the main.cf.defualt.10.7 and master.cf.default.10.7 files and to no avail... same problem..
    So in summary
    I can send mail out
    IMAP is working on the client end (thus dovecot is) exsisting stored emails can be accessed, read, moved unread etc..
    mail is coming into the sever, but its being rejected. there is NO rejection email sent back to the sender.
    mail is recieved by postfix, but cyrus isnt doing anything with it.. I have no idea where it goes...
    Could anyone shed light on this...
    my main.cf file:
    # Global Postfix configuration file. This file lists only a subset
    # of all 300+ parameters. See the postconf(5) manual page for a
    # complete list.
    # The general format of each line is: parameter = value. Lines
    # that begin with whitespace continue the previous line. A value can
    # contain references to other $names or ${name}s.
    # NOTE - CHANGE NO MORE THAN 2-3 PARAMETERS AT A TIME, AND TEST IF
    # POSTFIX STILL WORKS AFTER EVERY CHANGE.
    # SOFT BOUNCE
    # The soft_bounce parameter provides a limited safety net for
    # testing.  When soft_bounce is enabled, mail will remain queued that
    # would otherwise bounce. This parameter disables locally-generated
    # bounces, and prevents the SMTP server from rejecting mail permanently
    # (by changing 5xx replies into 4xx replies). However, soft_bounce
    # is no cure for address rewriting mistakes or mail routing mistakes.
    # soft_bounce = no
    # LOCAL PATHNAME INFORMATION
    # The queue_directory specifies the location of the Postfix queue.
    # This is also the root directory of Postfix daemons that run chrooted.
    # See the files in examples/chroot-setup for setting up Postfix chroot
    # environments on different UNIX systems.
    queue_directory = /private/var/spool/postfix
    # The command_directory parameter specifies the location of all
    # postXXX commands.
    command_directory = /usr/sbin
    # The daemon_directory parameter specifies the location of all Postfix
    # daemon programs (i.e. programs listed in the master.cf file). This
    # directory must be owned by root.
    daemon_directory = /usr/libexec/postfix
    # QUEUE AND PROCESS OWNERSHIP
    # The mail_owner parameter specifies the owner of the Postfix queue
    # and of most Postfix daemon processes.  Specify the name of a user
    # account THAT DOES NOT SHARE ITS USER OR GROUP ID WITH OTHER ACCOUNTS
    # AND THAT OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM.  In
    # particular, don't specify nobody or daemon. PLEASE USE A DEDICATED
    # USER.
    mail_owner = _postfix
    # The default_privs parameter specifies the default rights used by
    # the local delivery agent for delivery to external file or command.
    # These rights are used in the absence of a recipient user context.
    # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
    #default_privs = nobody
    # INTERNET HOST AND DOMAIN NAMES
    # The myhostname parameter specifies the internet hostname of this
    # mail system. The default is to use the fully-qualified domain name
    # from gethostname(). $myhostname is used as a default value for many
    # other configuration parameters.
    #myhostname = host.domain.tld
    #myhostname = virtual.domain.tld
    # The mydomain parameter specifies the local internet domain name.
    # The default is to use $myhostname minus the first component.
    # $mydomain is used as a default value for many other configuration
    # parameters.
    #mydomain = domain.tld
    # SENDING MAIL
    # The myorigin parameter specifies the domain that locally-posted
    # mail appears to come from. The default is to append $myhostname,
    # which is fine for small sites.  If you run a domain with multiple
    # machines, you should (1) change this to $mydomain and (2) set up
    # a domain-wide alias database that aliases each user to
    # [email protected].
    # For the sake of consistency between sender and recipient addresses,
    # myorigin also specifies the default domain name that is appended
    # to recipient addresses that have no @domain part.
    #myorigin = $myhostname
    #myorigin = $mydomain
    # RECEIVING MAIL
    # The inet_interfaces parameter specifies the network interface
    # addresses that this mail system receives mail on.  By default,
    azathoth:postfix root#
    azathoth:postfix root# less main.cf
    azathoth:postfix root# more main.cf
    # Global Postfix configuration file. This file lists only a subset
    # of all 300+ parameters. See the postconf(5) manual page for a
    # complete list.
    # The general format of each line is: parameter = value. Lines
    # that begin with whitespace continue the previous line. A value can
    # contain references to other $names or ${name}s.
    # NOTE - CHANGE NO MORE THAN 2-3 PARAMETERS AT A TIME, AND TEST IF
    # POSTFIX STILL WORKS AFTER EVERY CHANGE.
    # SOFT BOUNCE
    # The soft_bounce parameter provides a limited safety net for
    # testing.  When soft_bounce is enabled, mail will remain queued that
    # would otherwise bounce. This parameter disables locally-generated
    # bounces, and prevents the SMTP server from rejecting mail permanently
    # (by changing 5xx replies into 4xx replies). However, soft_bounce
    # is no cure for address rewriting mistakes or mail routing mistakes.
    # soft_bounce = no
    # LOCAL PATHNAME INFORMATION
    # The queue_directory specifies the location of the Postfix queue.
    # This is also the root directory of Postfix daemons that run chrooted.
    # See the files in examples/chroot-setup for setting up Postfix chroot
    # environments on different UNIX systems.
    queue_directory = /private/var/spool/postfix
    # The command_directory parameter specifies the location of all
    # postXXX commands.
    command_directory = /usr/sbin
    # The daemon_directory parameter specifies the location of all Postfix
    # daemon programs (i.e. programs listed in the master.cf file). This
    # directory must be owned by root.
    daemon_directory = /usr/libexec/postfix
    # QUEUE AND PROCESS OWNERSHIP
    # The mail_owner parameter specifies the owner of the Postfix queue
    # and of most Postfix daemon processes.  Specify the name of a user
    # account THAT DOES NOT SHARE ITS USER OR GROUP ID WITH OTHER ACCOUNTS
    # AND THAT OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM.  In
    # particular, don't specify nobody or daemon. PLEASE USE A DEDICATED
    # USER.
    mail_owner = _postfix
    # The default_privs parameter specifies the default rights used by
    # the local delivery agent for delivery to external file or command.
    # These rights are used in the absence of a recipient user context.
    # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
    #default_privs = nobody
    # INTERNET HOST AND DOMAIN NAMES
    # The myhostname parameter specifies the internet hostname of this
    # mail system. The default is to use the fully-qualified domain name
    # from gethostname(). $myhostname is used as a default value for many
    # other configuration parameters.
    #myhostname = host.domain.tld
    #myhostname = virtual.domain.tld
    # The mydomain parameter specifies the local internet domain name.
    # The default is to use $myhostname minus the first component.
    # $mydomain is used as a default value for many other configuration
    # parameters.
    #mydomain = domain.tld
    # SENDING MAIL
    # The myorigin parameter specifies the domain that locally-posted
    # mail appears to come from. The default is to append $myhostname,
    # which is fine for small sites.  If you run a domain with multiple
    # machines, you should (1) change this to $mydomain and (2) set up
    # a domain-wide alias database that aliases each user to
    # [email protected].
    # For the sake of consistency between sender and recipient addresses,
    # myorigin also specifies the default domain name that is appended
    # to recipient addresses that have no @domain part.
    #myorigin = $myhostname
    #myorigin = $mydomain
    # RECEIVING MAIL
    # The inet_interfaces parameter specifies the network interface
    # addresses that this mail system receives mail on.  By default,
    # the software claims all active interfaces on the machine. The
    # parameter also controls delivery of mail to user@[ip.address].
    # See also the proxy_interfaces parameter, for network addresses that
    # are forwarded to us via a proxy or network address translator.
    # Note: you need to stop/start Postfix when this parameter changes.
    #inet_interfaces = all
    #inet_interfaces = $myhostname
    #inet_interfaces = $myhostname, localhost
    # The proxy_interfaces parameter specifies the network interface
    # addresses that this mail system receives mail on by way of a
    # proxy or network address translation unit. This setting extends
    # the address list specified with the inet_interfaces parameter.
    # You must specify your proxy/NAT addresses when your system is a
    # backup MX host for other domains, otherwise mail delivery loops
    # will happen when the primary MX host is down.
    #proxy_interfaces =
    #proxy_interfaces = 1.2.3.4
    # The mydestination parameter specifies the list of domains that this
    # machine considers itself the final destination for.
    # These domains are routed to the delivery agent specified with the
    # local_transport parameter setting. By default, that is the UNIX
    # compatible delivery agent that lookups all recipients in /etc/passwd
    # and /etc/aliases or their equivalent.
    # The default is $myhostname + localhost.$mydomain.  On a mail domain
    # gateway, you should also include $mydomain.
    # Do not specify the names of virtual domains - those domains are
    # specified elsewhere (see VIRTUAL_README).
    # Do not specify the names of domains that this machine is backup MX
    # host for. Specify those names via the relay_domains settings for
    # the SMTP server, or use permit_mx_backup if you are lazy (see
    # STANDARD_CONFIGURATION_README).
    # The local machine is always the final destination for mail addressed
    # to user@[the.net.work.address] of an interface that the mail system
    # receives mail on (see the inet_interfaces parameter).
    # Specify a list of host or domain names, /file/name or type:table
    # patterns, separated by commas and/or whitespace. A /file/name
    # pattern is replaced by its contents; a type:table is matched when
    # a name matches a lookup key (the right-hand side is ignored).
    # Continue long lines by starting the next line with whitespace.
    # See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS".
    #mydestination = $myhostname, localhost.$mydomain, localhost
    #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
    #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
    #       mail.$mydomain, www.$mydomain, ftp.$mydomain
    # REJECTING MAIL FOR UNKNOWN LOCAL USERS
    # The local_recipient_maps parameter specifies optional lookup tables
    # with all names or addresses of users that are local with respect
    # to $mydestination, $inet_interfaces or $proxy_interfaces.
    # If this parameter is defined, then the SMTP server will reject
    # mail for unknown local users. This parameter is defined by default.
    # To turn off local recipient checking in the SMTP server, specify
    # local_recipient_maps = (i.e. empty).
    # The default setting assumes that you use the default Postfix local
    # delivery agent for local delivery. You need to update the
    # local_recipient_maps setting if:
    # - You define $mydestination domain recipients in files other than
    #   /etc/passwd, /etc/aliases, or the $virtual_alias_maps files.
    #   For example, you define $mydestination domain recipients in   
    #   the $virtual_mailbox_maps files.
    # - You redefine the local delivery agent in master.cf.
    # - You redefine the "local_transport" setting in main.cf.
    # - You use the "luser_relay", "mailbox_transport", or "fallback_transport"
    #   feature of the Postfix local delivery agent (see local(8)).
    # Details are described in the LOCAL_RECIPIENT_README file.
    # Beware: if the Postfix SMTP server runs chrooted, you probably have
    # to access the passwd file via the proxymap service, in order to
    # overcome chroot restrictions. The alternative, having a copy of
    # the system passwd file in the chroot jail is just not practical.
    # The right-hand side of the lookup tables is conveniently ignored.
    # In the left-hand side, specify a bare username, an @domain.tld
    # wild-card, or specify a [email protected] address.
    #local_recipient_maps = unix:passwd.byname $alias_maps
    #local_recipient_maps = proxy:unix:passwd.byname $alias_maps
    #local_recipient_maps =
    # The unknown_local_recipient_reject_code specifies the SMTP server
    # response code when a recipient domain matches $mydestination or
    # ${proxy,inet}_interfaces, while $local_recipient_maps is non-empty
    # and the recipient address or address local-part is not found.
    # The default setting is 550 (reject mail) but it is safer to start
    # with 450 (try again later) until you are certain that your
    # local_recipient_maps settings are OK.
    unknown_local_recipient_reject_code = 550
    # TRUST AND RELAY CONTROL
    # The mynetworks parameter specifies the list of "trusted" SMTP
    # clients that have more privileges than "strangers".
    # In particular, "trusted" SMTP clients are allowed to relay mail
    # through Postfix.  See the smtpd_recipient_restrictions parameter
    # in postconf(5).
    # You can specify the list of "trusted" network addresses by hand
    # or you can let Postfix do it for you (which is the default).
    # By default (mynetworks_style = subnet), Postfix "trusts" SMTP
    # clients in the same IP subnetworks as the local machine.
    # On Linux, this does works correctly only with interfaces specified
    # with the "ifconfig" command.
    # Specify "mynetworks_style = class" when Postfix should "trust" SMTP
    # clients in the same IP class A/B/C networks as the local machine.
    # Don't do this with a dialup site - it would cause Postfix to "trust"
    # your entire provider's network.  Instead, specify an explicit
    # mynetworks list by hand, as described below.
    # Specify "mynetworks_style = host" when Postfix should "trust"
    # only the local machine.
    #mynetworks_style = class
    #mynetworks_style = subnet
    #mynetworks_style = host
    # Alternatively, you can specify the mynetworks list by hand, in
    # which case Postfix ignores the mynetworks_style setting.
    # Specify an explicit list of network/netmask patterns, where the
    # mask specifies the number of bits in the network part of a host
    # address.
    # You can also specify the absolute pathname of a pattern file instead
    # of listing the patterns here. Specify type:table for table-based lookups
    # (the value on the table right-hand side is not used).
    #mynetworks = 168.100.189.0/28, 127.0.0.0/8
    #mynetworks = $config_directory/mynetworks
    #mynetworks = hash:/etc/postfix/network_table
    # The relay_domains parameter restricts what destinations this system will
    # relay mail to.  See the smtpd_recipient_restrictions description in
    # postconf(5) for detailed information.
    # By default, Postfix relays mail
    # - from "trusted" clients (IP address matches $mynetworks) to any destination,
    # - from "untrusted" clients to destinations that match $relay_domains or
    #   subdomains thereof, except addresses with sender-specified routing.
    # The default relay_domains value is $mydestination.
    # In addition to the above, the Postfix SMTP server by default accepts mail
    # that Postfix is final destination for:
    # - destinations that match $inet_interfaces or $proxy_interfaces,
    # - destinations that match $mydestination
    # - destinations that match $virtual_alias_domains,
    # - destinations that match $virtual_mailbox_domains.
    # These destinations do not need to be listed in $relay_domains.
    # Specify a list of hosts or domains, /file/name patterns or type:name
    # lookup tables, separated by commas and/or whitespace.  Continue
    # long lines by starting the next line with whitespace. A file name
    # is replaced by its contents; a type:name table is matched when a
    # (parent) domain appears as lookup key.
    # NOTE: Postfix will not automatically forward mail for domains that
    # list this system as their primary or backup MX host. See the
    # permit_mx_backup restriction description in postconf(5).
    #relay_domains = $mydestination
    # INTERNET OR INTRANET
    # The relayhost parameter specifies the default host to send mail to
    # when no entry is matched in the optional transport(5) table. When
    # no relayhost is given, mail is routed directly to the destination.
    # On an intranet, specify the organizational domain name. If your
    # internal DNS uses no MX records, specify the name of the intranet
    # gateway host instead.
    # In the case of SMTP, specify a domain, host, host:port, [host]:port,
    # [address] or [address]:port; the form [host] turns off MX lookups.
    # If you're connected via UUCP, see also the default_transport parameter.
    #relayhost = $mydomain
    #relayhost = [gateway.my.domain]
    #relayhost = [mailserver.isp.tld]
    #relayhost = uucphost
    #relayhost = [an.ip.add.ress]
    # REJECTING UNKNOWN RELAY USERS
    # The relay_recipient_maps parameter specifies optional lookup tables
    # with all addresses in the domains that match $relay_domains.
    # If this parameter is defined, then the SMTP server will reject
    # mail for unknown relay users. This feature is off by default.
    # The right-hand side of the lookup tables is conveniently ignored.
    # In the left-hand side, specify an @domain.tld wild-card, or specify
    # a [email protected] address.
    #relay_recipient_maps = hash:/etc/postfix/relay_recipients
    # INPUT RATE CONTROL
    # The in_flow_delay configuration parameter implements mail input
    # flow control. This feature is turned on by default, although it
    # still needs further development (it's disabled on SCO UNIX due
    # to an SCO bug).
    # A Postfix process will pause for $in_flow_delay seconds before
    # accepting a new message, when the message arrival rate exceeds the
    # message delivery rate. With the default 100 SMTP server process
    # limit, this limits the mail inflow to 100 messages a second more
    # than the number of messages delivered per second.
    # Specify 0 to disable the feature. Valid delays are 0..10.
    #in_flow_delay = 1s
    # ADDRESS REWRITING
    # The ADDRESS_REWRITING_README document gives information about
    # address masquerading or other forms of address rewriting including
    # username->Firstname.Lastname mapping.
    # ADDRESS REDIRECTION (VIRTUAL DOMAIN)
    # The VIRTUAL_README document gives information about the many forms
    # of domain hosting that Postfix supports.
    # "USER HAS MOVED" BOUNCE MESSAGES
    # See the discussion in the ADDRESS_REWRITING_README document.
    # TRANSPORT MAP
    # See the discussion in the ADDRESS_REWRITING_README document.
    # ALIAS DATABASE
    # The alias_maps parameter specifies the list of alias databases used
    # by the local delivery agent. The default list is system dependent.
    # On systems with NIS, the default is to search the local alias
    # database, then the NIS alias database. See aliases(5) for syntax
    # details.
    # If you change the alias database, run "postalias /etc/aliases" (or
    # wherever your system stores the mail alias file), or simply run
    # "newaliases" to build the necessary DBM or DB file.
    # It will take a minute or so before changes become visible.  Use
    # "postfix reload" to eliminate the delay.
    #alias_maps = dbm:/etc/aliases
    #alias_maps = hash:/etc/aliases
    #alias_maps = hash:/etc/aliases, nis:mail.aliases
    #alias_maps = netinfo:/aliases
    # The alias_database parameter specifies the alias database(s) that
    # are built with "newaliases" or "sendmail -bi".  This is a separate
    # configuration parameter, because alias_maps (see above) may specify
    # tables that are not necessarily all under control by Postfix.
    #alias_database = dbm:/etc/aliases
    #alias_database = dbm:/etc/mail/aliases
    #alias_database = hash:/etc/aliases
    #alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases
    # ADDRESS EXTENSIONS (e.g., user+foo)
    # The recipient_delimiter parameter specifies the separator between
    # user names and address extensions (user+foo). See canonical(5),
    # local(8), relocated(5) and virtual(5

    Ok 1st one. The warning restriction message relates to this line in main.cf:
    smtpd_helo_restrictions = permit_sasl_authenticated  permit_mynetworks  check_helo_access hash:/etc/postfix/helo_access  reject_non_fqdn_hostname  reject_invalid_hostname  permit reject_invalid_helo_hostname
    The last reject occurs after the single word "permit" and is ignored.
    However, that's not the problem.
    I'm not exactly sure what's happening, but this might be a clue.
    It would appear that either postfix is not being able to create the socket for private/policy or it's somehow created with the wrong permissions.  You might need to ramp up the debug level to get a better idea.
    You could check if it's being created by "netstat -a | grep private/policy" in terminal.
    My guess is that it's not being created because there is no setup statement in your master.cf file, but I don't understand why postfix would be looking for it if it isn't set up.  Private/policy I think relates to grey listing.  Maybe gives you a hint.

  • Java.lang.Exception: IOException in sending Request :: Connection refused:

    Hi all,
    I am a new to Oracle 10g.I am using Enterprise manager for DBA jobs.After ogging in to enterprise manager, when i click the refresh button, i get the folllowing error
    " java.lang.Exception: IOException in sending Request :: Connection refused: connect"
    Please do help to slove this problem.
    Thanks

    I'm having the same error in my console header. Here is the content of the emagent.trc file.
    Running 10gR2 on Win 2K3 server. (bold added for readability)
    emctl status dbconsole responds with 'EM Daemon is not running'
    2007-03-29 14:02:23 Thread-1776 ERROR pingManager: nmepm_pingReposURL: Did not receive a response header from repository
    2007-03-29 14:02:23 Thread-1776 WARN main: clear collection state due to OMS_version difference
    2007-03-29 14:02:23 Thread-1776 WARN command: Job Subsystem Timeout set at 600 seconds
    2007-03-29 14:02:24 Thread-1776 WARN upload: Upload manager has no Failure script: disabled
    2007-03-29 14:02:24 Thread-1776 WARN upload: Recovering left over xml files in upload directory
    2007-03-29 14:02:24 Thread-2920 ERROR command: nmejcn: received no status header from repository at http://dB_Domain:5500/em/upload/
    2007-03-29 14:02:24 Thread-1776 WARN upload: Recovered 0 left over xml files in upload directory
    2007-03-29 14:02:25 Thread-1776 WARN metadata: Metric collectSnapshot does not have any data columns
    2007-03-29 14:02:27 Thread-1776 WARN metadata: Metric Disk_Path does not have any data columns
    2007-03-29 14:02:27 Thread-1776 WARN metadata: Metric osm_diskGroupPolicies does not have any data columns
    2007-03-29 14:02:53 Thread-1776 WARN TargetManager: Regenerating all Metadata
    2007-03-29 14:05:17 Thread-1776 ERROR util.files: ERROR: nmeufis_new: failed in lfiopn on file: E:\oracle\product\10.2.0\db_3\dB_Domain_SIGD\sysman\emd\agntstmp.txt. error = 2 (No such file or directory)
    2007-03-29 14:05:28 Thread-1776 ERROR collector: nmecs_validateStateFile(): state file invalid : E:\oracle\product\10.2.0\db_3\dB_Domain_SIGD\sysman\emd\state\snapshot
    2007-03-29 14:05:28 Thread-1776 ERROR collector: Collector state files cleaned, severity will be resent
    2007-03-29 14:05:35 Thread-3660 ERROR upload: Error in uploadXMLFiles. Trying again in 60.00 seconds.
    2007-03-29 14:05:48 Thread-676 ERROR upload: Failed to delete/move xml file C:\WINDOWS\TEMP\X11.uod, ret = -2 ; agent exiting
    2007-03-29 14:05:48 Thread-676 ERROR : Signalled to Exit with status 3
    2007-03-29 14:05:48 Thread-1776 ERROR main: EMAgent abnormal terminating
    2007-03-29 14:06:29 Thread-2996 WARN command: Job Subsystem Timeout set at 600 seconds
    2007-03-29 14:06:29 Thread-2996 WARN upload: Upload manager has no Failure script: disabled
    2007-03-29 14:06:29 Thread-2996 WARN upload: Recovering left over xml files in upload directory
    2007-03-29 14:06:29 Thread-2996 WARN upload: Recovered 5 left over xml files in upload directory
    2007-03-29 14:06:29 Thread-2996 WARN upload: Merging leftover data file named errors.dat
    2007-03-29 14:06:29 Thread-2996 WARN upload: Merging leftover data file named severity.dat
    2007-03-29 14:06:30 Thread-2996 WARN upload: Merging leftover data file named rawdata.dat
    2007-03-29 14:06:30 Thread-2996 WARN metadata: Metric collectSnapshot does not have any data columns
    2007-03-29 14:06:31 Thread-2996 WARN metadata: Metric Disk_Path does not have any data columns
    2007-03-29 14:06:31 Thread-2996 WARN metadata: Metric osm_diskGroupPolicies does not have any data columns
    2007-03-29 14:07:29 Thread-2328 ERROR util.files: nmeufile_getLength: Error in lfilen. Error = 2 (No such file or directory)
    2007-03-29 14:15:19 Thread-1960 WARN http: 268,-1: nmehl_httpListener: signaled to exit from emctl
    Thank you for your help!
    Message was edited by:
    david.d

  • Java.lang.Exception: IOException is sending Request :: Connection refused

    Hi, everybody.
    Oracle Database Control 10g displays on the home page the following message
    -- java.lang.Exception: IOException is sending Request :: Connection refused
    after killing some database lock that is impeding the users to successfully carry out their daily activities.
    What could be the reason ?

    agent come with db was not working on that time

  • ReportViewer control not connecting to the report server - Connection refused

    I'm having an issue with connecting to SQL report server using the ReportViewer control.  Thing is when I connect to the reporting services web service (http://10.3.27.80/ReportServer/ReportService2010.asmx)
    it works fine and I can successfully pull the data I need.  But when I use the web control, its then that I cannot connect.  Here's my code:
    ASP.net code:
    <%@ Page Title="Reports" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Results.aspx.cs" Inherits="RSReportViewer.Results" %>
    <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
    <asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <rsweb:ReportViewer ID="ReportViewer2" runat="server" Width="90%" ProcessingMode="Remote">
    <ServerReport ReportServerUrl="http://10.3.27.80:80/" />
    </rsweb:ReportViewer>
    Error message:
    ConnectionRefused
    Inner Exception: No connection could be made because the target machine actively refused it 176.74.176.178:8080
    I have not got the IP signified above configured anywhere throughout my solution!  So not sure where its getting that in the message.
    Stack trace:
       at Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.GetSecureMethods()
       at Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.IsSecureMethod(String methodname)
       at Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.SetConnectionSSLForMethod(String methodname)
       at Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.ProxyMethodInvocation.Execute[TReturn](RSExecutionConnection connection, ProxyMethod`1 initialMethod, ProxyMethod`1 retryMethod)
       at Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.LoadReport(String Report, String HistoryID)
       at Microsoft.Reporting.WebForms.SoapReportExecutionService.LoadReport(String report, String historyId)
       at Microsoft.Reporting.WebForms.ServerReport.EnsureExecutionSession()
       at Microsoft.Reporting.WebForms.ServerReport.SetParameters(IEnumerable`1 parameters)
       at RSReportViewer.Results.Page_Load(Object sender, EventArgs e) in c:\Users\admin\Desktop\RSViewer\RSViewer\RSReportViewer\Results.aspx.cs:line 71
       at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
       at System.Web.UI.Control.OnLoad(EventArgs e)
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    Firewalls are disabled between the two boxes. 
    Thanks in advance for any pointers!

    Hi rmccabe82,
    Generally, “actively refused it" means that the host sent a reset instead of an acknowledge when you tried to connect. As per my understanding, the issue can be caused by the process that is hosting the service is not listening on that port, this may be
    because it is not running at all or because it is listening on a different port. Please try to ping ‘netstat –anb’ (requires admin privileges) to verify that it is running and listening on the expected port.
    Furthermore, please make sure the user has permissions to access the report server.
    References:
    http://www.smartftp.com/support/kb/connection-refused-f58.html
    http://stackoverflow.com/questions/9695224/no-connection-could-be-made-because-the-target-machine-actively-refused-it-127-0
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Connection Refused Exception.

    Hi! I have made a java server as an NT Service. This server and my client works fine when I run them from command prompt. But when I make the server as an NT service and then try to connect to it using this client, I get an exception saying connection refused. Can anyone help me with this, its urgent.
    thanks
    rahul

    This is the client program
    import java.net.*;
    public class Client {
    public static void main(String[] args)
    try
    Socket mySocket = new Socket("localhost", 4000);
    System.out.println("Connected");
    catch (Exception e)
    System.err.println("Exception: " + e);
    This is the Server Program
    import java.io.*;
    import java.util.Date;
    class MyServer {
    int m_port;
    ServerSocket m_serverSocket;
    public static void main(String[] args)
    new MyServer(4000);
    public MyServer(int port)
    m_port=port;
    try {
    init();
    catch (Exception e)
    System.out.println("Caught : "+e);
    public void init() throws Exception
    m_serverSocket = new ServerSocket(m_port);
    while(true)
    Socket client = m_serverSocket.accept();
    Thread clientThread = new Thread(new ClientHandler(client));
    clientThread.start();
    public void close() throws Exception { m_serverSocket.close(); } }
    and this is the ClientHandler PRogram.
    import java.io.*;
    import java.net.*;
    import java.util.Date;
    class ClientHandler implements Runnable {
    Socket m_socket;
    public ClientHandler(Socket clientSocket) {
    m_socket=clientSocket; }
    public void run() {
    try {
    processRequests();
    m_socket.close();
    catch (Exception e) { System.out.println("Caught "+e); }
    public void processRequests() throws IOException {
    DataOutputStream dout= new DataOutputStream(m_socket.getOutputStream());
    dout.writeChars((new Date()).toString()+"\n"); } }
    ...The point is that they run perfectly on command prompt but not when i make this server as nt service.
    What could go Wrong ??
    thanks
    rahul

  • Database control shows java.lang.Exception: IOException in connect refuse

    Hi All,
    I need some help on this issue.
    I followed MOS Doc 259387.1 to reset dbsnmp password because its password is unknown.
    The error is
    Error
    java.lang.Exception: IOException in sending Request :: Connection refused
    Thanks in advance.
    leim

    Hi,
    Posting this error in metalink you could get nice directions...
    I have the same problem, and looks fixed now...
    Try review doc 420761.1
    And what I do, was:
    Stop dbconsole
    start dbconsole (fails)
    review logs generated and look this errors:
    $ORACLE_HOME/<hostname>_<instance_name>/sysman/log
    doing there a directory listing by date, "ls -ltr" the last file showed is the modified one, in my case was:
    rw-r--- 1 oracle oinstall 920007 Oct 27 19:33 emoms.log
    -rw-r----- 1 oracle oinstall 522694 Oct 27 19:34 emdb.nohup
    -rw-r----- 1 oracle oinstall 39130 Oct 27 19:38 emdctl.trc
    tail emdctl.trc
    2009-10-27 19:19:05 Thread-14236448 ERROR main: nmectl.c: nmectl_validateTZRegion, agentTZoffset =-360,and testTZoffset for -05:00:-300 do not match
    2009-10-27 19:19:05 Thread-1125024 WARN http: snmehl_connect: connect failed to (<hostname>:3938): Connection refused (error = 111)
    And tail emdb.nohup gives you the instructions to fix the first one, in my case, solving the TZRegion was enough.
    $ tail emdb.nohup
    ----- Tue Oct 27 19:19:05 2009::The agentTZRegion value in /oracle/product/102/db_1/dbserver.uadec.mx_siin/sysman/config/emd.properties is not in agreement with what agent thinks it should be.Please verify your environment to make sure that TZ setting has not changed since the last start of the agent.
    If you modified the timezone setting in the environment, please stop the agent and exectute 'emctl resetTZ agent' and also execute the script 'mgmt_target.set_agent_tzrgn' to get the value propagated to repository -----
    Hope this could help you.
    Regards
    Edited by: EnriqueGB on 27/10/2009 08:16 PM

  • I have a "OVMAPI_6000E Internal Error: Connection refused Connection refused " not "User lock"

    Dear all,
    I have a "OVMAPI_6000E Internal Error: Connection refused Connection refused " not "User lock" and in this discussion
    Please advise me.
    Show log as below
    ==> AdminServer.log <==
    ####<Sep 26, 2013 5:23:59 PM ICT> <Info> <Health> <OVMM2> <AdminServer> <weblogic.GCMonitor> <<anonymous>> <> <aa1419c5c5beaacb:21222087:14159c0b975:-8000-000000000000000d> <1380191039464> <WL-310002> <67% of the total memory in the server is free>
    ==> AdminServer-diagnostic.log <==
    [2013-09-26T17:24:31.702+07:00] [AdminServer] [ERROR] [] [com.oracle.ovm.mgr.faces.backing.Login] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: aa1419c5c5beaacb:21222087:14159c0b975:-8000-0000000000000083,0] [APP: ovm_console] Unexpected error during login (com.oracle.ovm.mgr.api.exception.FailedOperationException: OVMAPI_6000E Internal Error: Connection refused Connection refused [Thu Sep 26 17:24:31 ICT 2013]), please consult logs for details. OVMAPI_6000E Internal Error: Connection refused Connection refused [Thu Sep 26 17:24:31 ICT 2013]
    [2013-09-26T17:24:35.399+07:00] [AdminServer] [ERROR] [] [com.oracle.ovm.mgr.faces.backing.Login] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: aa1419c5c5beaacb:21222087:14159c0b975:-8000-0000000000000085,0] [APP: ovm_console] Unexpected error during login (com.oracle.ovm.mgr.api.exception.FailedOperationException: OVMAPI_6000E Internal Error: Connection refused Connection refused [Thu Sep 26 17:24:35 ICT 2013]), please consult logs for details. OVMAPI_6000E Internal Error: Connection refused Connection refused [Thu Sep 26 17:24:35 ICT 2013]
    [2013-09-26T17:24:38.425+07:00] [AdminServer] [ERROR] [] [com.oracle.ovm.mgr.faces.backing.Login] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: aa1419c5c5beaacb:21222087:14159c0b975:-8000-0000000000000087,0] [APP: ovm_console] Unexpected error during login (com.oracle.ovm.mgr.api.exception.FailedOperationException: OVMAPI_6000E Internal Error: Connection refused Connection refused [Thu Sep 26 17:24:38 ICT 2013]), please consult logs for details. OVMAPI_6000E Internal Error: Connection refused Connection refused [Thu Sep 26 17:24:38 ICT 2013]
    [2013-09-26T17:24:41.054+07:00] [AdminServer] [ERROR] [] [com.oracle.ovm.mgr.faces.backing.Login] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: aa1419c5c5beaacb:21222087:14159c0b975:-8000-0000000000000089,0] [APP: ovm_console] Unexpected error during login (com.oracle.ovm.mgr.api.exception.FailedOperationException: OVMAPI_6000E Internal Error: Connection refused Connection refused [Thu Sep 26 17:24:41 ICT 2013]), please consult logs for details. OVMAPI_6000E Internal Error: Connection refused Connection refused [Thu Sep 26 17:24:41 ICT 2013]
    [2013-09-26T17:24:56.569+07:00] [AdminServer] [ERROR] [] [com.oracle.ovm.mgr.faces.backing.Login] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: aa1419c5c5beaacb:21222087:14159c0b975:-8000-000000000000008d,0] [APP: ovm_console] Unexpected error during login (com.oracle.ovm.mgr.api.exception.FailedOperationException: OVMAPI_6000E Internal Error: Connection refused Connection refused [Thu Sep 26 17:24:56 ICT 2013]), please consult logs for details. OVMAPI_6000E Internal Error: Connection refused Connection refused [Thu Sep 26 17:24:56 ICT 2013]
    Message was edited by: 9bb5edee-5117-4494-b75e-c081a39dd35f

    Hi,
    Look at this URL, maybe can help you
    Best Regards

Maybe you are looking for

  • Javax.crypto.BadPaddingException: Given final block not properly padded

    import java.security.*; import javax.crypto.*; public class Cryptographer private final String DEFAULT_KEY="1111111111111111"; private String KEY; public Cryptographer(String key) if((key==null)||key.equals("")) this.KEY = DEFAULT_KEY; else this.KEY

  • Insufficient privilege: Not authorized at ptime/query/checker/query_check.cc on hdbsequence

    Hi All, I am currently trying to create a table (TOPIC) and a sequence (SEQ_TOPIC_ID) in HCP, and a XSJS service on top of it to insert a entry to the table. In my XS project, I placed a TOPIC.hdbtable and SEQ_TOPIC_ID.hdbsequence in it. Both table a

  • Problem when I upload

    I am not sure if it is user error or what.  I have a file in InDesign CS4 that I have exported into a JPEG.  I then go into CS Review through Adobe.com and use the web based client to upload the JPEG images.  I am able to create the review and start

  • DB Connect Data Load Failure

    Hello, All, I am trying to load data from a SQL Server (MS SQL Server 2000)into BW using DB Connect.  I have followed all the instructions from note 512739 and also from help.sap.com.  I can look into the database tables and views from BW (all the ta

  • How can i find my serial number for ipod

    how to find my serial number for ipod and can apple track my ipod its lost!!!!!!