Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

I am getting error while trying to perform Ambari server setup. Can someone provide guidance?

avatar
Contributor

[root@sandbox ~]# sudo yum -y install ambari-server

Loaded plugins: fastestmirror, ovl, priorities

Setting up Install Process

Loading mirror speeds from cached hostfile * base: mirrors.cmich.edu * epel: mirror.steadfast.net * extras: mirrors.cmich.edu * updates: mirrors.lga7.us.voxel.net

Package ambari-server-2.4.0.0-1225.x86_64 already installed and latest version

Nothing to do

[root@sandbox ~]# 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)? n ERROR: Failed: [Errno 22] Invalid argument: '/var/run/ambari-server/bootstrap'

ERROR: Exiting with exit code 4. REASON: Failed to create user. Exiting.

1 ACCEPTED SOLUTION

avatar

What's the output of ambari-server status command? You should see something like:

[root@sandbox ~]# ambari-server status
Using python  /usr/bin/python
Ambari-server status
Ambari Server running
Found Ambari Server PID: 1356 at: /var/run/ambari-server/ambari-server.pid
[root@sandbox ~]#

If it's stopped, try:

ambari-server start
ambari-agent restart

Then try the Ambari URL again.

View solution in original post

9 REPLIES 9

avatar

@Manish Anand

Customize user account for ambari-server daemon [y/n] (n)" It appears like Ambari server is trying to create the user. can you keep the default value for " and just press enter and see how that goes?

avatar
Contributor

@apappu

I tried all the options with 'y' , 'n' and no value (enter only). In all these steps, I received the same error.

avatar

Hi @Manish,

You cannot run the ambari-server setup command on the Hortonworks Sandbox. It's already been completed for you. Once the Sandbox is running, go to http://127.0.0.1:8888/ to get to the welcome page and to enable your access to the Ambari UI. See blow:

12303-screen-shot-2017-02-10-at-25005-pm.png

Then click on Quick Links on the botton right to get the Ambari access instructions:

12304-screen-shot-2017-02-10-at-25107-pm.png

avatar
Contributor

Hi @Ameet,

I am unable to access the Ambari URL even though http://127.0.0.1:8888/ is accessible.

capture.jpg

avatar

What's the output of ambari-server status command? You should see something like:

[root@sandbox ~]# ambari-server status
Using python  /usr/bin/python
Ambari-server status
Ambari Server running
Found Ambari Server PID: 1356 at: /var/run/ambari-server/ambari-server.pid
[root@sandbox ~]#

If it's stopped, try:

ambari-server start
ambari-agent restart

Then try the Ambari URL again.

avatar
Contributor

Its not running and throwing error for some issue with PostgreSQL.

[root@sandbox ~]# ambari-server status

Using python /usr/bin/python Ambari-server status

Ambari Server not running.

Stale PID File at: /var/run/ambari-server/ambari-server.pid

[root@sandbox ~]# ambari-server restart

Using python /usr/bin/python Restarting ambari-server

Using python /usr/bin/python

Stopping ambari-server

Ambari Server is not running

Using python /usr/bin/python

Starting ambari-server

Ambari Server running with administrator privileges.

Running initdb: This may take up to a minute.

About to start PostgreSQL

ERROR: Exiting with exit code 1.

REASON: Unable to start PostgreSQL server. Status None. . Exiting

[root@sandbox ~]#

avatar

Hmmm.. interesting. I'm not sure how the postgres DB failed or stopped, but now that we've established this is the Sandbox, I'd suggest just killing this instance and upload a new Sandbox instance and try the steps I've outlined in my first reply.

avatar
Rising Star

@Manish Anand it could be that in trying to re-run the ambari-server install you inadvertantly corrupted the postgreSQL database that was part of the Sandbox. It makes more sense to blow this away and reimport the Sandbox image rather than try and troubleshoot the problem.

avatar

I also recommend that we review one issue per HCC topic. I believe my initial comment answered the original question, but please mark it as so if you agree. Thanks