NTLM Auth with socket connection

Hi,
can somebody please tell me how to do NTLM-Auth with a socket connection?
Thanx in advance

You know, I did a Google search with the phrase "NTLM authentication protocol", and the very first hit I got was an entire explanation, with accompnaying source code, byte code, and documentation, in Java.
<plaintive>Why can't people use Google?</plaintive>
Grant

Similar Messages

  • I suppose it is the problem with socket connection,Please help

    Hi,
    I'm trying to build a chat server in Java on Linux OS.I've created basically 2 classes in the client program.The first one shows the login window.When we enter the Login ID & password & click on the ok button,the data is sent to the server for verification.If the login is true,the second class is invoked,which displays the messenger window.This class again access the server
    for collecting the IDs of the online persons.But this statement which reads from the server causes an exception in the program.If we invoke the second class independently(ie not from 1st class) then there is no problem & the required data is read from the server.Can anyone please help me in getting this program right.I'm working on a p4 machine with JDK1.4.
    The Exceptions caused are given below
    java.net.SocketException: Connection reset by peer: Connection reset by peer
    at java.net.SocketInputStream.SocketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:119)
         at java.io.InputStreamReader$CharsetFiller.readBytes(InputStreanReader.java :339)
         at java.io.InputStreamReader$CharsetFiller.fill(InputStreamReader.java:374)
         at java.io.InputStreamReader.read(InputStreamReader.java:511)
         at java.io.BufferedReader.fill(BufferedReader.java:139)
         at java.io.BufferedReader.readLine(BufferedReader.java:299)
         at java.io.BufferedReader.readLine(BufferedReader.java:362)
         at Login.LoginData(Login.java:330)
         at Login.test(Login.java:155)
         at Login$Buttonhandler.actionPerformed(Login.java:138)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1722)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:17775)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:4141)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:253)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:261)
         at java.awt.Component.processMouseEvent(Component.java:4906)
         at java.awt.Component.processEvent(component.java:4732)
         at java.awt.Container.processEvent(Container.java:1337)
         at java.awt.component.dispatchEventImpl(Component.java:3476)
         at java.awt.Container.dispatchEventImpl(Container.java:1399)
         at java.awt.Component.dispatchEvent(Component.java:3343)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3302)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3014)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2967)
         at java.awt.Container.dispatchEventImpl(Container.java:1373)
         at java.awt.window.dispatchEventImpl(Window.java:1459)
         at java.awt.Component.dispatchEvent(Component.java:3343)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:439)
         at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:150)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:131)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
         My program looks somewhat like this :
    1st class definition:
    public class Login extends Jframe// Login is the name of the first class;
    Socket connection;
    DataOutputStream outStream;
    BufferedReader inStream;
    Frame is set up here
    public class Buttonhandler implements ActionListener
    public void actionPerformed(ActionEvent e) {
    String comm = e.getActionCommand();
    if(comm.equals("ok")) {
    check=LoginCheck(ID,paswd);
    test();
    public void test() //checks whether the login is true
    if(check)
    new Messenger(ID);// the second class is invoked
    public boolean LoginCheck(String user,String passwd)
    //Enter the Server's IP & port below
    String destination="localhost";
    int port=1234;
    try
    connection=new Socket(destination,port);
    }catch (UnknownHostException ex){
    error("Unknown host");
    catch (IOException ex){
    ex.printStackTrace ();
    error("IO error creating socket ");
    try{
    inStream = new BufferedReader(new InputStreamReader(connection.getInputStream()));
    outStream=new DataOutputStream(connection.getOutputStream());
    }catch (IOException ex){
    error("IO error getting streams");
    ex.printStackTrace();
    System.out.println("connected to "+destination+" at port "+port+".");
    BufferedReader keyboardInput=new BufferedReader(new InputStreamReader(System.in));
    String receive=new String();
    try{
    receive=inStream.readLine();
    }catch(IOException ex){ error("Error reading from server");}
    if(receive.equals("Logintrue"))
    check=true;
    else
    check=false;
    try{
    inStream.close();
    outStream.close();
    connection.close();
    }catch (IOException ex){
    error("IO error closing socket");
    return(check);
    // second class is defined below
    public class Messenger
    Socket connect;
    DataOutputStream outStr;
    BufferedReader inStr;
    public static void main(String args[])
    { Messenger mes = new Messenger(args[0]);}
    Messenger(String strg)
    CreateWindow();
    setupEvents();
    LoginData(strg);
    fram.show();
    void setupEvents()
    fram.addWindowListener(new WindowHandler());
    login.addActionListener(new MenuItemHandler());
    quit.addActionListener(new MenuItemHandler());
    button.addActionListener(new Buttonhandle());
    public void LoginData(String name)
    //Enter the Server's IP & port below
    String dest="localhost";
    int port=1234;
    int r=0;
    String str[]=new String[40];
    try
    connect=new Socket(dest,port);
    }catch (UnknownHostException ex){
    error("Unknown host");
    catch (IOException ex){
    ex.printStackTrace ();
    error("IO error creating socket ");
    try{
    inStr = new BufferedReader(new InputStreamReader(connect.getInputStream()));
    outStr=new DataOutputStream(connect.getOutputStream());
    }catch (IOException ex){
    error("IO error getting streams");
    ex.printStackTrace();
    String codeln=new String("\n");
    try{
    outStr.flush();
    outStr.writeBytes("!@*&!@#$%^");//code for sending logged in users
    outStr.writeBytes(codeln);
    outStr.write(13);
    outStr.flush();
    String check="qkpltx";
    String receive=new String();
    try{
    while((receive=inStr.readLine())!=null) //the statement that causes the exception
    if(receive.equals(check))
    break;
    else
         str[r]=receive;
         r++;
    }catch(IOException ex){ex.printStackTrace();error("Error reading from socket");}
    catch(NullPointerException ex){ex.printStackTrace();}
    } catch (IOException ex){ex.printStackTrace();
    error("Error reading from keyboard or socket ");
    try{
    inStr.close();
    outStr.close();
    connect.close();
    }catch (IOException ex){
    error("IO error closing socket");
    for(int l=0,k=1;l<r;l=l+2,k++)
    if(!(str[l].equals(name)))
    stud[k]=" "+str[l];
    else
    k--;
    public class Buttonhandle implements ActionListener
    public void actionPerformed(ActionEvent e) {
    //chat with the selected user;
    public class MenuItemHandler implements ActionListener
    public void actionPerformed(ActionEvent e)
    String cmd=e.getActionCommand();
    if(cmd.equals("Disconnect"))
    //Disconnect from the server
    else if(cmd.equals("Change User"))
         //Disconnect from the server & call the login window
    else if(cmd.equals("View Connection Details"))
    //show connection details;
    public class WindowHandler extends WindowAdapter
    public void windowClosing(WindowEvent e){
    //Disconnect from server & then exit;
    System.exit(0);}
    I�ll be very thankful if anyone corrects the mistake for me.Please help.

    You're connecting to the server twice. After you've successfully logged in, pass the Socket to the Messenger class.
    public class Messenger {
        Socket connect;
        public static void main(String args[]) {
            Messenger mes = new Messenger(args[0]);
        Messenger(Socket s, String strg) {
            this.connect = s;
            CreateWindow();
            setupEvents();
            LoginData(strg);
            fram.show();
    }

  • Problem with socket connection in midp 2.0

    hello everyone.
    I'm new one in j2me and I am learning socket connection in j2me. I'm using basic socket,datagram example wich is come with sun java wireless toolkit 2.5. for it i wrote small socket server program on c# and tested it example on my pc and its working fine. also socket server from another computer via internet working fine. But when i instal this socket example into my phone on nokia n78 (Also on nokia 5800) it's not working didn't connect to socket server.. On phone I'm using wi-fi internet. Can anybody help me with this problem? I hear it's need to modify manifest file and set appreciate pressions like this
    MIDlet-Permissions: javax.microedition.io.Connector.socket,javax.microedition.io.Connector.file.write,javax.microedition.io.Connector.ssl,javax.microedition.io.Connector.file.read,javax.microedition.io.Connector.http,javax.microedition.io.Connector.https
    is it true?
    can anybody suggest me how can i solve this problem?
    where can I read full information about socket connection specifiecs in j2me?
    Thanks.

    Maybe this can be helpful:
    [http://download-llnw.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/index.html]
    you can check there the Datagram interface anda DatagramConnection interface and learn a little about that.
    If the client example runs fine in the wireless toolkit emulator, it should run the same way in your phone; i suggest to try to catch some exception that maybe is hapenning and display it on a Alert screen, this in the phone.

  • Problem with socket connection

    have my gps reciver connected to the usb port - i have a daemon gpsd running which makes data available on tcp port 2947 for querying. when i do telnet, it gives proper data.
    but when i open a socket connection using java, it does not print anything as output. actually telnet asks for an escape charatcer so i am sending "r" initially to the server but still the program does not print anything as output.
    here is my java code -
    import java.io.*;
    import java.net.Socket;
    public class test2
    public static void main(String[] args)
    try
    Socket s = new Socket("localhost",2947);
    PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(
    s.getOutputStream())),true);
    out.println("r");
    BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));
    String line;
    while(true)
    line = in.readLine();
    System.out.println(line);
    catch (Exception e)
    or sometimes it even shows error as
    Exception in thread "main" java.net.SocketException: Invalid argument or cannot assign requested address
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    and this is the output which i get on telnet -
    ot@localhost ~]# telnet localhost 2947
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    r
    GPSD,R=1
    $GPRMC,000212,V,18000.0000,N,00000.0000,W,0.0000,180.000,101102,,*1A
    $GPGSA,A,1,,,,,,,,,,,,,,,,*32
    $PGRME,400.00,0.00,0.00*7B
    $GPRMC,000213,V,18000.0000,N,00000.0000,W,0.0000,180.000,101102,,*1B
    $GPGSA,A,1,,,,,,,,,,,,,,,,*32
    $PGRME,400.00,0.00,0.00*7B
    $GPRMC,000214,V,18000.0000,N,00000.0000,W,0.0000,180.000,101102,,*1C
    $GPGSA,A,1,,,,,,,,,,,,,,,,*32

    Actually the problem does not seem to be in the code because i tried some basic client server programs (without any gpsd etc in picture) and even they are not working in linux though they work perfectly in windows (on the same machine). In linux it shows exception
    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)
    i have removed the firewall settings etc and it still doesnot work in linux
    what could be the cause for this?
    Sowmya

  • Problem with socket connection through Java Embedding...

    We are trying to create a simple socket connection to a socket server through BPEL PM using the Java Embedding component.
    BPEL Process : Client makes an asynchronous request. Passes an input variable. The input variable is sent to the Server Program through a socket connection through the Java embedding component.
    Server: We are running a simple Socket Server program from command prompt.
    The code below works fine as long as we do not try to receive a response from the server (Commented Code).
    If we uncomment the code and try to receive a response, it refuses to create an instance for the BPEL Process. And sometimes restarts the BPEL Server.
    Client Code:
    String msg="NONE";
    try{
    org.w3c.dom.Element input = (org.w3c.dom.Element) getVariableData("inputVariable","payload","/client:clientProcessRequest/client:input");
    msg = input.getNodeValue();
    Socket clientsoc=new Socket("ServerIP",1000);
    PrintWriter out1=new PrintWriter(clientsoc.getOutputStream());
    out1.write(msg);
    out1.flush();
    BufferedReader cin1=new BufferedReader(new InputStreamReader(clientsoc.getInputStream()));
    msg=cin1.readLine();
    setVariableData("outputVariable","payload","/client:result",new String(msg));
    clientsoc.close();
    catch(UnknownHostException e)
    System.err.println("Don't know about host: dev.");
    System.exit(1);
    catch (IOException e)
    System.err.println("Couldn't get I/O for "+ "the connection to: dev.");
    System.exit(1);
    }

    Repost

  • Problem with socket connections through a proxy server.

    People,
    I set the system properties to use a proxy server so my application can fetch data from servers located outside my local network:
    System.setProperty("socksProxyPort", port);
    System.setProperty("socksProxyHost", proxy_addy);Then, when I attempt to stabilish a connection:
    s = new Socket(this.getHost(), port);It hangs.
    I appreciate any help since my available Java documentation is quite obscure regarding proxy servers.

    Is the proxy on another machine? Try it's IP. If
    not, replace 'proxy' with 'localhost'.
    - SaishYes, it is another machine.
                byte x[] = {(byte)aaa,(byte)bbb,(byte)ccc,(byte)ddd};
                s = new Socket(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress(InetAddress.getByAddress(x), 8080)));
                s.connect(new InetSocketAddress(this.getHost(), port));Again, it hung.

  • I need help with socket connection pooling please

    I need a basic connection pooling system for the code below users sets number connections 5 etc.
    <main class>
    s = new ListService(ssock.accept(),serverDir); //give list to client
    Thread t = new Thread(s);
    t.start();
    <main class>
    class ListService implements Runnable
    Socket client;
    String serverDir;
    public ListService(Socket client,String serverDir)
    this.client = client;
    this.serverDir = serverDir;
    public void run()
    try
    BufferedWriter out = new BufferedWriter(new OutputStreamWriter(client.getOutputStream()));
    // send something to client
    catch(Exception e)
    System.out.println(e);
    System.out.println("client disconnected\n");
    catch(Exception e){}
    Thank you so much

    My code already accepts multi clients I need pooling only 5 clients can be using the server at a time when one client disconnects that means another incoming client can enter the pool to use the server.
    I tried to do a counter so when a connection is made it increments and then if counter>=numOfClients
    set a variable to true or false and this is sent with the server setup so it determines if the server code is run or it just closes the connection but there is no way I can access the counter variable from within a runnable class thread when a client closes connection it should -1 from the variable
    thanks

  • Problem with Socket Connection and Out of Memory Exception in JavaME

    Hi,
    I am working on creating an application to check pop3 emails and send emails using smtp. I have implemented almost everything. It works fine if I run it with debugger [Step by step] but it fails when I run the application on emulator. It never connects to the pop3 server and runs out of memeory.
    Help me on this issue.
    Tarpinder

    HI,
    THanks for the reply..AM using workshop IDE and have tried the "clean" option also but of no use..Is there any other alternative to get rid of this exception ???
    Regards

  • Problem with socket programming-connecting to port 13

    Hi, I am learning JAVA, and we are on the subject of sockets. I am trying to make this program to connect to port 13, get the time, and print it to the console. This is my code:
    import java.io.*;
    import java.net.*;
    public class temp {
         public static final int PORT = 13;
         public static void main(String[] args) {
              Socket s = null;
              String line = null;
              try {
                   s = new Socket("localhost", PORT);
                   DataInputStream sin = new DataInputStream(s.getInputStream());
                   line = sin.readLine();
                   if (line != null) System.out.println(line);
              catch (IOException e) {System.err.println("!" + e);}
              finally {
                   try { if (s != null) s.close(); }
                   catch (IOException e2) {}
    And this is the output:
    !java.net.ConnectException: Connection refused: connect
    What should I do. I found that the problem is with the server I am connecting to and I tried connecting to dif. computers, or to stuff online, and nothing works.
    Any suggestions for me?
    Forgot: I tried this on both a windows XP and Vista
    Edited by: xpatrickerx on Mar 23, 2008 8:12 PM
    Tampering with it, I find that the error occurs on the following line:
    s = new Socket("localhost", PORT);
    Edited by: xpatrickerx on Mar 23, 2008 8:13 PM

    So I finally found how to use printStackTrace and here is what it gives when:
    1) I use my own computer:
    java.net.ConnectException: Connection refused: 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.SocksSocketImpl.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 temp.main(temp.java:11)
    2) I use something else:
    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.SocksSocketImpl.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 temp.main(temp.java:11)
    Again, thanks

  • Connect Flash to Serial Port with Local Socket Connection

    Hey all,
    So, I am trying to connect a Flash movie to a serial port
    and have it react to the input coming in. Of course, Flash does not
    have this capability built in, so I need a workaround. I also
    program in Director, and there are easier ways to deal with this
    there, but since there hasn't been an update in years, and for
    other technical reasons, I would like to use a pure Flash program.
    I also need to take advantage of some of the new hardware
    acceleration improvements and horizontal sync issues that come with
    running the Flash player full screen. So, there are some tools out
    there that will let me stream the input from the serial port to a
    web address. I figure I could use the local address and assign a
    port number, then use Flash to create a local socket connection. I
    am having issues opening ports on my computer, and a few other
    things, but in theory, I think it should work. I know that I won't
    get all the answers here, but if anyone has done anything of the
    sort, or might know of some similar projects, it would really help.
    I am more of a Director/Flash programmer, and not so much one on
    the system level. So, opening local sockets, etc, while I am sure I
    can figure it out, is still a bit beyond me. Thanks all!
    - Bruce

    You may want to look into flash remoting, which would allow
    you to push content to the flash movie. You could then write a
    proxy between the source of your stream and flash the remoting
    server.

  • How i can export and distribute setting; network.automatic-ntlm-auth.trusted-uris" to all computers in the network (With Folder Rederiction enabled)?

    Hi,
    We are about to enable SSO in our environment. As a result, I need to modify the value for user_pref("network.automatic-ntlm-auth.trusted-uris", "my domain");>>prefs.js.
    I created a simple .bat file to make the necessary mod and add the line to pref.js. When I run the file it outputs the prefs.js to the same location, not the Mozilla AppData folder. We are a Win7 environment with folder redirection enabled. Therefore, our user's Mozilla AppData folder is located at \\my domain\dfs\XenDesktop\Profiles\username\AppData\Mozilla\Firefox\Profiles\default (random default profile name). My question is what is the best course of action to add this pref. to all PC user's pref.js file? keep in mind the pref.js is located on the hidden network path I included above. I apologize if my question is not easy to understand.

    cor-el, thanks for you reply.
    Yesterday, prior to my post, I did try the mozilla.cfg method. I read your reply to another FF user's, similar question. Here are my complete steps.
    1. created a txt file with the following info: defaultPref("network.automatic-ntlm-auth.trusted-uris", "ngs.org"); // set new default value
    2. saved the file as mozilla.cfg
    3. dropped the file in C:\Program Files (x86)\Mozilla Firefox
    4. Created local-settings.js with the following info:
    pref("general.config.filename", "mozilla.cfg");
    pref("general.config.obscure_value", 0); // use this to disable the byte-shift
    5. dropped the file in C:\Program Files (x86)\Mozilla Firefox\defaults\pref
    When I launch Firefox the network.automatic-ntlm-auth.trusted-uris should say ngs.org, but the value is still blank.
    Any help is greatly appreciated.

  • How can I catch a connection reset with sockets and NSFileHandle

    Hi,
    I have an iPhone Client that connects to a remote server through a basic TCP Socket (Connected mode, ie SOCK_STREAM).
    The communication pipe is then managed through an NSFileHandle.
    Everything works fine as long as I don't reset the Server.
    In that case, I receive an exception notification in X-Code Debugger. My problem is that I don't know how to catch (and thus manage) this exception:
    *NSFileHandleOperationException, reason : [NSConcreteFileHandle readDataOfLength:] : connection reset by peer*
    I tried something like that, but I never catch anything there, since I get there only when I have available data, and there are none since the server has closed.
    @try{
    incomingData = [ListeningSocket readDataOfLength:]
    ²catch(NSException * e){
    NSLog("ReadDataOfLenght notified : %@ with reason : %@",[e name],[e reason])
    Do some of you know how I can manage server reset to avoid getting and (unmanaged) exception?

    You should consider using Bonjour based dynamic publishing and discovery of your service. So when the server service dies, and restarts, the client can detect the restart automatically and connect to the new address of the server.
    Hope it helps. (Sorry for the belated response. . I just ran into this post).

  • Exchange 2010 health-checks with encryption and ntlm auth

    Hi everybody,
    I will be forced to implement extended health-ckecks for Exchange 2010 CAS Servers. So the cisco design guide does not help
    Exchange2010 CAS Service needs ntlm auth for many services by default. http://technet.microsoft.com/en-us/library/bb331973.aspx
    Now with SP1 also for pop3 and imap4. I have not found any option to use ntlm by default.
    The next problem is encryption.
    Health-checks with encryption are not integrated in cisco ace 4710 by default.
    As an alternative to try a scripted health-check with tcl script is an option but needs more investigation and is timeconsuming.
    I watched for other vendors solution, they use e.g. external imported shell scripts with curl (curl -s --ntlm -k -X POST ...) to do a health-check with ntlm. That would be fine at the moment to beat the requirement of extendet health-checks.
    But maybe it is only ntlm verion 1, I do not know what happens if it comes to ntlm version 2.
    Kerberos authentication is a much bigger problem, but at the moment not a requirement.
    Does anybody has some hints or also a tcl script for exchange health-checks ?
    Best Regards
    Alois

    Hi everybody,
    I will be forced to implement extended health-ckecks for Exchange 2010 CAS Servers. So the cisco design guide does not help
    Exchange2010 CAS Service needs ntlm auth for many services by default. http://technet.microsoft.com/en-us/library/bb331973.aspx
    Now with SP1 also for pop3 and imap4. I have not found any option to use ntlm by default.
    The next problem is encryption.
    Health-checks with encryption are not integrated in cisco ace 4710 by default.
    As an alternative to try a scripted health-check with tcl script is an option but needs more investigation and is timeconsuming.
    I watched for other vendors solution, they use e.g. external imported shell scripts with curl (curl -s --ntlm -k -X POST ...) to do a health-check with ntlm. That would be fine at the moment to beat the requirement of extendet health-checks.
    But maybe it is only ntlm verion 1, I do not know what happens if it comes to ntlm version 2.
    Kerberos authentication is a much bigger problem, but at the moment not a requirement.
    Does anybody has some hints or also a tcl script for exchange health-checks ?
    Best Regards
    Alois

  • Having problems with shut-down of server after I open a socket connection (which fails to connect)

    Basically here is an example servlet - new iPlanet 4.1sp9 instance with an empty classpath (apart from the servlet class) - running solaris v5.6 (Generic_111446-02)
    If you run the servlet and then try to shut-down iPlanet it hangs. If you remove the 'new Socket(...' line then it's fine. Any ideas why a failed socket connection stops the server restarting? (Connecting to a listening port does not exhibit this behavior).
    Cheers, source follows:
    * SocketServletTest.java
    * Created on 02 April 2002, 09:30
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.net.Socket;
    * @author kingrb
    * @version
    public class SocketServletTest extends HttpServlet
    private static boolean startedThread = false;
    /** Initializes the servlet.
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    /** Destroys the servlet.
    public void destroy()
    /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
    * @param request servlet request
    * @param response servlet response
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, java.io.IOException
    response.setContentType("text/html");
    java.io.PrintWriter out = response.getWriter();
    if (!startedThread)
    out.println("Starting thread");
    Thread t = new SocketThread();
    t.start();
    startedThread = true;
    out.println("Started thread);
    out.println("test");
    out.println("Prop is: " + System.getProperty("MyProp"));
    out.close();
    /** Handles the HTTP <code>GET</code> method.
    * @param request servlet request
    * @param response servlet response
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, java.io.IOException
    processRequest(request, response);
    /** Handles the HTTP <code>POST</code> method.
    * @param request servlet request
    * @param response servlet response
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, java.io.IOException
    processRequest(request, response);
    /** Returns a short description of the servlet.
    public String getServletInfo()
    return "Short description";
    private class SocketThread extends Thread
    public void run()
    int counter = 0;
    String errMsg = null;
    while (1==1)
    counter++;
    Socket s = null;
    try
    s = new Socket("127.0.0.1", 27087);
    s.close();
    catch(Exception e)
    errMsg = e.getMessage();
    if (s != null)
    errMsg += " & NOT NULL";
    try
    {s.close();} catch(Exception e2)
    System.setProperty("MyProp", String.valueOf(counter) + " - " + errMsg + "<BR>" + System.getProperty("java.class.path"));
    try {Thread.sleep(30000);} catch(Exception e) {}
    }

    Rob:
    it's due to JVM signal handler that catches the stop signal and you're forced to use a kill -9 -
    Note that the stop script of a fresh install of iWS 4.1SP9 should contain the kill -9 - as a workaround for this known JVM issue.

  • Communication with database using TCP sockets connection

    Hi all,
    I am bit of a newbie when it comes to databases. In a project I realised over te passed few weeks, I communicated with an 11g database using an application I created with VS Express. It uses an ODBC connection. I now want to connect a PLC to the same database. These PLC's don't have the ability to install an ODBC client so I need something different.
    I am easily able to open a TCP socket on the PLC and send data from there. I would like to know if I can start a TCP sockets connection with our 11g server and send all queries directly. The other (already suggested) option would be to have the PLC connect to a PC that reads this information and hands it over to the ODBC connector, but that would mean I need an extra PC just to 'translate'.
    I have been searching these forums for socket, TCP and more and feel it is possible, but I need a good document as a reference to show/tell me how it's done.
    Thanks in advance,
    Marijn

    The TCP/IP interface to Oracle is undocumented (and hugely complex anyway). You'll need to use a higher layer iterface or setup your own infrastructure.
    We need more information about what is available to you inside the PLC.
    Can you use Java? If so, perhaps use thin JDBC?
    Can you sent HTTP requests? If so you could set up your own Web services to handle this.
    If you can only use C or C++, Oracle has interfaces there too.. it's called OCI (Oracle Call Interface) and thats as close to the networking layer as you can get.
    Finally if you can use .NET Oracle has a Fully Managed Oracle Data Provider for .NET that you could use.
    But if all you can do is super low level network access and none of the above then you will need to set up an intermediary as you mentioned.

Maybe you are looking for

  • How do I move music from my computer to my Ipod?

    I have music that isn't on my Ipod, and I want to move it to my Ipod so that I can listen to it without having to get on my computer. The only problem is, I don't know how. Is there a way that I could move these songs to my Ipod?

  • Hard drive constantly running and ruining battery life

    Hello, I recently got an x200s from a legit ebay lenovo seller that came with an upgraded 500gb 7200rpm hard drive. The problem is that the hard drive is running at All times. I can tell from the sound as well as slight vibration. Even with the lowes

  • Sound from apple tv

    i got sound when i play movies, but, no sound when i play my music from my itunes thru my apple tv.

  • Select (variable) into:parameter from xyz , dynamic sql

    hello everyone I have a table with the columns KZ01*01*, KZ01*02*, KZ01*03*..... I want to select the value from one column depending of a variable z.b. varable=3 I want the value select KZ01*03* I wrote the trigger post_querry: declare      v_kfz st

  • Error when trying to get DI API from UI API

    Hi. I have this code: SAPbouiCOM.SboGuiApi SboGuiApi = null;             string sConnectionString = null;             SboGuiApi = new SAPbouiCOM.SboGuiApi();             //sConnectionString = "0030002C0030002C00530041005000420044005F00440061007400650