So it seems I have a variant of the problem described in continuous WebJob stops automatically.
The variation being that I have afforded to use Basic and set the site to Always On.
Still there are times when my webjob is shut down due to website shutting down, that's fine, but then the webjob does not start again. Not until I log into the Azure Management Portal and click the WebJobs Tab, at which time the webjob gets a "Starting" state and moments later it is "Running".
If you take a look at this excerpt from the log file you can see that at 19:16:31 all three instances have stopped (yes the website is set to have three instances so the webjob also has three instances, all fine). It should start up immediately again because the website started (not shown here but I have the Monitor Data from the Azure Portal showing me that requests came in later and that server errors were 0 (zero)). Only when I logged into the Portal in the morning (at 06:44:35) and actively selected the webjobs tab did the webjob start again, all three instances, all looks good.
[10/15/2015 14:02:21 > c260d5: SYS INFO] WebJob is still running
[10/15/2015 19:16:17 > c260d5: SYS INFO] WebJob is stopping due to website shutting down
[10/15/2015 19:16:18 > c260d5: SYS INFO] Status changed to Stopping
[10/15/2015 19:16:22 > fe23db: SYS INFO] WebJob is stopping due to website shutting down
[10/15/2015 19:16:22 > fe23db: SYS INFO] Status changed to Stopping
[10/15/2015 19:16:22 > c260d5: SYS INFO] Status changed to Success
[10/15/2015 19:16:22 > c260d5: SYS INFO] Status changed to Stopped
[10/15/2015 19:16:25 > fe23db: SYS INFO] Status changed to Success
[10/15/2015 19:16:25 > fe23db: SYS INFO] Status changed to Stopped
[10/15/2015 19:16:29 > a81043: SYS INFO] WebJob is stopping due to website shutting down
[10/15/2015 19:16:29 > a81043: SYS INFO] Status changed to Stopping
[10/15/2015 19:16:31 > a81043: SYS INFO] Status changed to Success
[10/15/2015 19:16:31 > a81043: SYS INFO] Status changed to Stopped
[10/16/2015 06:44:35 > c260d5: SYS INFO] Status changed to Starting
[10/16/2015 06:44:50 > c260d5: SYS INFO] Run script 'webjob' with script host - 'WindowsScriptHost'
[10/16/2015 06:44:50 > c260d5: SYS INFO] Status changed to Running
[10/16/2015 06:44:53 > c260d5: INFO] Found the following functions:
[10/16/2015 06:44:53 > c260d5: INFO] WebJob.Handler.HandlePossibleJobsFromJobQueue.PossibleJobArrived
[10/16/2015 06:44:53 > c260d5: INFO] Job host started
[10/16/2015 06:44:54 > c260d5: INFO] Executing: 'HandlePossibleJobsFromJobQueue.PossibleJobArrived' because New queue message detected on 'jobqueue'.
[10/16/2015 06:44:54 > c260d5: INFO] Executing: 'HandlePossibleJobsFromJobQueue.PossibleJobArrived' because New queue message detected on 'jobqueue'.
[10/16/2015 06:44:54 > c260d5: INFO] Executing: 'HandlePossibleJobsFromJobQueue.PossibleJobArrived' because New queue message detected on 'jobqueue'.
[10/16/2015 06:45:06 > a81043: SYS INFO] Status changed to Starting
[10/16/2015 06:45:07 > c260d5: INFO] Executing: 'HandlePossibleJobsFromJobQueue.PossibleJobArrived' because New queue message detected on 'jobqueue'.
[10/16/2015 06:45:07 > c260d5: INFO] Executing: 'HandlePossibleJobsFromJobQueue.PossibleJobArrived' because New queue message detected on 'jobqueue'.
[10/16/2015 06:45:07 > c260d5: INFO] Executing: 'HandlePossibleJobsFromJobQueue.PossibleJobArrived' because New queue message detected on 'jobqueue'.
[10/16/2015 06:45:08 > a81043: SYS INFO] Run script 'webjob' with script host - 'WindowsScriptHost'
[10/16/2015 06:45:08 > a81043: SYS INFO] Status changed to Running
[10/16/2015 06:45:10 > a81043: INFO] Found the following functions:
[10/16/2015 06:45:10 > a81043: INFO] WebJob.Handler.HandlePossibleJobsFromJobQueue.PossibleJobArrived
[10/16/2015 06:45:10 > a81043: INFO] Job host started
[10/16/2015 06:45:11 > a81043: INFO] Executing: 'HandlePossibleJobsFromJobQueue.PossibleJobArrived' because New queue message detected on 'jobqueue'.
[10/16/2015 06:45:11 > a81043: INFO] Executing: 'HandlePossibleJobsFromJobQueue.PossibleJobArrived' because New queue message detected on 'jobqueue'.
[10/16/2015 06:45:11 > a81043: INFO] Executing: 'HandlePossibleJobsFromJobQueue.PossibleJobArrived' because New queue message detected on 'jobqueue'.
[10/16/2015 06:45:12 > c260d5: INFO] Executing: 'HandlePossibleJobsFromJobQueue.PossibleJobArrived' because New queue message detected on 'jobqueue'.
[10/16/2015 06:45:12 > c260d5: INFO] Executing: 'HandlePossibleJobsFromJobQueue.PossibleJobArrived' because New queue message detected on 'jobqueue'.
[10/16/2015 06:45:13 > c260d5: INFO] Executing: 'HandlePossibleJobsFromJobQueue.PossibleJobArrived' because New queue message detected on 'jobqueue'.
[10/16/2015 06:45:15 > fe23db: SYS INFO] Status changed to Starting
[10/16/2015 06:45:15 > c260d5: INFO] Executing: 'HandlePossibleJobsFromJobQueue.PossibleJobArrived' because New queue message detected on 'jobqueue'.
[10/16/2015 06:45:15 > c260d5: INFO] Executing: 'HandlePossibleJobsFromJobQueue.PossibleJobArrived' because New queue message detected on 'jobqueue'.
[10/16/2015 06:45:15 > c260d5: INFO] Executing: 'HandlePossibleJobsFromJobQueue.PossibleJobArrived' because New queue message detected on 'jobqueue'.
[10/16/2015 06:45:17 > fe23db: SYS INFO] Run script 'webjob' with script host - 'WindowsScriptHost'
[10/16/2015 06:45:17 > fe23db: SYS INFO] Status changed to Running
[10/16/2015 06:45:19 > fe23db: INFO] Found the following functions:
[10/16/2015 06:45:20 > fe23db: INFO] WebJob.Handler.HandlePossibleJobsFromJobQueue.PossibleJobArrived
[10/16/2015 06:45:20 > fe23db: INFO] Job host started
[10/16/2015 06:45:19 > c260d5: INFO] Executing: 'HandlePossibleJobsFromJobQueue.PossibleJobArrived' because New queue message detected on 'jobqueue'.
[10/16/2015 06:45:20 > c260d5: INFO] Executing: 'HandlePossibleJobsFromJobQueue.PossibleJobArrived' because New queue message detected on 'jobqueue'.
So why is this happening? And how can I avoid this problem?
Related
I've deployed my flask app on heroku, and i'm getting "Method not allowed" in my browser at the url.
all my routes have the methods set. I'm not trying to do much other than access my pages (no forms or anything like that). I'm using gunicorn. Just got no idea where I'm going wrong.
here is my main file:
from mongo import get_spotify_music
import os
app = Flask(__name__)
music = list(get_spotify_music())
#app.route("/", methods=['GET'])
#app.route("/index", methods=['GET'])
def home():
return render_template('index.html', title='about')
is_live = os.environ.get("IS_LIVE", None)
url = '0.0.0.0' if is_live else '127.0.0.1'
if __name__ == "__main__":
port = int(os.environ.get("PORT", 5000))
app.run(host=url, port=port, debug=True)```
my Procfile looks like:
```web: gunicorn app:app```
heroku logs --tail looks like:
```2019-07-15T08:25:41.093957+00:00 app[api]: Deploy 325e5224 by user myemail#myemail.com
2019-07-15T08:25:45.035819+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`
2019-07-15T08:25:47.166897+00:00 app[web.1]: [2019-07-15 08:25:47 +0000] [4] [INFO] Starting gunicorn 19.9.0
2019-07-15T08:25:47.167484+00:00 app[web.1]: [2019-07-15 08:25:47 +0000] [4] [INFO] Listening at: http://0.0.0.0:57502 (4)
2019-07-15T08:25:47.167616+00:00 app[web.1]: [2019-07-15 08:25:47 +0000] [4] [INFO] Using worker: sync
2019-07-15T08:25:47.172768+00:00 app[web.1]: [2019-07-15 08:25:47 +0000] [10] [INFO] Booting worker with pid: 10
2019-07-15T08:25:47.261871+00:00 app[web.1]: [2019-07-15 08:25:47 +0000] [11] [INFO] Booting worker with pid: 11
2019-07-15T08:25:47.852647+00:00 heroku[web.1]: State changed from starting to up
2019-07-15T08:25:50.000000+00:00 app[api]: Build succeeded
When I go to the link that's set, i just get a method not allowed, rather than my web page....
Not sure where I'm going wrong here...
Im trying to run a simple query on a column with only 10 rows:
select MAX(Column3) from table;
However the spark application runs infinitely with the following message:
> 2017-05-10T16:23:40,397 DEBUG [IPC Parameter Sending Thread #0]
> ipc.Client: IPC Client (1360312263) connection to /0.0.0.0:8032 from
> ubuntu sending #1841 2017-05-10T16:23:40,397 DEBUG [IPC Client
> (1360312263) connection to /0.0.0.0:8032 from ubuntu] ipc.Client: IPC
> Client (1360312263) connection to /0.0.0.0:8032 from ubuntu got value
> #1841 2017-05-10T16:23:40,397 DEBUG [main] ipc.ProtobufRpcEngine: Call: getApplicationReport took 0ms 2017-05-10T16:23:41,397 DEBUG
> [main] security.UserGroupInformation: PrivilegedAction as:ubuntu
> (auth:SIMPLE)
> from:org.apache.hadoop.mapreduce.Job.updateStatus(Job.java:323)
> 2017-05-10T16:23:41,398 DEBUG [IPC Parameter Sending Thread #0]
> ipc.Client: IPC Client (1360312263) connection to /0.0.0.0:8032 from
> ubuntu sending #1842 2017-05-10T16:23:41,398 DEBUG [IPC Client
> (1360312263) connection to /0.0.0.0:8032 from ubuntu] ipc.Client: IPC
> Client (1360312263) connection to /0.0.0.0:8032 from ubuntu got value
> #1842 2017-05-10T16:23:41,398 DEBUG [main] ipc.ProtobufRpcEngine: Call: getApplicationReport took 1ms 2017-05-10T16:23:41,399 DEBUG
> [main] security.UserGroupInformation: PrivilegedAction as:ubuntu
> (auth:SIMPLE)
> from:org.apache.hadoop.mapreduce.Job.updateStatus(Job.java:323)
> 2017-05-10T16:23:41,399 DEBUG [IPC Parameter Sending Thread #0]
> ipc.Client: IPC Client (1360312263) connection to /0.0.0.0:8032 from
> ubuntu sending #1843 2017-05-10T16:23:41,399 DEBUG [IPC Client
> (1360312263) connection to /0.0.0.0:8032 from ubuntu] ipc.Client: IPC
> Client (1360312263) connection to /0.0.0.0:8032 from ubuntu got value
> #1843 2017-05-10T16:23:41,399 DEBUG [main] ipc.ProtobufRpcEngine: Call: getApplicationReport took 0ms
The issue was related to an unhealthy node, therefore it was not able to assign the task. The solution was to increase the yarn maximum disk utilization percentage in yarn-site.xml because my disk was at 97% used :
<property>
<name>yarn.nodemanager.disk-health-checker.max-disk-utilization-per-disk-percentage</name>
<value>99</value>
</property>
WINDOWS 7
Appium :1.4.16.1
Emulator Android from Android Virtual Device Manager
APPIUM REST RESPONSE:
Thanks for letting me know. if you think of what could be the source cause.
CODE FROM ECLIPSE:
'import org.openqa.selenium.By;
import org.openqa.selenium.chrome.ChromeDriverService;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import io.appium.java_client.MobileElement;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.ios.IOSElement;
import io.appium.java_client.remote.MobileBrowserType;
import io.appium.java_client.remote.MobileCapabilityType;
import io.appium.java_client.remote.MobilePlatform;
import org.openqa.selenium.Platform;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.BrowserType;
import java.util.concurrent.TimeUnit;
//WebDriver driver;
public class AA_Android1
#Test
public void test1() throws MalformedURLException, InterruptedException{
DesiredCapabilities capabilities = new DesiredCapabilities();
File app = new File("C:/Users/dd/Downloads/com.google.android.gm.4.5.apk");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME,"emulator- 5554");
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "BROWSER");
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "6.0");
capabilities.setCapability("appPackage", "com.android.browser");
capabilities.setCapability("appActivity","com.android.browser.BrowserActivity");
capabilities.setCapability("browserName", MobileBrowserType.BROWSER);
WebDriver driver = new AndroidDriver<MobileElement>(new URL("http://127.0.0.1:4723/wd/hub"), capabilities );//error?
driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);'
APPIUM LOG:
'> Launching Appium server with command: C:\Appium\node.exe lib\server\main.js --address 127.0.0.1 --port 4723 --browser-name Chrome --session-override --platform-name Android --platform-version 23 --automation-name Appium --device-name "emulator-5554" --log-no-color
info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)
info: Appium REST http interface listener started on 127.0.0.1:4723
info: [debug] Non-default server args: {"address":"127.0.0.1","sessionOverride":true,"logNoColors":true,"deviceName":"emulator-5554","platformName":"Android","platformVersion":"23","automationName":"Appium","browserName":"Chrome"}
info: Console LogLevel: debug
info: --> POST /wd/hub/session {"capabilities":{"desiredCapabilities":{"appPackage":"com.android.browser","appActivity":"com.android.browser.BrowserActivity","platformVersion":"6.0","browserName":"Browser","platformName":"Android","deviceName":"emulator-5554"},"requiredCapabilities":{}},"desiredCapabilities":{"appPackage":"com.android.browser","appActivity":"com.android.browser.BrowserActivity","platformVersion":"6.0","browserName":"Browser","platformName":"Android","deviceName":"emulator-5554"},"requiredCapabilities":{}}
info: Client User-Agent string: Apache-HttpClient/4.5.2 (Java/1.8.0_121)
info: Set mode: Proxying straight through to Chromedriver
info: [debug] Looks like we want chrome on android
info: [debug] Creating new appium session 6f152533-ef46-4327-9543-c62fb07906ad
info: [debug] Checking whether adb is present
info: [debug] Using adb from C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe
info: [debug] Using fast reset? true
info: [debug] Preparing device for session
info: [debug] Not checking whether app is present since we are assuming it's already on the device
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices...
info: [debug] executing cmd: C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe devices
info: [debug] 1 device(s) connected
info: Found device emulator-5554
info: [debug] Setting device id to emulator-5554
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 wait-for-device
info: [debug] executing cmd: C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell "echo 'ready'"
info: [debug] Starting logcat capture
info: [debug] Pushing unlock helper app to device...
info: [debug] executing cmd: C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 install "C:\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk"
info: [debug] executing cmd: C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell "dumpsys window"
info: [debug] Screen already unlocked, continuing.
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device...
info: [debug] executing cmd: C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 push "C:\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar" /data/local/tmp/
info: Starting App
info: [debug] Attempting to kill all 'uiautomator' processes
info: [debug] Getting all processes with 'uiautomator'
info: [debug] executing cmd: C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell "ps 'uiautomator'"
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Command failed: C:\Windows\system32\cmd.exe /s /c "C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell "ps 'uiautomator'""
info: [debug] Error: Command failed: C:\Windows\system32\cmd.exe /s /c "C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell "ps 'uiautomator'""
at ChildProcess.exithandler (child_process.js:751:12)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1016:16)
at Process.ChildProcess._handle.onexit (child_process.js:1088:5)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Command failed: C:\Windows\system32\cmd.exe /s /c \"C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell \"ps 'uiautomator'\"\"\n)","killed":false,"code":1,"signal":null,"cmd":"C:\Windows\system32\cmd.exe /s /c \"C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554c\"\"","origValue":"Command failed: C:\Windows\system32\cmd.exe /s /c \"C:\Users\ddaunay\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell \"ps 'uiautomator'\"\"\n"},"sessionId":null}
info: <-- POST /wd/hub/session 500 10097.767 ms - 679
info: [debug] Logcat terminated with code 0, signal null'
We faced a similar issue when working with Appium 1.4.16 version, and we have searched a lot in different forums and appium related support forumns. came to know that it is an issue and they gave an alternative for users to continue to work till they fix this in next releases.
Basically we need to modify file adb.js present inside of appium folder:
C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\
Drafted those details clearly # http://www.testingtools.co/appium/error-command-failed-adb-exe-s-emulator-5554-shell-ps-uiautomator
hope it helps and you will be abl
I want to create a file when the service is restarted.
rpm -qa | grep super
supervisor-3.1.3-0.5.b1.el6.noarch
My config file:
[program:tests]
command=/root/while.sh
directory=/root
user=root
autostart=true
autorestart=true
[eventlistener:tests_ls]
command=touch /tmp/32
events=PROCESS_STATE
My log file error
2016-06-27 10:48:15,794 ERRO pool tests_ls event buffer overflowed, discarding event 8
2016-06-27 10:48:15,794 INFO exited: tests_ls (exit status 0; not expected)
2016-06-27 10:48:16,796 ERRO pool tests_ls event buffer overflowed, discarding event 9
2016-06-27 10:48:16,796 INFO gave up: tests_ls entered FATAL state, too many start retries too quickly
2016-06-27 10:48:39,155 ERRO pool tests_ls event buffer overflowed, discarding event 10
2016-06-27 10:48:39,155 INFO exited: tests (terminated by SIGKILL; not expected)
2016-06-27 10:48:40,157 ERRO pool tests_ls event buffer overflowed, discarding event 11
2016-06-27 10:48:40,160 INFO spawned: 'tests' with pid 26378
2016-06-27 10:48:41,163 ERRO pool tests_ls event buffer overflowed, discarding event 12
supervisorctl
tests RUNNING pid 26378, uptime 0:09:02
tests_ls FATAL Exited too quickly (process log may have details)
Where did I go wrong?
After booting up my Node.js Heroku app with this Procfile:
web: node www/main.js
I used to get:
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within
60 seconds of launch
So I have changed my Procfile to a generic command to get around this, following from here, using:
start: node www/main.js
And I am still getting a shut down after 60 seconds. This is the error(s) now:
2015-01-20T13:04:01.452819+00:00 heroku[worker.1]: State changed from
up to starting
2015-01-20T13:04:02.728905+00:00 heroku[worker.1]: State changed from starting to down
2015-01-20T13:04:03.434251+00:00 heroku[worker.1]: Starting process with command node www/main.js
2015-01-20T13:04:03.874370+00:00 heroku[worker.1]: Stopping all processes with SIGTERM
2015-01-20T13:04:05.188100+00:00 heroku[worker.1]: Process exited with status 143
2015-01-20T13:04:05.930916+00:00 app[worker.1]: [Tue Jan 20 2015 13:04:05 GMT+0000 (UTC)] INFO Connecting...
2015-01-20T13:04:06.837197+00:00 app[worker.1]: Welcome to Slack. You are #derpy of
2015-01-20T13:04:06.837559+00:00 app[worker.1]: You are in: #general
2015-01-20T13:04:06.837637+00:00 app[worker.1]: As well as:
2015-01-20T13:04:06.837739+00:00 app[worker.1]: You have 13 unread messages
2015-01-20T13:04:07.526373+00:00 heroku[worker.1]: Error R12 (Exit timeout) -> At least one process failed to exit within 10 seconds of
SIGTERM
2015-01-20T13:04:07.526508+00:00 heroku[worker.1]: Stopping remaining processes with SIGKILL
I am using https://github.com/slackhq/node-slack-client and have not adapted the code too much. I have tried all the usual things and now I'm asking for help.
The other weird thing is that the Slack bot connects and is running perfectly for those 60 seconds.
socket = io.listen(process.env.PORT);
Do this in your main.js file, and revert back to web: node www/main.js