Problems With The Agent After Os Upgrade

by Nov 20, 2014

Hello!

 

I am having some problems with getting the uptimeagent to work smoothly on two servers after an OS upgrade. Prior to the OS upgrade everything was working fine.

 

The servers was running Ubuntu Server 12.04 LTS x64 with uptime agent 5.01 in daemon mode and everything was working fine.

 

I upgraded the Ubuntu Server 12.04 with the command “do-release-upgrade” to Ubuntu 14.04.1 LTS. After the upgrade and reboot the uptimeagent doesn’t start.

 

When I run “sudo /opt/uptime-agent/bin/agent-configure.sh status” I get no output what so ever.

(EDIT: I found now by looking in this script that it doesn’t have the “status” operator in agent version 5.01. Though the script should have given a usage output)

 

I noticed that there was a newer version of the agent install package (uptimeagent-6.0.0-linux-amd64.deb) than which I had installed, so I proceeded to first uninstall my old 5.01 package with the command “sudo dpkg –purge uptimeagent-linux” and then installed the new 6.0 package with the command “sudo dpkg -i uptimeagent-6.0.0-linux-amd64.deb”

 

The installation complains during step 3 that there’s no xinetd or inetd installed, which I knew. Install is completed.

 

I run the command “sudo /opt/uptime-agent/bin/agent-cfg.sh status” to verify current status, and this time I get an output:

 

Safe Wrapper = OFF

Uptime Daemon = OFF

agent.conf is set to xinetd

grep: /etc/xinetd.d/uptimeagent: No such file or directory

up.time agent being run as the user 

PORT = 9998

Port is closed

 

I go ahead and run: “sudo /opt/uptime-agent/bin/agent-cfg.sh daemon on” to switch to daemon mode.

 

I once again run the command “sudo /opt/uptime-agent/bin/agent-cfg.sh status” and get this output:

 

Safe Wrapper = OFF

Uptime Daemon = OFF

agent.conf is set to daemon

up.time agent being run as the user uptimeagent

PORT = 9998

Port is closed

 

If I run “sudo /opt/uptime-agent/bin/agent-cfg.sh start” it says:

 

“Starting the daemon…..”

 

followed by

 

“Invalid Log Level”

 

and then nothing. Agent doesn’t start. I do a “sudo nmap localhost” and there’s nothing listening on TCP port 9998

 

I noticed that the agent-cfg.sh output says “up.time agent being run as the user uptimeagent” but there’s no such user created on my servers by the install package.

 

I went ahead to create this user myself and added it as a system user and gave this user ownership of the /opt/uptime-agent/ folder, and restarted the agent with “agent-cfg.sh start”

 

On one of the two servers this worked and the Up.Time server can now contact the agent. On the other server I still get the error “Invalid Log Level” and then nothing.

 

I have found the “log_level” setting in “/opt/uptime-agent/conf/agent.conf” and it is set to “log_level=NONE” But also on the working server.

 

Advice please.

 

Kind regards.

 

 

PS. If the user “uptimeagent” is needed for the agent to work, this should be created by the install package, and the correct permissions should be set.