Coder Social home page Coder Social logo

Comments (7)

yuezh avatar yuezh commented on June 12, 2024

Sure, we should improve the error handling :)
Thanks

from walinuxagent.

kuni-nakaji avatar kuni-nakaji commented on June 12, 2024

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.

yuezh avatar yuezh commented on June 12, 2024

Hi, @kuni-nakaji. We will fix this in 2.1.2 release.

from walinuxagent.

kuni-nakaji avatar kuni-nakaji commented on June 12, 2024

Thx, @yuezh !!

from walinuxagent.

alager avatar alager commented on June 12, 2024

@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.

alager avatar alager commented on June 12, 2024

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.

ahmetb avatar ahmetb commented on June 12, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.