Ffprobe error on php exec - ffprobe

Ffprobe not found.
Php command: exec('youtube-dl -4 https://www.youtube.com/watch?v=JP4kValjHmw --extract-audio --audio-format mp3 -o deneme.mp3');
Same with shell_exec.
But no problem in user or root ssh.
Ffmpeg, youtube-dl, ffprobe, libav-tools installed.
ffprobe not found problem is in PHP exec/shell_exec only.
ffprobe version git-2015-12-13-906c0b7 Copyright (c) 2007-2015 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)
configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/usr/local/bin --pkg-config-flags=--static --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265
libavutil 55. 10.100 / 55. 10.100
libavcodec 57. 17.100 / 57. 17.100
libavformat 57. 20.100 / 57. 20.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 21.100 / 6. 21.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Simple multimedia streams analyzer
usage: ffprobe [OPTIONS] [INPUT_FILE]
You have to specify one input file.
Use -h to get full help or, even better, run 'man ffprobe'.

Related

Octave 4.4.1 fails to start on 32 bit Windows 7

Octave 4.0.0 works on Windows 7 32 bit. I have just downloaded 4.4.1 and it has never worked.
Following information:
Problem signature:
Problem Event Name: APPCRASH
Application Name: octave-gui.exe
Application Version: 0.0.0.0
Application Timestamp: 00000000
Fault Module Name: Qt5Core.dll
Fault Module Version: 5.11.0.0
Fault Module Timestamp: 00000000
Exception Code: 40000015
Exception Offset: 002e8696
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 3081
Additional Information 1: d1e0
Additional Information 2: d1e00fdc0b78c108f75564157f84c2f0
Additional Information 3: f785
Additional Information 4: f7855e1e76ad3f0614cfa9b98110597e
Found a vaguely similar problem, failing to start GUI on Windows 10, applied suggested solution of setting "Disable display scaling on high DPI settings" under Compatibility tab of executable Properties.
If you download GNU octave from octave.org you'll see a list:
Windows-64 (recommended)
octave-4.4.1-w64-installer.exe (~ 238 MB) [signature]
octave-4.4.1-w64.7z (~ 267 MB) [signature]
octave-4.4.1-w64.zip (~ 481 MB) [signature]
Windows-32 (old computers)
octave-4.4.1-w32-installer.exe (~ 238 MB) [signature]
octave-4.4.1-w32.7z (~ 267 MB) [signature]
octave-4.4.1-w32.zip (~ 481 MB) [signature]
Of couse a 64bit built will NOT run on a Windoze7 32bit so you have to get octave-4.4.1-w32-installer.exe and install this

airflow webserver starting - gunicorn workers shutting down

