Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

help on socket connectionwith errno 65

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Mon May 27, 2013 6:00 pm    Post subject: help on socket connectionwith errno 65
Reply with quote

Hi, I have a socket program performing client side socket communication with server on my PC .
When i execute it on my virtual mvs machine, it works fine, and it can send message to my PC smoothly .
But when i execute it on the real mvs machine of our shop, error occurred with ERRNO 65.when SOCKET CONNECT command is executed.
I have examined the error code, and i found it doesnt make any sense ,as the program can be run smoothly on my virtual machine ,so ,there should be no ip Configuration problem .furthermore ,I issued PING command against my PC address from the command line of MVS, I can see it works fine .
I wonder if any special configuration required for the Real MVS system to support SOCKET program .
Please advise. THX.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Mon May 27, 2013 6:19 pm    Post subject:
Reply with quote

1. Ping tells you two machines are able to reach each other. This is all that Ping tells you.
2. Is the PC running Windows? Is the Windows on the PC running IIS (or its equivalent)? If not, what have you done to establish server services on the PC? Server services are NOT generally provided for desktops by Microsoft, and you will not be able to connect your mainframe to the PC without some form of IIS (or its equivalent) running.
3. Telling us that it works for some virtual machine is useless -- unless you want to connect your virtual machine to the PC and not your mainframe, in which case you have no issue since the virtual machine is already connected.
4. Any particular set up to use socket connections on your mainframe would have to be established by your site support group. Contact them for assistance.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Tue May 28, 2013 6:32 am    Post subject:
Reply with quote

I'm using below java program to listen.
the program is developed on eclipse.
Code:
import java.io.*;
import java.net.*;
public class server{
   ServerSocket providerSocket;
   Socket connection = null;
   ObjectOutputStream out;
   ObjectInputStream in;
   String message;
   server(){}
   void run()
   {
      try{
         //1. creating a server socket
         providerSocket = new ServerSocket(2004, 10);
         //2. Wait for connection
         System.out.println("Waiting for connection");
         connection = providerSocket.accept();

         System.out.println("Connection received from " + connection.getInetAddress().getHostName());
         //3. get Input and Output streams
         out = new ObjectOutputStream(connection.getOutputStream());
         out.flush();
         
         in = new ObjectInputStream(connection.getInputStream());
         sendMessage("Connection successful");
         //4. The two parts communicate via the input and output streams
         do{
            try{
               message = (String)in.readObject();
               System.out.println(" received message from client>" + message);
               if (message.equals("bye"))
                  sendMessage("bye");
            }
            catch(ClassNotFoundException classnot){
               System.err.println("Data received in unknown format");
            }
         }while(!message.equals("bye"));
      }
      catch(IOException ioException){
         ioException.printStackTrace();
      }
      finally{
         //4: Closing connection
         try{
            in.close();
            out.close();
            providerSocket.close();
         }
         catch(IOException ioException){
            ioException.printStackTrace();
         }
      }
   }
   void sendMessage(String msg)
   {
      try{
         out.writeObject(msg);
         out.flush();
         System.out.println("server>" + msg);
      }
      catch(IOException ioException){
         ioException.printStackTrace();
      }
   }
   public static void main(String args[])
   {
      server server = new server();
      while(true){
         server.run();
      }
   }
}
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1824
Location: UK

PostPosted: Tue May 28, 2013 5:54 pm    Post subject:
Reply with quote

No one gives two hoots what software you used to write your program! All that matters is that it runs on a mainframe. And nothing posted answers any of the points/questions raised by Robert.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Tue May 28, 2013 7:48 pm    Post subject:
Reply with quote

There is a lot of wrong here I think.

Where does your virtual machine run? Is it actually the same environment as the mainframe (most likely not)

When you run PING "from the command line" do you mean in TSO option 6? Is that the same environment from which the socket program is running (probably not)

I know that here, a given CICS (or IMS) region runs as a job on a given "box". We used to call them Logical Partitions (aka LPARs), but that's kind of obsolete. So if I run PING in TSO, then try a socket program in IMS, it's two different "boxes."

Also, you can specify different IP stacks in the start up JCL for the regions. So even the right box can have multiple IP infrastructures.

Now, even on the right box, with the right IP stack, there may be blocks put in place on purpose. You'll hear this called a firewall. Only certain ports are open, and you may have to request that.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS SOCKET shared between two transa... akont CICS 3 Mon Jun 27, 2016 1:27 pm
No new posts TCP/IP socket in CICS dev.donly4u CICS 1 Wed Jul 15, 2015 6:45 am
No new posts NDM - Source file open failed. Errno=... Asif Bhatkar IBM Tools 3 Fri Feb 21, 2014 3:48 pm
No new posts Socket error; Error code 10335 Salian Prajwal CICS 0 Mon Jun 24, 2013 7:11 pm
No new posts Why CICS hangs when socket program is... dejunzhu CICS 3 Fri May 31, 2013 1:46 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us