Comments (7)
Sure, we should improve the error handling :)
Thanks
from walinuxagent.
We have got same error in the WALinuxAgent-2.0.14 running on centos
2015/11/04 19:26:19 ERROR:Retry=0
2015/11/04 19:26:19 ERROR:HTTP Req: POST /machine?comp=health
2015/11/04 19:26:19 ERROR:HTTP Req: Data=<?xml version="1.0" encoding="utf-8"?><Health xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GoalStateIncarnation>4</GoalStateIncarnation><Container><ContainerId>xxxxx</ContainerId><RoleInstanceList><Role><InstanceId>xxxxx</InstanceId><Health><State>Ready</State></Health></Role></RoleInstanceList></Container></Health>
2015/11/04 19:26:19 ERROR:HTTP Req: Header={'Content-Type': 'text/xml; charset=utf-8', 'x-ms-version': '2012-11-30', 'x-ms-agent-name': 'WALinuxAgent'}
2015/11/04 19:26:19 ERROR:HTTP Err: Status=503
2015/11/04 19:26:19 ERROR:HTTP Err: Reason=Service Unavailable
2015/11/04 19:26:19 ERROR:HTTP Err: Header=[('date', 'Wed, 04 Nov 2015 19:26:18 GMT'), ('connection', 'close'), ('content-type', 'text/html; charset=us-ascii'), ('content-length', '326'), ('server', 'Microsoft-HTTPAPI/2.0')]
2015/11/04 19:26:19 ERROR:HTTP Err: Body=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
2015/11/04 19:26:19 ERROR:<HTML><HEAD><TITLE>Service Unavailable</TITLE>
2015/11/04 19:26:19 ERROR:<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
2015/11/04 19:26:19 ERROR:<BODY><h2>Service Unavailable</h2>
2015/11/04 19:26:19 ERROR:<hr><p>HTTP Error 503. The service is unavailable.</p>
2015/11/04 19:26:19 ERROR:</BODY></HTML>
2015/11/04 19:26:19 ERROR:
2015/11/04 19:26:29 ERROR:Retry=1
2015/11/04 19:26:29 ERROR:HTTP Req: POST /machine?comp=health
2015/11/04 19:26:29 ERROR:HTTP Req: Data=<?xml version="1.0" encoding="utf-8"?><Health xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GoalStateIncarnation>4</GoalStateIncarnation><Container><ContainerId>xxxxx</ContainerId><RoleInstanceList><Role><InstanceId>xxxxx</InstanceId><Health><State>Ready</State></Health></Role></RoleInstanceList></Container></Health>
2015/11/04 19:26:29 ERROR:HTTP Req: Header={'Content-Type': 'text/xml; charset=utf-8', 'x-ms-version': '2012-11-30', 'x-ms-agent-name': 'WALinuxAgent'}
2015/11/04 19:26:29 ERROR:HTTP Err: Status=503
2015/11/04 19:26:29 ERROR:HTTP Err: Reason=Service Unavailable
2015/11/04 19:26:29 ERROR:HTTP Err: Header=[('date', 'Wed, 04 Nov 2015 19:26:29 GMT'), ('connection', 'close'), ('content-type', 'text/html; charset=us-ascii'), ('content-length', '326'), ('server', 'Microsoft-HTTPAPI/2.0')]
2015/11/04 19:26:29 ERROR:HTTP Err: Body=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
2015/11/04 19:26:29 ERROR:<HTML><HEAD><TITLE>Service Unavailable</TITLE>
2015/11/04 19:26:29 ERROR:<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
2015/11/04 19:26:29 ERROR:<BODY><h2>Service Unavailable</h2>
2015/11/04 19:26:29 ERROR:<hr><p>HTTP Error 503. The service is unavailable.</p>
2015/11/04 19:26:29 ERROR:</BODY></HTML>
2015/11/04 19:26:29 ERROR:
2015/11/04 19:26:39 ERROR:Traceback (most recent call last):
2015/11/04 19:26:39 ERROR: File "/usr/sbin/waagent", line 6048, in main
2015/11/04 19:26:39 ERROR: WaAgent.Run()
2015/11/04 19:26:39 ERROR: File "/usr/sbin/waagent", line 5634, in Run
2015/11/04 19:26:39 ERROR: incarnation = self.ReportReady()
2015/11/04 19:26:39 ERROR: File "/usr/sbin/waagent", line 5221, in ReportReady
2015/11/04 19:26:39 ERROR: a = self.HttpPostWithHeaders("/machine?comp=health", healthReport)
2015/11/04 19:26:39 ERROR: File "/usr/sbin/waagent", line 2840, in HttpPostWithHeaders
2015/11/04 19:26:39 ERROR: maxRetry=maxRetry, chkProxy=chkProxy)
2015/11/04 19:26:39 ERROR: File "/usr/sbin/waagent", line 2790, in HttpPost
2015/11/04 19:26:39 ERROR: maxRetry=maxRetry, chkProxy=chkProxy)
2015/11/04 19:26:39 ERROR: File "/usr/sbin/waagent", line 2759, in HttpRequest
2015/11/04 19:26:39 ERROR: raise HttpResourceGoneError("Http resource gone.")
2015/11/04 19:26:39 ERROR:HttpResourceGoneError: Http resource gone.
2015/11/04 19:26:39 ERROR:
2015/11/04 19:26:39 ERROR:Exception: Http resource gone.
from walinuxagent.
Hi, @kuni-nakaji. We will fix this in 2.1.2 release.
from walinuxagent.
Thx, @yuezh !!
from walinuxagent.
@yuezh, is there an ETA on when the 2.1.2 will be pushed to the repositories(ubuntu 14.04)?
What is the work around, besides just logging in every day to see if the agent is still running?
Thanks!
from walinuxagent.
FYI, I modified the startup script, /etc/init/walinuxagent.conf to add respawing, with a time delay:
description "Windows Azure Linux agent"
author "Ben Howard <[email protected]>"
#modified by Aaron Lager <[email protected]> to add respawning with time delay
start on runlevel [2345]
stop on runlevel [!2345]
#respawn if died of unnatrual cuases
#try 10 times within 100 seconds, then give up
respawn
respawn limit 10 100
#this little bit, slows down the respawinging process
env SLEEP_TIME=1
post-stop script
goal=`initctl status $UPSTART_JOB | awk '{print $2}' | cut -d '/' -f 1`
if [ $goal != "stop" ]; then
sleep $SLEEP_TIME
NEW_SLEEP_TIME=`expr 2 * $SLEEP_TIME`
if [ $NEW_SLEEP_TIME -ge 60 ]; then
NEW_SLEEP_TIME=60
fi
initctl set-env SLEEP_TIME=$NEW_SLEEP_TIME
fi
end script
pre-start script
[ -r /etc/default/walinuxagent ] && . /etc/default/walinuxagent
if [ "$WALINUXAGENT_ENABLED" != "1" ]; then
stop ; exit 0
fi
if [ ! -x /usr/sbin/waagent ]; then
stop ; exit 0
fi
#Load the udf module
modprobe -b udf
end script
exec /usr/sbin/waagent -daemon
Hope this can help someone.
Aaron
from walinuxagent.
@alager thanks for providing a workaround.
The init scripts for the recent versions of waagent incorporated the patch adding respawn
directive to the init script.
Please pick up one of the recent images from Azure if you are still seeing this issue.
from walinuxagent.
Related Issues (20)
- [BUG] DNS issue where deprovisioning sets the hostname to localhost.localdomain HOT 1
- Running collect-logs HOT 2
- Log collection: Memory limit HOT 1
- [BUG] CPU credits drain on B1ls after update to 2.10.0.3 HOT 16
- Issue with extensions when Lib.Dir is modifiend in /etc/waagent.conf HOT 6
- How to disable Azure Portal to automatically install OmsAgentForLinux on my VM? HOT 2
- [BUG] the agent go offline randomly. ERROR ExtHandler ExtHandler Error fetching the goal state in waagent.log HOT 1
- [BUG] WALinuxAgent not updating to latest on Ubuntu HOT 3
- [BUG] VMAccess does not work for FreeBSD HOT 1
- [BUG] Ubuntu versions >= 18.04 checking for dhclient lease files
- [BUG] Flatcar Linux 3602.2.1 Boot Errors HOT 2
- [BUG] udev path mappings for data disks broken in Rocky Linux 9.1 image HOT 2
- [BUG] OpenBSD Deployment Failed HOT 1
- [BUG] Ubuntu22: MonitorHostname does not update iDNS
- [BUG] Ubuntu 2204 & Azure Linux v2: v2.9.1.1 fails to assign IP address for IB interface HOT 1
- [RHEL8] chrony service fails to start at boot on Azure VMs if udev has not finished creating /dev/ptp_hyperv symbolic link HOT 3
- [BUG] AlmaLinux 8 support HOT 7
- whitelist extensions and prevent them from being removed HOT 1
- waagent deplets all available inodes HOT 2
- [BUG] Missing disk operation metrics HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from walinuxagent.