I am running airflow 1.8 on centos7 on docker and my webserver is not getting to the browser. I installed airflow via pip2.7. Flower ui is displaying fine, initdb ran connecting to a postgres and redis backend, using CeleryExecutor, running on ECS, and I am running as root. Webserver is being deployed via airflow webserver to default 8080.
Does anyone know what the causes / solutions are for the gunicorn workers exiting are per the log shown below? Specifically, it seems like it is this line
ERROR - [0 / 0] some workers seem to have died and gunicorndid not restart them as expected
Whole log...
[2018-04-13 20:05:01,161] {db.py:287} INFO - Creating tables
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
Done.
[2018-04-13 20:05:02,358] {__init__.py:57} INFO - Using executor CeleryExecutor
/usr/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
.format(x=modname), ExtDeprecationWarning
____________ _____________
____ |__( )_________ __/__ /________ __
____ /| |_ /__ ___/_ /_ __ /_ __ \_ | /| / /
___ ___ | / _ / _ __/ _ / / /_/ /_ |/ |/ /
_/_/ |_/_/ /_/ /_/ /_/ \____/____/|__/
[2018-04-13 20:05:03,363] [1] {models.py:167} INFO - Filling up the DagBag from /usr/local/airflow/dags
[2018-04-13 20:05:04,488] {__init__.py:57} INFO - Using executor CeleryExecutor
[2018-04-13 20:05:04 +0000] [18] [INFO] Starting gunicorn 19.3.0
[2018-04-13 20:05:04 +0000] [18] [INFO] Listening at: http://0.0.0.0:8080 (18)
[2018-04-13 20:05:04 +0000] [18] [INFO] Using worker: sync
[2018-04-13 20:05:04 +0000] [24] [INFO] Booting worker with pid: 24
[2018-04-13 20:05:05 +0000] [25] [INFO] Booting worker with pid: 25
/usr/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
.format(x=modname), ExtDeprecationWarning
[2018-04-13 20:05:05 +0000] [26] [INFO] Booting worker with pid: 26
[2018-04-13 20:05:05 +0000] [27] [INFO] Booting worker with pid: 27
/usr/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
.format(x=modname), ExtDeprecationWarning
Running the Gunicorn Server with:
Workers: 4 sync
Host: 0.0.0.0:8080
Timeout: 120
Logfiles: - -
=================================================================
/usr/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
.format(x=modname), ExtDeprecationWarning
/usr/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
.format(x=modname), ExtDeprecationWarning
[2018-04-13 20:05:06,461] [24] {models.py:167} INFO - Filling up the DagBag from /usr/local/airflow/dags
[2018-04-13 20:05:07,873] [1] {cli.py:723} ERROR - [0 / 0] some workers seem to have died and gunicorndid not restart them as expected
[2018-04-13 20:05:08,271] [27] {models.py:167} INFO - Filling up the DagBag from /usr/local/airflow/dags
[2018-04-13 20:05:08,271] [25] {models.py:167} INFO - Filling up the DagBag from /usr/local/airflow/dags
[2018-04-13 20:05:08,271] [26] {models.py:167} INFO - Filling up the DagBag from /usr/local/airflow/dags
[2018-04-13 20:05:09 +0000] [25] [INFO] Parent changed, shutting down: <Worker 25>
[2018-04-13 20:05:09 +0000] [25] [INFO] Worker exiting (pid: 25)
[2018-04-13 20:05:09 +0000] [26] [INFO] Parent changed, shutting down: <Worker 26>
[2018-04-13 20:05:09 +0000] [26] [INFO] Worker exiting (pid: 26)
[2018-04-13 20:05:09 +0000] [27] [INFO] Parent changed, shutting down: <Worker 27>
[2018-04-13 20:05:09 +0000] [27] [INFO] Worker exiting (pid: 27)
I swear I had this working not long ago, don't know what happened. Here is a list of pip packages I installed
airflow (1.8.0)
alembic (0.8.10)
amqp (2.2.2)
asn1crypto (0.24.0)
awscli (1.15.4)
Babel (2.5.3)
backports-abc (0.5)
billiard (3.5.0.3)
boto3 (1.7.4)
botocore (1.10.4)
celery (4.0.2)
certifi (2018.1.18)
cffi (1.11.5)
chardet (3.0.4)
click (6.7)
colorama (0.3.7)
croniter (0.3.20)
cryptography (2.2.2)
Cython (0.28.2)
dill (0.2.7.1)
docutils (0.14)
enum34 (1.1.6)
Flask (0.11.1)
Flask-Admin (1.4.1)
Flask-Cache (0.13.1)
Flask-Login (0.2.11)
flask-swagger (0.2.13)
Flask-WTF (0.12)
flower (0.9.2)
funcsigs (1.0.0)
future (0.15.2)
futures (3.2.0)
gitdb2 (2.0.3)
GitPython (2.1.9)
gunicorn (19.3.0)
idna (2.6)
ipaddress (1.0.19)
itsdangerous (0.24)
Jinja2 (2.8.1)
jmespath (0.9.3)
kombu (4.1.0)
lockfile (0.12.2)
lxml (3.8.0)
Mako (1.0.7)
Markdown (2.6.11)
MarkupSafe (1.0)
ndg-httpsclient (0.4.4)
numpy (1.14.2)
ordereddict (1.1)
pandas (0.22.0)
pip (9.0.3)
psutil (4.4.2)
psycopg2-binary (2.7.4)
pyasn1 (0.4.2)
pycparser (2.18)
Pygments (2.2.0)
pyOpenSSL (17.5.0)
python-daemon (2.1.2)
python-dateutil (2.7.2)
python-editor (1.0.3)
python-nvd3 (0.14.2)
python-slugify (1.1.4)
pytz (2018.4)
PyYAML (3.12)
redis (2.10.6)
requests (2.18.4)
rsa (3.4.2)
s3transfer (0.1.13)
setproctitle (1.1.10)
setuptools (39.0.1)
singledispatch (3.4.0.3)
six (1.11.0)
smmap2 (2.0.3)
SQLAlchemy (1.2.6)
tabulate (0.7.7)
thrift (0.9.3)
tornado (5.0.2)
Unidecode (1.0.22)
urllib3 (1.22)
vine (1.1.4)
Werkzeug (0.14.1)
wheel (0.31.0)
WTForms (2.1)
zope.deprecation (4.3.0)
UPDATE
I installed from source and am now getting this error from the webserver
[2018-04-14 00:20:48,594] {{cli.py:718}} ERROR - [0 / 0] some workers seem to have died and gunicorndid not restart them as expected
[2018-04-14 00:20:50,396] {{models.py:197}} INFO - Filling up the DagBag from /usr/local/airflow/dags
[2018-04-14 00:20:50,396] {{models.py:197}} INFO - Filling up the DagBag from /usr/local/airflow/dags
[2018-04-14 00:20:50,396] {{models.py:197}} INFO - Filling up the DagBag from /usr/local/airflow/dags
[2018-04-14 00:24:18,135] {{cli.py:725}} ERROR - No response from gunicorn master within 120 seconds
[2018-04-14 00:24:23,032] {{cli.py:726}} ERROR - Shutting down webserver
I think this a consequence of https://issues.apache.org/jira/browse/AIRFLOW-1235 which shuts down the webserver when the gunicorn workers die. I think....
UPDATE
Ok this fixed itself somehow. Don't know how because I did a number of things but installing gunicorn with greenlet, eventlet, gevent might have helped and it could have been something on my entrypoint perhaps with concurrency in executing airflow webserver right after airflow initdb. Leaving the question up as I faced this with a puckel install before as well and would love to know if this is a bug others are facing and what this issue was.
So, when you installed from source you got the fix for https://issues.apache.org/jira/browse/AIRFLOW-1235, which I think restarts the master and workers when the worker dies.
I've also seen my workers die with the MySQL session/connection goes bad. EG an exception from SQLAlchemy either about the transaction having failed due to a concurrency lock and needing to be retried, around which Airflow models didn't have any logic, OR a InvalidRequestError: This session is in 'prepared' state; no further SQL can be emitted within this transaction. But not generally AT start up.
The two times I had errors at start up was when the connection to the database could not be made due to a security group in thing in AWS, and when our 3000+ dags took so long to get added to the DAG Bag that the timeout on the workers was getting tripped and they'd shut themselves down before the setup code was done. I would love to see if this setup code could be improved or moved out of the workers.

