SSLsocket client can't send data...

I know the problem is at the client side because i tested the server with openssl and worked without a problem.
It seems the client connects to the server, but the server never recieves this - pw.print("State: 2");
What i'm doing wrong?
Client:
new Thread(new Runnable() {
public void run() {
                try {
                    // Get Socket factory
                    SocketFactory factory = SSLSocketFactory.getDefault();
                    // Get Socket from factory
                    Socket s = factory.createSocket("localhost", 8254);
                    // Send request
                    OutputStream os = s.getOutputStream();
                    pw = new PrintWriter(os);
                    // Setup command
                    pw.print("State: 2");
                    pw.flush();
                    // Get response
                    InputStream is = s.getInputStream();
                    InputStreamReader isr = new InputStreamReader(is);
                    BufferedReader br = new BufferedReader(isr);
                } catch (Exception exception) {
                    exception.printStackTrace();
public static void main(String args[]) {
        //Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
        try {
            System.setProperty("javax.net.ssl.trustStore", "cacerts.jks");
            clientKeyStore = KeyStore.getInstance("JKS", "SUN");
            cksPass = "superstar".toCharArray();
            ctsPass = "superstar".toCharArray();
            clientKeyStore.load(new FileInputStream("client.ks"), cksPass);
            clientTrustStore = KeyStore.getInstance("JKS", "SUN");
            clientTrustStore.load(new FileInputStream("client.ts"), ctsPass);
            kmf = KeyManagerFactory.getInstance("SUNX509");
            tmf = TrustManagerFactory.getInstance("SUNX509");
            kmf.init(clientKeyStore, cksPass);
            tmf.init(clientTrustStore);
            sc = SSLContext.getInstance("TLS");
            sc.init(kmf.getKeyManagers(), tmf.getTrustManagers(), sRand);
        } catch (Exception e) {
            e.printStackTrace();
        }.........Thank You for any help.

pw.print() doesn't send a newline.
If the server is using readLine() it is waiting for a newline.
If you never send a newline the server will never get out of readLine().
So, send a newline. Use pw.println().

Similar Messages

  • A Power User Can Not Send Data  - BPC Release 7.5.112.07 MS

    Hi BPC Community,
    We have a group of users who are able to send data to locked dimensions. We added a new power user and this person can not send data to locked dimensions (see attached screen-shot). The person is checked box as a "leader" in the Teams responsibility.
    Any suggestions?
    Thanks. Barry

    Hi
    Options
    • All = any user with member access write privilege
    • Owner = only users assigned as owner with member access write privilege
    • Mgr = Owner of parent dimension member is manager of child dimension member
    • Locked = no user regardless of authorization.
    Controlled By: Determines who can select the work status code
    • Both = owner of the specific member ID and the owner of the parent to the specific member ID
    • Owner = owner of the specific member ID
    • Mgr = owner of the parent to the specific member ID.
    also go through below link
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2064bb40-ea48-2e10-069c-cc6878a0f1cc?QuickLink=index&…
    https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=5&cad=rja&uact=8&ved=0CEIQFjAE&url=https%3A%2F%2Fhelp.sa…
    Hope this will help you.
    sushant

  • Catch client disconnect without sending data?

    I am writing a Java Servlet and I need to know if the client has disconnected (pushed the stop button, closed the browser, etc) without sending data. Basically, I need to call socket.isOutputShutdown() on the connected socket. However, the Java Servlet interface does not provide access to the socket, only the socket's output stream. In the book Java Servlet Programming (2nd edition) by Jason Hunter, page 159 suggests attempting to write a single space and then catching the resulting error. This works fine for HTML, but my servlet is not guaranteed to be sending HTML. It could be sending a file, in which case miscellaneous "ping" spaces would corrupt it.
    Is there a way to check if the client has disconnected without sending "ping" data from a servlet?
    Thanks,
    Nathan Lewis
    P.S. I thought I posted this a couple days ago, but I can't find it now.

    This appears to be very close, but I don't think it'll work. I want to know if/when the client hits the stop button on their browser (or otherwise closes the TCP socket). The Unbound event only occurs if:
    1. The session times out
    2. The user reloads the page. (Then Unbound is immediately followed by a Bound event)
    However, an Unbound event doesn't seem to be occuring if the user hits stop. It doesn't occur until the session times out. If I set the session timeout interval to something short, the Unbound even is occuring even though the client is still connected! This happens with the servlet container I'm using, as well as TomCat 3.3.

  • How Can I Send Data From One Pc To Another Using An Ethernet Connection ?

    Hi,
    I would Like to know how to send data ( For example, any String ) from a Server Pc to a Client Pc, Using the same java program installed on both computers.
    [Pc One ( Server ) [ Java Program] ] <----Ethernet--Cable----> [Pc Two( Client ) [ Java Program] ]
    Thanks .
    Edited by: jaysal2490 on Jul 7, 2008 9:45 PM
    Edited by: jaysal2490 on Jul 7, 2008 9:46 PM
    Edited by: jaysal2490 on Jul 7, 2008 9:51 PM

    Check out this tutorial:
    http://java.sun.com/docs/books/tutorial/networking/sockets/index.html
    There are code samples included.

  • How can i send data POST with a html link in a textfield

    Hello,
    This is my problem : I generate (from a php script) html
    links in a textfield. I would like for each link to send data with
    the POST method to an other script.
    My problem is that the getURL("lien", "", "POST") function
    can be use only by a movieclip or button event ... and not from a
    html link ...
    How can i do it ?
    Have you a small idea???
    Thanks ....

    yes, thanks but now my problem is in my function associated
    to this link :
    function SendPost()
    var toto="toto";
    getURL("
    http://127.0.0.1/board/scheduledfirst.php",
    "_blank", "GET");
    The function is executed but after in php i can get anything
    with echo ($_GET["toto"]); echo ($_POST["toto"]);
    Why ?

  • How can I send data from a Comp to a Service?

    Hello!
    I have written a simple service, it works fine, i can receive data from it, but i need also to send data to the service.
    I have tried this:
    part of the code of my service:
    public void addUser(String UserName) {
                   UserList[number_user] = UserName;
                   number_user++; 
    part of the code of my comp:
    IszerdService myService = (IszerdService) PortalRuntime.getRuntimeResources().getService(serviceName);
    myService.addUser("Superman");
    could you show me what is the most simple way to send data to a service, and store in the service?
    thank you all!
    Istvan

    Hi Subathra,
    > Where do u face problem? Did u get any error while
    > le passing the data to the service? What's that?
    Actually I cant deal with putting data into the String Array of my service.
    Now I have solved the problem by using HashTable instead of String[] and the .put(key, object) method works fine, the data is delivered to the service succesfully.
    Regards,
    Istvan

  • Can't send data after updating to 5.1 SP5 : "SendGovernor failed"

    Hi,
    I updated from 5.1 SP3 to SP5, followed the migration steps (saving each apps).
    When I want to send data in my application, I get a Send Governor Error : "CommitTrans::Send through SendGovernor failed;".
    It works fine in ApShell.
    Any idea ?
    Thanks
    Arnaud

    After upgrade you have save all the application to complete the upgrade.
    Also I suggest to process all dimensions because usually that error message is coming when something is not consistent in your appset.
    If this will not solve your issue then I suggest to go into C:\BPC\websrvrs\Logging and to check that logs because the information from there can be very usefull.
    Regards
    Sorin Radulescu

  • Can I send data from one icloud account to another

    Can I send spreedsheets from one icloud account to another?

    Have you tried attaching them to an email?

  • Internal clients can't send nor rcv internally

    I have an Ex2k13 setup as :
    Win2012 R2 DC
    Win2012 R2 + Ex2k13 act as CAS and MBX server 
    now i promoted a new Ex2k13 node to configure DAG between them , but once the installation of the new exchange finished and before doing any settings related to DAG or any send/rcv connector , i started receiving complains about some internal users
    can't send/rcv internally although the mailbox is connected ,
    at first i checked queue and i found many emails in the shadow queue , although it shudn't be related to the problem but i disabled it then i had to stop all transport services and other exchange services in the new Exchange node and then the users
    started to send / rcv normally !
    what cud be the reason ? and how to avoid it ?
    BR, Mohamed Wahab "Egypt Cyber Center"

    Hi There,
    It looks like a transport Issue on the new 2013 CAS.
    I would check the Send \ Receive connectors on the new 2013 server to see if there is a configuration issue.
    Cheers,
    Exchange Blog:
    www.ntweekly.com
    MCSA, MCSE, MCITP:SA, MCITP:EA, MCITP:Enterprise Messaging Administrator 2010,MCTS:Virtualization

  • Client can't send or receive emails (hosted externally) after going live

    Nameservers and MX records have been entered but mail has been down for almost 24 hrs, what steps do I need to take with the client to resolve. Domain is deignmode.com.au.
    thanks Paul

    Brad, This is the bounce email I've received. Does it help at all?
    This is the mail system at host smtpgrave05.b.hostedemail.com.
    I'm sorry to have to inform you that your message could not
    be delivered to one or more recipients. It's attached below.
    For further assistance, please send mail to postmaster.
    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.
                       The mail system
    <[email protected]>: Host or domain name not found. Name service error
        for name=remote.designmode.com.au type=A: Host not found
    Reporting-MTA: dns; smtpgrave05.b.hostedemail.com
    X-Postfix-Queue-ID: D51DD613FFD6
    X-Postfix-Sender: rfc822; [email protected]
    Arrival-Date: Thu,  7 Jun 2012 23:46:50 +0000 (UTC)
    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.4.4
    Diagnostic-Code: X-Postfix; Host or domain name not found. Name service error
        for name=remote.designmode.com.au type=A: Host not found

  • Can We send data from SAP to non SAP using ALE !

    In this case what will be the receiver side configuaration !
    What will be our receiver client !

    Hi,
    We can send SAP to Non-SAP system using ALE technology.
    Ex:-
    Business Connector, VB.NET system can be integrated using ALE technology over TCP/IP connection.
    Regards
    Vijayanand Poreddy

  • Can I send data from a PC to another PC using Data Socket Servers?

    I need to send an array to a computer. Both computers use LabVIEW. The computer that writes the information also runs the Data Socket Server. What I want to do is read that array from another computer via internet. So the main issue is: Can I read from a Data Socket Server via internet?
    I'm writting the array using the dstp where I'm supposed to type the URL.

    Integrating the Internet into Your Measurement System – DataSocket™ Technical Overview
    Found using a simple search.

  • J2EE Host for the SLD can't send data to itself

    I am trying to setup a SLD on our ABAP+J2EE Add-in WebAS 640 SP10 system.  The SLD is setup fine.  I can import information from all of my ABAP systems via RZ70 with no problems.  I setup the data send from the J2EE side via the Visual Admin.  All my other J2EE systems send their data correctly as well.  Except for the J2EE system that the SLD is actually hosted on. 
    When I do a force send from the Visual Admin tool I don't get any errors.  If I trace from the SLD side I get the following details.
    #374140 04/20/2005 10:51:44.281 [Thread-113] FINE com.sap.lcr.sagent.builder.GenericBuilder: Generic builder end work
    #374139 04/20/2005 10:51:44.281 [Thread-113] DEBUG com.sap.lcr.sagent.builder.J2EEBuilder: getSupplierInstances
    Thrown:
    java.lang.NullPointerException
    at com.sap.lcr.sagent.builder.BuilderUtil.createServicePorts(BuilderUtil.java:458)
    at com.sap.lcr.sagent.builder.J2EEBuilder.getSupplierInstances(J2EEBuilder.java:523)
    at com.sap.lcr.sagent.builder.GenericBuilder.work(GenericBuilder.java:131)
    at com.sap.lcr.sagent.BuilderDirector.performWork(BuilderDirector.java:642)
    at com.sap.lcr.sagent.BuilderDirector.redirectData(BuilderDirector.java:541)
    at com.sap.lcr.sagent.BuilderDirector.performWork(BuilderDirector.java:520)
    at com.sap.lcr.sagent.BuilderDirector.run(BuilderDirector.java:441)
    #374138 04/20/2005 10:51:44.281 [Thread-113] DEBUG com.sap.lcr.sagent.builder.BuilderUtil: createSapComputerSystem, no SAP_ComputerSystem with host "sqld15" found in SAPData, creating a minimum computer system
    However I end up with absolutely no information about this J2EE system.  The only thing that I can think of that might be causing a problem is that I am running in a Microsoft Cluster and sqld15 is the virtual host name of the MSSQL database.  The virutal host name for the SAP systme is d15cs. However the ABAP side of this clustered system doesn't seem to have any problems with the situation.
    I am a little bit at a loss because I am new to the whole J2EE side of the world.  My searches on SDN and OSS have not revieled any helpful information.

    Hello,
    I think you delete the content, when you delete the "sld/active" in -> Administration -> Namespaces.
    We already tried this and after that we imported the Content again. Short conclusion: It did not work for us.
    We still have the problem - the j2ee-instance cannot send its data. The ABAP-instance with RZ70 works fine. The manual sending with Visual Administrator reports no error, but still no data in the SLD.
    regards,

  • CMI adapater can't send data to ilearning

    our courseware can send the data correctly to ilearning in development platform (content server and ilearning are in the same box) but could not send the data to ilearning in the staging platform (content server and ilearning server are in different server box) . here is the copy of lines in my imsmanifest.xml file.
    <?xml version="1.0" encoding="utf-8"?>
    <manifest identifier="PingAnHistory2" version="1.0" xmlns="http://www.imsproject.org/xsd/imscp_rootv1p1p2" xmlns:adlcp="http://www.adlnet.org/xsd/adlcp_rootv1p2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsproject.org/xsd/imscp_rootv1p1p2 http://ilearna.user.com/ilearn/en/admin/dtd/imscp_rootv1p1p2.xsd http://www.imsglobal.org/xsd/imsmd_rootv1p2p1 http://ilearna.user.com/ilearn/en/admin/dtd/imsmd_rootv1p2p1.xsd http://www.adlnet.org/xsd/adlcp_rootv1p2 http://ilearna.user.com/ilearn/en/admin/dtd/adlcp_rootv1p2.xsd">
         <metadata>
              <schema>ADL SCORM</schema>
              <schemaversion>1.2</schemaversion>
              <lom xmlns="http://www.imsglobal.org/xsd/imsmd_rootv1p2p1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://www.imsglobal.org/xsd/imsmd_rootv1p2p1 imsmd_rootv1p2p1.xsd">
                   <general>

    Course metadata has nothing to do with tracking.
    1. Ensure the RCO tracking type is set to CMI
    2. Are the CMI adapter files loaded on the content server in a public directory?
    3. Is the CMI Adapter registered properly in iLearning (Site -> More -> CMI Adapters)
    Scott Morris
    Seertech Solutions
    http://www.seertechsolutions.com

  • HT4864 Mail client can't send mail with @me and @icloud

    Why my mail account @icloud or @me don't work well with my mai client (windows live mail 2012)? I've setted the right parameters, but i can only recive the email, when i try to send it the account don't work! I've setted the mail client with this parameters:
    IMAP (Incoming Mail Server) information:
    Server name: imap.mail.me.com
    SSL Required: Yes
    Port: 993
    Username: [email protected] (use your @me.com address from your iCloud account)
    Password: Your iCloud password
    SMTP (outgoing mail server) information:
    Server name: smtp.mail.me.com
    SSL Required: Yes
    Port: 587
    SMTP Authentication Required: Yes
    Username: [email protected] (use your @me.com address from your iCloud account)
    Password: Your iCloud password

    The following link may provide help...
    http://apple.stackexchange.com/questions/35350/how-can-i-add-my-icloud-email-acc ount-in-windows-live-mail

Maybe you are looking for

  • Possible bug during logout with Time Machine and File Vault enabled?

    I have File Vault enabled on my machines so when I logout from them they do a backup to my Time Capsule. *I don't login as root!* Yesterday when I logged of everything was normal in the beginning. All windows were closed and the progressbar showed up

  • How do i sync my phone to a new itunes without loosing everything?

    I had to have my laptop restored as it was broken which meant everything was wiped so i had to reinstall itunes. When i plugged my phone in expecting it to be fine it wouldnt sync with my laptop without wiping the contents and replacing it with the c

  • Error while process the CPPR-Rfx "No receiver could be determined"

    Hi Experts, We are working on SRM 7.0 Extended Classic Scenario, While testing the CPPR-Rfx process we are getting the error msg in Portal "No receiver could be determined". We implemented Badi ME_REQ_SOURCING_CUST & BBP_EBPXML_OUT_BADI We are gettin

  • Installing pogoplug onto home network - any tips?

    Hi all. I was keen to add a Network Attached Storage (NAS) drive to my BT Infinity home network and decided to try something a little radical: The Pogoplug (http://www.amazon.co.uk/Pogoplug-File-Media-Sharing-Device/dp/B003FZB6C8). However, the netwo

  • Code Inspector Error Code MESSAGEG_H

    Hello Guys, I'm running code inspector and in Syntax check/Generation and subdivision suspect conversions, am getting an error called "Truncation in the Conversion from ABAP type 'C'(length 64 ->20). While I understand what the error is about...i don