Delphix Products

Expand all | Collapse all

error while discovering SAP ASE 15.7 on AIX 7.1

Javier -11-06-2015 12:32:00 PM

  • 1.  error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-04-2015 07:31:00 PM
    Hi,
    I want to test Express demo with one enviroment on AIX 7.1 with SAP ASE 15.7 SP134. When I try to discover SAP ASE I received this error:

    Failed to discover environment variable $SYBASE on host "XXX.XXX.XXX.81"Make sure that environment variable $SYBASE is set for user "sybase" on the host.

    I have checked and Aix User have enviroment variables on .profile.

    Is it possible?

    Thanks.
    Javier.


  • 2.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-04-2015 08:47:00 PM
    Hello Javier,

    What shell does your user default to (echo $SHELL)? You may need to export SYBASE in .bashrc or .bash_profile .

    Also check to see if $SYBASE/SYBASE.env exists. Further on in the discovery process, Delphix incorrectly sources this file (after sourcing $SYBASE/SYBASE.sh). If SYBASE.env changes any environment variables to point to an incorrect/different location it can cause problems for discovery.

    Thanks,
      Neal


  • 3.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-04-2015 10:29:00 PM
    Hi Neal,

    I´m using /usr/bin/ksh as user shell, I have SYBASE.sh execution inside .profile, .bashrc does not exist.

    Thanks.
    Javier.


  • 4.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-04-2015 10:46:00 PM
    It looks like you are using 'sybase' as your environment user for discovery.  When you login as sybase, what is the output of env.  Is $SYBASE correct?


  • 5.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-04-2015 10:48:00 PM
    Yes I´m using sybase and when I login $SYBASE contains instalation root directory.


  • 6.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-04-2015 10:53:00 PM
    Hello,

    So the easiest path forward for you might be to change the shell for the "delphix_os" user specified during discovery to be bash and set the variable in the ".bashrc" file.

    We have seen one other case where discovery fails with ksh and the research found:
    • ~/.profile is only read by login shells.
    • ~/.kshrc is only executed for interactive shells.


    So neither the .profile nor the .kshrc will be executed by the Delphix ssh commands which do not login and use a non-interactive shell.

    We don't require that the user use the bash shell just that the variable be set during a non-interactive login.

    Can you switch to a bash shell for this user?

    Thanks,
      Neal



  • 7.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-05-2015 01:18:00 AM
    Hi,

    I have set bash shell for the user sybase but I´m still getting the same error message.

    When I login by ssh AIX executes .profile so I copy it with .bashrc name but no luck at all.

    I don´t have the delphix_os user I just using sybase, that´s ok or is it necessary to create the delphix_os user at aix?

    Thanks.
    Javier.


  • 8.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-05-2015 02:16:00 AM
    Hi Javier,

    Yes, you should be able to use the user "sybase". If you have a second server that you could try to connect to the server you are trying to discover with Delphix via ssh, you should be able to test whether the variable is being set:

    $ ssh sybase@nstacksolase2.dcenter.delphix.com env | grep SYBASE
    Password: 
    SYBASE_JRE6_64=/opt/sybase/shared/JRE-6_0_24
    SYBASE_JRE6_32=/opt/sybase/shared/JRE-6_0_24
    SYBASE_JRE6=/opt/sybase/shared/JRE-6_0_24
    SYBASE_OCS=OCS-15_0
    SYBASE=/opt/sybase
    SYBASE_JRE_RTDS=/opt/sybase/shared/JRE-6_0_24
    SYBASE_WS=WS-15_0
    SYBASE_ASE=ASE-15_0

    Can you try this? If this doesn't show the variables set, that is the reason for the error message. I would need to see your .bashrc and SYBASE.sh files. Maybe we could do a WebEx to troubleshoot.

    Thanks,
      Neal



  • 9.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-05-2015 11:56:00 AM
    Hi neal,

    This is the ouput:

    # su - sybase
    -bash-4.2$ env | grep SYBASE
    SYBASE_OCS=OCS-15_0
    SYBASE=/sybase
    SYBASE_JRE_RTDS=/sybase/shared/SAPJRE-7_1_027_64BIT
    SYBASE_WS=WS-15_0
    SYBASE_ASE=ASE-15_0

    I do not have JRE variables in comparison with your output.

    Thanks.
    Javier



  • 10.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-05-2015 01:00:00 PM
    Hi Javier,

    "su - sybase" is going to be an interactive login. I would like to see the output from the "ssh" command I illustrated. The "SYBASE" environment variable is the only one we care about.

    Thanks,
      Neal


  • 11.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-05-2015 04:20:00 PM
    I execute command from another server to this one but no output:

    sybase@TST(/home/sybase)$ ssh sybase@xxx.xxx.xxx.81 env | grep SYBASE
    sybase@xxx.xxx.xxx.81's password:
    sybase@TST(/home/sybase)$




  • 12.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-05-2015 04:31:00 PM
    Hi Javier,

    So that is exactly the problem we have to fix. If we get that to work, the Delphix discovery will work.

    If you login interactively as "sybase", can you post the output from:

    * echo $SHELL
    * grep SYBASE .bashrc
    * grep SYBASE $SYBASE/SYBASE.sh

    Thanks,
      Neal



  • 13.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-05-2015 04:53:00 PM
    Neal,

    -bash-4.2$ echo $SHELL/bin/bash
    -bash-4.2$ grep SYBASE .bashrc
    SYBASE=/sybase
    export SYBASE
    ./sybase/SYBASE.sh
    -bash-4.2$ grep SYBASE $SYBASE/SYBASE.sh
    SYBASE_OCS="OCS-15_0"
    export SYBASE_OCS
    SYBASE="/sybase"
    export SYBASE
    SYBASE_ASE="ASE-15_0"
    export SYBASE_ASE
    SYBASE_JRE_RTDS="/sybase/shared/SAPJRE-7_1_027_64BIT"
    export SYBASE_JRE_RTDS
    SYBASE_WS="WS-15_0"
    export SYBASE_WS
    -bash-4.2$

    Thanks.
    Javier


  • 14.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-05-2015 06:06:00 PM
    Hi Javier,

    I would expect the "SYBASE=/sybase" and followed by "export SYBASE" to work.

    The "./sybase/SYBASE.sh" should actually be ". /sybase/SYBASE.sh" (dot followed by a space and then the path to the script). Try changing that and see if it works.

    If not, I could do a WebEx later today.

    Thanks,
      Neal


  • 15.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-05-2015 06:11:00 PM
    Neal,

    The export its after SYBASE=/sybase and there is not space between . and / in the execution.

    Any other way of doing this by console and get more information about?

    Thanks.
    Javier.


  • 16.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-05-2015 07:10:00 PM
    Hello Javier,

    If there is a space between the . and the /sybase/SYBASE.sh it should be setting the environment variables and you should see this by using the "ssh" test I mentioned earlier. This is actually what Delphix does during the first steps of discovery. It makes a ssh connection to the ASE server and gets the SYBASE environment variable.

    I may need to see the complete ".bashrc" to see if there is something else affecting this.

    I should be available in about an hour if you would like to troubleshoot via a WebEx.

    Thanks,
      Neal


  • 17.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-05-2015 07:13:00 PM
    -bash-4.2$ cat .bashrc
    PATH=$PATH:/sybase/ASE15_0/bin
    export PATH

    SYBASE=/sybase
    export SYBASE

    ./sybase/SYBASE.sh




  • 18.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-05-2015 07:19:00 PM
    Hello,

    As far as I can tell, it looks correct but it is too difficult to troubleshoot from this forum.

    Thanks,
      Neal


  • 19.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-05-2015 08:56:00 PM
    Neal,

    Finally I could solve the problem adding SYBASE enviroment variables to .ssh/enviroment file.

    But the enviroment is not shown on enviroments lists when I want ot add a database on add dsource however is it shown on enviroments.

    Snapshot attached.

    Thanks.
    Javier.


  • 20.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-05-2015 09:15:00 PM
    Hi Javier,

    Good news!

    So the general process of environment discovery follows this sequence of events:
    • Get the $SYBASE environment variable by looking for the environment variable in the user’s list of environment variables (the user as specified in the OS Username of the Add Environment dialogue).
    • Get the path to the isql binary looking under $SYBASE
    • List the running instances using ps (see get_ase_instances.sh in the toolkit directory for details).
    • For each instance:
      • Get the list of ports by running isql and querying the syslisteners table (see get_ase_instance_ports.sh for details).
      • Connect via JDBC using the port retrieved from syslisteners and the host/IP entered in the environment definition screen. After successfully connecting, retrieve @@servername. Use the first port that works where @@servername is the same as the value from ps.
      • Discover the list of user databases for each instance by querying sysdatabases (excluding the system databases 'master', 'model', 'sybsystemdb', ‘sybsystemprocs' and ‘tempdb').
    So if the database user that was specified in the "Add Environment" dialogue box does not have permission to query "syslisteners" or "sysdatabases" for a given ASE instance, that database will not be added to the environment.

    I can't tell from the screen shot but if you are on the "Environments" screen in the top right corner, there is a circular databases icon. If you click on it, does it show any ASE instances discovered but maybe it isn't listing the user databases?

    You can try running these two scripts manually (the scripts will appear to hang at which point you will need to enter the database user's :

    $ cd /the_delphix_toolkit_directory/
    $ find . -name get_ase_instances.sh
    $ sh ./get_ase_instances.sh
    <ASE password>
    /export/home/sybase/toolkit/Delphix_COMMON_564d3b4d_136a_7af6_cc70_c377235272ed_sybase_host/scripts/bin/dlpx_pfexec: sudo: not found
    SRC_157_4K,  sybase

    $ sh ./get_ase_instance_ports.sh SRC_157_4K sa $SYBASE/$SYBASE_OCS/bin/isql $SYBASE
    <ASE password>
    Password: nstacksolase2.dcenter.delphix.com 5000

    Thanks,
      Neal


  • 21.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-05-2015 10:17:00 PM
    Neal,

    Only these scripts available:

    -bash-4.2$ pwd
    /home/sybase/Delphix/Delphix_COMMON_e4c77b52_4130_4b46_a87b_64ea31ff742f_sybase_host/scripts/ase
    -bash-4.2$ ls -ltr
    total 24
    -rw-rw-r--    1 sybase   sybase         1747 Nov 05 18:52 get_next_backup.sh
    -rw-rw-r--    1 sybase   sybase         1810 Nov 05 18:52 get_bs_errorlog.sh
    -rw-rw-r--    1 sybase   sybase         2100 Nov 05 18:52 get_ase_instance_ports.sh

    No get_ase_instances.sh.

    Thanks.
    Javier.


  • 22.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-05-2015 11:38:00 PM
    Hello,

    Hmmm...They may have changed the process a little in the most recent version. The database user you provided during environment discover has permission to query "syslisteners" and "sysdatabases"?

    If so, I'll need to look at the support bundle to understand why it didn't discover the databases. You can upload here following the instructions here:
    https://support.delphix.com/hc/en-us/articles/201655216-Best-Practice-Uploading-Support-Logs

    Let me know the name of the file and I will look at it tomorrow morning.

    Thanks,
      Neal



  • 23.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-06-2015 12:27:00 PM
    Neal,

    Yes, the user I provided to Delphix was "sa".

    I cannot transfer files may be security reasons, but I could download it. Can I send you by mail or another way? 15MB size.

    Thanks.
    Javier.


  • 24.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-06-2015 12:32:00 PM
    Finally I could transfer it.
    Thanks.
    javier.


  • 25.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-06-2015 01:00:00 PM
    Hi Javier,

    What is the name of the file you uploaded? There are a lot of files and unless the file is associated with a case number, it is difficult for me to tell which one is yours.

    Thanks,
      Neal


  • 26.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-06-2015 01:23:00 PM
    Neal,

    I have uploaded again with number 11223.

    Thanks.
    Javier.


  • 27.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-06-2015 01:42:00 PM
    Hi Javier,

    Thanks for the upload. The log file shows it does not have "sudo" permission for ps:

    [2015-11-05 18:52:43,682][DEBUG][util.ProcessExplorer#findArgs:292][Worker-171|JOB-136|ENVIRONMENT_DISCOVER(UNIX_HOST_ENVIRONMENT-22)][ACTION-337] Could not run ps:  RemoteResult{status=1, stdout=ERROR: No sudo privileges or incorrect password, stderr=}

    Could you double check that your sudo permission for "ps" and "nfso":
    https://docs.delphix.com/display/DOCS43/Sudo+File+Configurations#SudoFileConfigurations-Configurings...

    Thanks,
      Neal


  • 28.  RE: error while discovering SAP ASE 15.7 on AIX 7.1

    Posted 11-06-2015 05:22:00 PM
    Perfect neal, works excelent!!!!

    Really appreciate your help!!!

    Thanks.
    Javier.