Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-20608

ambari setup incorrect link on mysql jdbc connector

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.5.0
    • 2.5.1
    • ambari-server
    • None

    Description

      Found this error during to ambari-server setup.

      [root@ctr-e129-1487033772569-54256-01-000002 ~]# ambari-server setup
      Using python  /usr/bin/python
      Setup ambari-server
      Checking SELinux...
      SELinux status is 'disabled'
      Customize user account for ambari-server daemon [y/n] (n)? 
      Adjusting ambari-server permissions and ownership...
      Checking firewall status...
      Checking JDK...
      Do you want to change Oracle JDK [y/n] (n)? 
      Completing setup...
      Configuring database...
      Enter advanced database configuration [y/n] (n)? 
      Configuring database...
      Configuring ambari database...
      Copying JDBC drivers to server resources...
      ERROR: Unexpected IOError: [Errno 2] No such file or directory: '/usr/share/java/jdbc-mysql.jar'
      For more info run ambari-server with -v or --verbose option
      

      Its looks like incorrect link on mysql jdbc connector. In our code provide these options

      2017-03-22 23:20:44,319 DEBUG com.hw.ambari.ui.util.cluster_managers.CommandExecutor.executeCommandSequence(): Sending command [yum -y install wget]
      2017-03-22 23:20:44,319 DEBUG com.hw.ambari.ui.util.cluster_managers.CommandExecutor.executeCommandSequence(): Sending command [yum -y install mysql-connector-java]
      2017-03-22 23:20:44,319 DEBUG com.hw.ambari.ui.util.cluster_managers.CommandExecutor.executeCommandSequence(): Sending command [rm -rf /usr/share/java/mysql-connector-java*.jar]
      2017-03-22 23:20:44,319 DEBUG com.hw.ambari.ui.util.cluster_managers.CommandExecutor.executeCommandSequence(): Sending command [mkdir -p /tmp/mysql-connector-java]
      2017-03-22 23:20:44,319 DEBUG com.hw.ambari.ui.util.cluster_managers.CommandExecutor.executeCommandSequence(): Sending command [wget http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.37.tar.gz -O /tmp/mysql-connector-java.tar.gz >/dev/null 2>&1]
      2017-03-22 23:20:44,319 DEBUG com.hw.ambari.ui.util.cluster_managers.CommandExecutor.executeCommandSequence(): Sending command [tar -zxvf /tmp/mysql-connector-java.tar.gz -C /tmp/mysql-connector-java >/dev/null]
      2017-03-22 23:20:44,320 DEBUG com.hw.ambari.ui.util.cluster_managers.CommandExecutor.executeCommandSequence(): Sending command [mkdir -p /usr/share/java]
      2017-03-22 23:20:44,320 DEBUG com.hw.ambari.ui.util.cluster_managers.CommandExecutor.executeCommandSequence(): Sending command [cp /tmp/mysql-connector-java/mysql-connector-java-*/mysql-connector-java-*-bin.jar /usr/share/java/mysql-jdbc-qe.jar]
      2017-03-22 23:20:44,320 DEBUG com.hw.ambari.ui.util.cluster_managers.CommandExecutor.executeCommandSequence(): Sending command [chmod -R 777 /usr/share/java]
      2017-03-22 23:20:44,320 DEBUG com.hw.ambari.ui.util.cluster_managers.CommandExecutor.executeCommandSequence(): Sending command [unlink /usr/share/java/mysql-connector-java.jar]
      2017-03-22 23:20:44,320 DEBUG com.hw.ambari.ui.util.cluster_managers.CommandExecutor.executeCommandSequence(): Sending command [rm -f /usr/share/java/mysql-connector-java.jar]
      2017-03-22 23:20:44,320 DEBUG com.hw.ambari.ui.util.cluster_managers.CommandExecutor.executeCommandSequence(): Sending command [ln -s /usr/share/java/mysql-jdbc-qe.jar /usr/share/java/mysql-connector-java.jar]

      And according to expected behavior, ambari should be used mysql-jdbc-qe.jar

      Attachments

        1. AMBARI-20608.patch
          3 kB
          Vitaly Brodetskyi

        Activity

          People

            vbrodetskyi Vitaly Brodetskyi
            vbrodetskyi Vitaly Brodetskyi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: