IBM Support

Trying to connect to remote database fails with -956 error

Troubleshooting


Problem

Trying to connect to remote database fails with -956 error

Resolving The Problem


PROBLEM

When you try to connect to a remote database through dbaccess or an other application you get returned an error -956:



-956

Client client-name is not in /etc/hosts.equiv on the remote host.



This operation cannot be completed because the specified remote computer does not recognize the name of the client computer (the local host, whose name the hostname command returns). Client names are normally recorded in the configuration file /etc/hosts.equiv. The rhosts file on the remote computer might also need modification. For more information on these files and the relation between them, try man rhosts on a UNIX system. See the remote host administrator to ensure that the client host name is specified in /etc/hosts.equiv file for the remote host. This message appears in versions prior to Version 6.0.

-956

Client client-name or user is not trusted by the database server.



The desired database server does not consider the client computer or your user ID trusted. Ask the system administrator to include the client computer as a trusted host and/or your user id as a trusted user in the /etc/hosts.equiv file on the server computer or in the .rhosts file in your home directory on the server computer. See the UNIX manual pages on HOSTS.EQUIV(5) for more information.

Alternatively, you can explicitly specify your user name and password in the USER clause of a CONNECT statement or in the .netrc file in your home directory on the client computer. See the IBM Informix Guide to SQL: Syntax for information on the CONNECT statement, and the UNIX manual pages regarding NETRC(5) for information on the .netrc file. This message appears with Version 6.0 and later.


SCOPE

The following products and operating systems are affected:



Product Name
Product Version(s)
Hardware Vendor
Operating System
IBM® Informix® Dynamic Server™
  • 7.3
  • 9.4
  • 10.0
  • All
    All
    x can be U, H, or F depending on your operating system.


    SOLUTION

    Check the following files on both local and remote sides, verify if they respect the following entries and try the connection again.



    Local side

    $INFORMIXDIR/etc/sqlhosts (or $INFORMIXSQLHOSTS file):                                                    DBSERVERALIASES_machine_server    onsoctcp     machine_server     serviceA                        


    /etc/hosts:
    IPmachine_server             machine_server
    IPmachine_client             machine_client
                                                       
    /etc/hosts.equiv:                                                        
    +user (login of the person who is trying to connect)                                                                
    /etc/services:                                                         
    serviceA    num_serviceA/tcp                                            
    serviceB    num_serviceB/tcp                                            
                                                                             
    $HOME/.rhosts:                                                       
    IP_machine_cliente        machine_cliente                                  
    IP_machine_server         machine_server                                          
                                                                             
    Remote side

    $INFORMIXDIR/etc/sqlhosts (or $INFORMIXSQLHOSTS file):



    DBSERVERALIASES_machine_cliente    onsoctcp    machine_cliente    serviceB        
    /etc/hosts:
    IPmachine_server              machine_server
    IPmachine_client              machine_client
                                                                           
    /etc/hosts.equiv:                                                       
    +user (login of the person who is trying to connect)                                                                                                                            
    /etc/services:                                                       
    serviceA    num_serviceA/tcp                                            
    serviceB    num_serviceB/tcp                                            
                                                                             
    $HOME/.rhosts:                                                           
    IP_machine_cliente       machine_cliente                                  
    IP_machine_server        machine_server    

    [{"Product":{"code":"SSGU8G","label":"Informix Servers"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"11.1;11.5;11.7;12.1","Edition":"","Line of Business":{"code":"","label":""}}]

    Document Information

    Modified date:
    16 June 2018

    UID

    swg21265434