Support Questions

Find answers, ask questions, and share your expertise

Ambari Server and Web Client versions do not match

avatar
Contributor

Im using ambari 2.4.1 and HDP 2.5 which was running absolutely fine. I have tried installing apache eagle on the clsuter and in the process ran eagle-ambari.sh script and from then onwards, i cant open ambari with version mismatch error. There is no much info on the earlier posts.

15762-capture.png

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Rajesh Reddy

You are not supposed to change the "/usr/lib/ambari-server/web/javascripts/app.js" manually.

If the ambari installation is properly done then you should get the correct version mentioned in the "app.js". Because this is done at the Ambari RPM Build time.

Ambari uses the following script to update the App.version during the time of RPM build.

https://github.com/apache/ambari/blob/release-2.4.1/ambari-web/set-ambari-version.sh#L24

.

So if you see that your "/usr/lib/ambari-server/web/javascripts/app.js" was showing some other version then it indicates that during ambari upgrade on that host this file was not upgraded properly and hence there may be some other files as well that might not be upgraded properly which might be causing the Stuck UI issue.

.

Please try doing a ambari re-install as following to see it it helps: (Always recommended to take a fresh DB dump for safety)

yum reinstall ambari-server 

.

Can you let us know what was the older verison mentioned in the "App.version" ? Was it showing "2.0.0" earlier before your manual edit ?

.

View solution in original post

17 REPLIES 17

avatar
Contributor

Hi @Jay SenSharma yes the app verson was 2.0.0. i have upgraded ambari from 2.4.0 to 2.4.1. Not sure how 2.0.0 was in it and how it was working earlier.

avatar
Contributor

I have reinstalled ambari-server but UI is still stuck and no file named set-ambari-version.sh is available in the cluster.

[root@server db]# find / -name set-ambari-version.sh

[root@server db]# date Fri May 26 15:24:23 IST 2017 [root@server db]#

avatar
Master Mentor

@Rajesh Reddy

You will not find that file in your file system. The "set-ambari-version.sh" script is only used when some one tries to build ambari from github and when making RPM it is used to set the version number.

As a user we simply download those RPMs from the ambari repo and install it. (Inside the RPM we do not ship that script)

avatar
Contributor

Hi @Jay SenSharma I have removed the file app.js and reinstalled ambari server using yum. Now after reinstallation, app.js file is reflecting correct version. However after login, ambari UI is stuck in below screen.

15841-capture.png

avatar
Master Mentor

@Rajesh Reddy

We will need to see the Java Script call that is getting stuck.

We can do so by using the "Developer Tools".

For example open URL in Google Chrome and then click on the

"Google Chrome Menu" --> "More Tools" --> Debugger Tools

Can you please share the output of the Debugger tools Specially from the "Network" tab which tells the call that is keep trying to get the response.

.

Also try running the following Curl Command :

# curl -u admin:admin -i -H 'X-Requested-By: ambari' -X POST -d '{"wizard-data":"{\"userName\":\"admin\",\"controllerName\":\"\"}"}'http://ambari.example.com:8080/api/v1/persist

.

You will need to replace the credentials and the ambari server hostname in the above command.

avatar
Contributor
@Jay SenSharma

Couldn't find much from the debugger tools. Curl has below details.

[root@server ambari-server]# curl -u admin:@dm1n -i -H 'X-Requested-By: ambari' -X POST -d '{"wizard-data":"{\"userName\":\"admin\",\"controllerName\":\"\"}"}' http://192.168.1.9:8080/api/v1/persist HTTP/1.1 202 Accepted X-Frame-Options: DENY X-XSS-Protection: 1; mode=block Set-Cookie: AMBARISESSIONID=sgdgux8qy76z18nlimhl2bo59;Path=/;HttpOnly Expires: Thu, 01 Jan 1970 00:00:00 GMT User: admin Content-Type: text/plain Content-Length: 0 Server: Jetty(8.1.19.v20160209)

15842-debug.png

[root@server ambari-server]#

avatar
Master Mentor

@Rajesh Reddy

While loading ambari UI ambari APIs also tries to read the whole cluster information's which also includes Alerts definition, That actually makes many DB calls.

Looks like your VM has some resource issues which is causing ambari to be very slow. (Thats why Ambari API calls are showing "ambari_server_performance" alert saying "Host resource exaustion")

https://github.com/apache/ambari/blob/release-2.5.0/ambari-server/src/main/resources/alerts.json#L43...

Can you try killing some of the processes manually like Oozie and Zeppelin and then restart ambari server to see if it loads fine.

.

avatar
Contributor

Hi @Jay SenSharma that solved the issue. Thanks for the support.