Selenium and Chrome error: --ignore-certificate-errors

I'm trying to do some tests with selenium and it seems that with Firefox everything works correctly but when the test try to open Chrome browser it shows the above error, --ignore-certificate-errors.
The log info says:
-------------------------------------------------------------------------------
Test set: com.myproject.login.LoginOK
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 18.156 sec <<< FAILURE! - in com.myproject.login.LoginOK
testLoginChromeOK on testLoginChromeOK(com.myproject.login.LoginOK)(com.myproject.login.LoginOK) Time elapsed: 1.926 sec <<< FAILURE!
org.openqa.selenium.WebDriverException:
unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"19659.1","isDefault":true},"id":1,"name":"","origin":"://"}
(Session info: chrome=56.0.2924.87)
(Driver info: chromedriver=2.9.248304,platform=Linux 3.16.0-38-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 144 milliseconds
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
System info: host: 'Acer', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.16.0-38-generic', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, chrome={userDataDir=/tmp/.com.google.Chrome.ifVATg}, takesHeapSnapshot=true, databaseEnabled=false, handlesAlerts=true, version=56.0.2924.87, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 0534e4dd8d67942dbc415812d7b4b15d
at com.myproject.login.LoginOK.testLoginChromeOK(LoginOK.java:64)
Could someone give me a hint? Thanks in advance.
I see the following:
Driver info: chromedriver=2.9.248304
It seems your are using an outdated chromedriver and it might not be compatible with your current chrome version (chrome 56).
Latest version changelog shows "Supports Chrome v54-56", so I think you should download latest version of chromedriver and then configure selenium to use that latest version.

Selenium "chrome not reachable" error and can't access browser web elements after test kills existing browser and launches new

Selenium "chrome not reachable" error and can't access browser web elements after test kills existing browser and launches new
I'm using latest java, chrome driver and selenium 3.0 latest jar for automating web application, everything works very fine except when test fails; it kills browser according to my requirement and new test uses new browser but chrome shows unreachable.
Now is there any binding to previous session? How subsequent browser launch can't identify web objects and it works fine for first first launch only? Does anyone have solution for this or can anyone try in your framework after killing existing browser and launching new in between of the test using latest GA or beta web driver version?
Steps:
- Write below code and launch chrome using web driver
- Navigate to your web application
- Login to it (WORKS FINE)
- Assume test fails, so it kills existing chrome browser
- Again hits below code and opens new browser
- Navigate to application again
- Login to it (DOESN'T WORK - because it can't identify web objects for newly launched browser due to "chrome not reachable" error).
Code:
ChromeOptions options = new ChromeOptions();
options.addArguments("chrome.switches","--disable-extensions");
options.addArguments("--start-maximized");
System.setProperty("webdriver.chrome.driver", chromedriverPath);
webDriver = new ChromeDriver(options);
webDriver.navigate().to(myURL);
WebDriver.findElement(By.cssSelector(input[class=LoginButton]))
Error:
Build info: version: 'unknown', revision: '2aa21c1', time: '2016-08-02 14:59:43 -0700'
System info: host: 'abc', ip: '12.116.61.2', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_102'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129), userDataDir=C:\Users\abc\AppData\Local\Temp\scoped_dir7360_5203}, takesHeapSnapshot=true, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=52.0.2743.116, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 4d9e503ddb4ae1506b1592a0426bb7ff
*** Element info: {Using=css selector, value=input[class=LoginButton]}
129615 [main] INFO com.util.SleepUtil - Sleep: 1000 milliseconds ... (0/1000)
130615 [main] INFO com.util.SleepMetrics - Entry: com.selenium.functions.Login.NavigateTo() - Sleep: 1000/2000
130615 [main] INFO com.framework - ...WebDriver...findElement()
130615 [main] INFO com.framework - ...WebDriver...elementPresent()
130615 [main] INFO com.framework - ...WebDriver...getElementOrNull()
130615 [main] INFO com.framework - ...WebDriver...getElementByCss()
130615 [main] INFO com.framework - ...WebDriver...configureCssLocator()
132629 [main] INFO com.framework - ...WebDriver.findElement(By.cssSelector(input[class=LoginButton]))
135651 [main] INFO com.framework - ...getElementByCss()...org.openqa.selenium.WebDriverException: chrome not reachable

what are these values coming back from jruby? (File::Stat.dev_minor)

I have an app that uses jruby, and its been recording some information about files in a table. eg file size and major and minor device number. File::Stat.dev_minor and File::Stat.dev_major
However I have noticed that jruby is producing very different values that the native package ruby 1.9.2 for example under ruby;
irb(main):006:0> puts File::stat("/etc/passwd").dev_minor
5 <------- need to find this
=> nil
irb(main):007:0> puts File::stat("/etc/passwd").dev_major
104 <------- need to find this
=> nil
under jruby 1.6.4, this produces ClassNotFoundExceptions, however its also been returning a number which this app has been recording, and which I now need to convert back to native ruby.
# File.stat("/etc/passwd").dev_minor
java.lang.ClassNotFoundException: rubygems.defaults.OperatingSystemService
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Metho
Exception `LoadError' at file:/srv/logstash/logstash-monolithic-1.1.0.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/Win32API.rb:2 - Win32API only supported on win32
java.lang.ClassNotFoundException: rubygems.defaults.JrubyNativeService
at java.net.URLClassLoader$1.run(Unknown Source)
26629
# File.stat("/etc/passwd").dev_major
java.lang.ClassNotFoundException: rubygems.defaults.OperatingSystemService
at java.net.URLClassLoader$1.run(Unknown Source)
Exception `LoadError' at file:/srv/logstash/logstash-monolithic-1.1.0.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/Win32API.rb:2 - Win32API only supported on win32
java.lang.ClassNotFoundException: rubygems.defaults.JrubyNativeService
0 <------- and this one too...
I am using jruby 1.6.4 using the sun java hotspot client 1.6.0_30 than from basic Ruby 1.9.2 on fedora.
Any suggestions?
I would like to convert those numbers back to the normal ruby format..
jruby -> File.stat("/etc/passwd").dev_minor seems to correspond to the values for stat -c %d /etc/passwd = 26629
This is because dev_minor and dev_major only make sense for device files. When using the stat function on device files, MRI and JRuby (which internally uses jnr-posix) behave the same:
sebastien#greystones:$ rvm use jruby-1.6-head
Using /home/sebastien/.rvm/gems/jruby-1.6-head
sebastien#greystones:$ jruby -e 'File.stat("/dev/tty0").dev_minor'
sebastien#greystones:$ jruby -e 'puts File.stat("/dev/tty0").dev_minor'
5
sebastien#greystones:$ jruby -e 'puts File.stat("/dev/tty0").dev_major'
0
sebastien#greystones:$ rvm use 1.9.3-p0
Using /home/sebastien/.rvm/gems/ruby-1.9.3-p0
sebastien#greystones:$ ruby -e 'puts File.stat("/dev/tty0").dev_minor'
5
sebastien#greystones:$ ruby -e 'puts File.stat("/dev/tty0").dev_major'
0