Created on 05-21-2019 09:49 PM
1. Get the output from Ambari server
http://AMBARI-HOST:8080/api/v1/stacks/HDP/versions?fields=repository_versions/operating_systems/repo...
2. Copy the json of "operating_systems" outer block of step1 output and create repo.json file -
it would looks like repo.json
3. update repo.json file to reflect your changes/modifications.
4. now run below API call to update.
curl -insecure -H "X-Requested-By:ambari" --user admin:admin --data @repo.json -X PUT http://AMBARI-HOST:8080/api/v1/stacks/HDP/versions/3.1/repository_versions/1
Note: please make sure you include correct repo version id at the end. in this case it is 1
5. Now go and check in UI to see if those changes reflects.
Note: This tried and tested in Ambari2.7.x
Created on 05-22-2019 03:41 AM
Helpfull Article to update Repo URLS incase manage version UI is not loading.
Created on 06-18-2021 11:24 PM
Hi, This was really helpful as we were not able to change the baseurls in Ambari due to some errors.
While trying Step4 and executing the curl command, I am facing the below error message from Ambari:
p://<node>:8080/api/v1/stacks/HDP/versions/3.1/repository_versions/302/
HTTP/1.1 100 Continue
HTTP/1.1 500 Internal Server Error
Date: Sat, 19 Jun 2021 06:07:38 GMT
X-Frame-Options: ALLOW
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Cache-Control: no-store
Pragma: no-cache
Set-Cookie: AMBARISESSIONID=node0onkjuwcpwf2c6wyejo1o42go0.node0;Path=/;HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
User: admin
Content-Type: text/plain;charset=utf-8
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
{
"status" : 500,
"message" : "An internal system exception occurred: Json structure for operating systems is incorrect"
Could you please help us resolve the issue.
Created on 06-21-2021 01:05 AM
Hi Arvind , Can you check the Ambari server logs to see what error you are getting. If you are seeing something like this :
Caused by: org.apache.ambari.server.AmbariException: Base url is missing for request RepositoryRequest
Try to add this :
gpl.license.accepted=true" in /etc/ambari-server/conf/ambari.properties and restart ambari-server.