Support Questions

Find answers, ask questions, and share your expertise

ambari-server restart : Ambari Server java process died with exitcode 255

Explorer

@Aditya Sirna

@Jay Kumar SenSharma

I tried to run the following command :

ambari-server restart

But I got the following error :

ambari-server restart 
Using python  /usr/bin/python          
Restarting ambari-server               
Ambari Server is not running          
Ambari Server running with administrator privileges.     
Organizing resource files at /var/lib/ambari-server/resources...   
Ambari database consistency check started...             
Server PID at: /var/run/ambari-server/ambari-server.pid     
Server out at: /var/log/ambari-server/ambari-server.out  
Server log at: /var/log/ambari-server/ambari-server.log  
Waiting for server start.........Unable to determine server PID. Retrying...   
......Unable to determine server PID. Retrying...     
......Unable to determine server PID. Retrying...    
ERROR: Exiting with exit code -1.       
REASON: Ambari Server java process died with exitcode 255. Check /var/log/ambari-server/ambari-server.out for more information.

Can somebody help me out ?

11 REPLIES 11

@Amogh Suman

Can you please attach ambari server log file. /var/log/ambari-server/ambari-server.log . This will give more info regarding the error.

Thanks,

Aditya

Explorer

@Aditya Sirna

How can I download the ambari-server.log into my own laptop ? It is on the cloud.

@Amogh Suman,

If you are using Linux, you can do scp

scp root@sandbox.hortonworks.com:/var/log/ambari-server/ambari-server.log {some path in ur laptop}

If you are using Windows, you can use tools like winscp to connect to the box and download.

For now, you can check ERROR messages in the file and paste the content .

@Amogh Suman,

Create a file with this name and put the ambari version in it. For ex: if 2.6.0.0. then run the command

echo "2.6.0.0" >> /var/lib/ambari-server/resources/version

You can get the ambari version by clicking the username button on top right -> About

Explorer
@Aditya Sirna

I re-installed everything. Very frustrating for me....

Super Mentor

@Amogh Suman

Please share the File "/var/log/ambari-server/ambari-server.out"

Also please let us know if you are trying to start Ambari Server as "root" user or as Non - Root user?

Is that user has the permission to read/write the file "/var/run/ambari-server/ambari-server.pid" ?

Super Mentor

@Amogh Suman

Please share the output of the following command:

# cat /var/log/ambari-server/ambari-server.out

Explorer

@Jay Kumar SenSharma

I got the following output :

OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0                                                       
An unexpected error occured during starting Ambari Server.                                                                                           
org.apache.ambari.server.AmbariException: Server version file does not exist.                                                                        
        at org.apache.ambari.server.checks.DatabaseConsistencyCheckHelper.checkDBVersionCompatible(DatabaseConsistencyCheckHelper.java:229)          
        at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:1058)    

Explorer

@Jay Kumar SenSharma

I trying to start Ambari server as root user.

Explorer

@Jay Kumar SenSharma

I re-installed everything .. got frustrated 😞 😞

Super Mentor

@Amogh Suman

The error that you were getting as following is because of missing file "/var/lib/ambari-server/resources/version"

org.apache.ambari.server.AmbariException: Server version file does not exist.                                                                        
        at org.apache.ambari.server.checks.DatabaseConsistencyCheckHelper.checkDBVersionCompatible(DatabaseConsistencyCheckHelper.java:229)          
        at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:1058)

.

Ambari uses this file to find out the version. The version mentioned in this file should be 4 Digit Version number of Ambari.

If this file is missing then you will get the above error while starting the server. In your case that file might be deleted somehow.

# cat /var/lib/ambari-server/resources/version
2.6.0.0

# ambari-server --version
2.6.0.0-162

So if you encounter the same problem again in future then please Create this file and then Add the 4 Digit Ambari Server Version inside this file and then restart ambari server.

.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.