Gulp mobile connection - mobile

I had created mobile WiFi hotspot from my tablet and i had connected my laptop and mobile phone to it.
I'm trying to run Browsersync on those mobiles. My external ip adress was gathered from Browsersync -> Overview External. I pasted that IP adress in mobile browsers but they can't connect.
Here are gulp terminal lines:
[09:31:58] Using gulpfile ~/Dokumenty/Frontend/TESTgulp/gulpfile.js
[09:31:58] Starting 'scripts'...
[09:31:58] Finished 'scripts' after 18 ms
[09:31:58] Starting 'style'...
[09:31:58] Finished 'style' after 6.4 ms
[09:31:58] Starting 'watch'...
[09:31:58] Finished 'watch' after 17 ms
[09:31:58] Starting 'html'...
[09:31:58] Finished 'html' after 824 μs
[09:31:58] Starting 'browser-sync'...
[09:31:59] Finished 'browser-sync' after 489 ms
[09:31:59] Starting 'default'...
[09:31:59] Finished 'default' after 14 μs
[BS] Access URLs:
-------------------------------------
Local: http://localhost:3000
External: http://142.128.13.4:3000
-------------------------------------
UI: http://localhost:3001
UI External: http://142.128.13.4:3001
-------------------------------------
[BS] Serving files from: ./app/
[09:32:00] Starting 'scripts'...
[09:32:00] Finished 'scripts' after 1.64 ms
[BS] Reloading Browsers...
[BS] 1 file changed (main.min.js)
What should I do? Can that be fault to that it is WiFi hotspot from my tablet?

The main problem was gwuf blocking incoming connections at my Linux Mint 18.1.
Disable your firewall, it's that easy!

Related

Port XXXX is in use by another program. Either identify and stop that program, or start the server with a different port

I want to run a single python flask hello world. I deploy to App Engine, but it's showing like it's saying that the port is in use and it looks like it's running on multiple instances/threads/clones concurrently.
This is my main.py
from flask import Flask
app = Flask(__name__)
#app.route('/hello')
def helloIndex():
print("Hello world log console")
return 'Hello World from Python Flask!'
app.run(host='0.0.0.0', port=4444)
This is my app.yaml
runtime: python38
env: standard
instance_class: B2
handlers:
- url: /
script: auto
- url: .*
script: auto
manual_scaling:
instances: 1
This is my requirements.txt
gunicorn==20.1.0
flask==2.2.2
And this is the logs that I got:
* Serving Flask app 'main'
* Debug mode: off
Address already in use
Port 4444 is in use by another program. Either identify and stop that program, or start the server with a different port.
[2022-08-10 15:57:28 +0000] [1058] [INFO] Worker exiting (pid: 1058)
[2022-08-10 15:57:29 +0000] [1059] [INFO] Booting worker with pid: 1059
[2022-08-10 15:57:29 +0000] [1060] [INFO] Booting worker with pid: 1060
[2022-08-10 15:57:29 +0000] [1061] [INFO] Booting worker with pid: 1061
It says that Port 4444 is in use. Initially I tried 5000 (flask's default port) but it says it's in use. Also I tried removing the port=4444 but now it's saying Port 5000 is in use by another program, I guess flask by default assign port=5000. I'm suspecting that it's because GAE is running in multiple instances that's causing this error. If not, then please help to solve this issue.
App Engine apps should listen on port 8080 and not in any other ones.
So you may need to set this like
app.run(host='0.0.0.0', port=8080)
Close the editor and then reopen. When you stop the process next time use Ctrl+C if you're on the terminal
I figured it out. Delete your old file from your terminal and or folder that created the web app. In the terminal this is done by:
rm -file_name
Then try all over again with your a fresh file and it should be okay.

Appium (and desktop) unable to launch wda session since xCode13 and iOS15

Since my xCode got (automatically...) updated to 13 and all my simulators moved from iOS 14.5 to 15. with the same setup / commands I'm unable to launch the WDA from both the desktop app, and the node ( selenium server grid/node setup)
The issue exists for all simulators.
I can still use real device..
(the actual ports in errors might differ, the first one is from the actual automation where it fails, the 2nd and 3rd is from the desktop app -where it still fails with the same error. the root issue is still the same on both)
The error logs I get:
In short:
org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Unable to start WebDriverAgent session because of xcodebuild failure: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: connect ECONNREFUSED 127.0.0.1:8205
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'Janoss-MacBook-Pro.local', ip: 'fe80:0:0:0:18e4:52:307c:8c7b%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '11.5', java.version: '11.0.11'
Driver info: driver.version: IOSDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Unable to start WebDriverAgent session because of xcodebuild failure: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: connect ECONNREFUSED 127.0.0.1:8205
at getResponseForW3CError (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)
at asyncHandler (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:380:37)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'Janoss-MacBook-Pro.local', ip: 'fe80:0:0:0:18e4:52:307c:8c7b%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '11.5', java.version: '11.0.11'
Driver info: driver.version: IOSDriver
The longer error from the server:
[iOSSim] Got Simulator UI client PID: 11815
[iOSSim] Both Simulator with UDID 'F5A500AB-FAA5-41A0-A009-E5A8EDB8643A' and the UI client are currently running
[BaseDriver] Event 'simStarted' logged at 1632487969688 (14:52:49 GMT+0200 (Central European Summer Time))
[WebDriverAgent] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[DevCon Factory] Requesting connection for device F5A500AB-FAA5-41A0-A009-E5A8EDB8643A on local port 8100
[DevCon Factory] Cached connections count: 0
[DevCon Factory] Successfully requested the connection for F5A500AB-FAA5-41A0-A009-E5A8EDB8643A:8100
[XCUITest] Starting WebDriverAgent initialization with the synchronization key 'XCUITestDriver'
[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[WD Proxy] connect ECONNREFUSED 127.0.0.1:8100
[WebDriverAgent] WDA is not listening at 'http://127.0.0.1:8100/'
[WebDriverAgent] WDA is currently not running. There is nothing to cache
[XCUITest] Trying to start WebDriverAgent 2 times with 10000ms interval
[XCUITest] These values can be customized by changing wdaStartupRetries/wdaStartupRetryInterval capabilities
[BaseDriver] Event 'wdaStartAttempted' logged at 1632487969773 (14:52:49 GMT+0200 (Central European Summer Time))
[WebDriverAgent] Launching WebDriverAgent on the device
[WebDriverAgent] WebDriverAgent does not need a cleanup. The sources are up to date (1620631774000 >= 1620631774000)
[WebDriverAgent] Killing running processes 'xcodebuild.*F5A500AB-FAA5-41A0-A009-E5A8EDB8643A, F5A500AB-FAA5-41A0-A009-E5A8EDB8643A.*XCTRunner, xctest.*F5A500AB-FAA5-41A0-A009-E5A8EDB8643A' for the device F5A500AB-FAA5-41A0-A009-E5A8EDB8643A...
[WebDriverAgent] 'pgrep -if xcodebuild.*F5A500AB-FAA5-41A0-A009-E5A8EDB8643A' didn't detect any matching processes. Return code: 1
[WebDriverAgent] 'pgrep -if F5A500AB-FAA5-41A0-A009-E5A8EDB8643A.*XCTRunner' didn't detect any matching processes. Return code: 1
[WebDriverAgent] 'pgrep -if xctest.*F5A500AB-FAA5-41A0-A009-E5A8EDB8643A' didn't detect any matching processes. Return code: 1
[WebDriverAgent] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=F5A500AB-FAA5-41A0-A009-E5A8EDB8643A IPHONEOS_DEPLOYMENT_TARGET=15.0 GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO' in directory '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent'
[WebDriverAgent] Output from xcodebuild will only be logged if any errors are present there. To change this, use 'showXcodeLog' desired capability
[WebDriverAgent] Waiting up to 60000ms for WebDriverAgent to start
[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[WD Proxy] connect ECONNREFUSED 127.0.0.1:8100
[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[WD Proxy] connect ECONNREFUSED 127.0.0.1:8100
Then a long waiting with only the ECONNREFUSED error and finally failing:
[WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[WD Proxy] connect ECONNREFUSED 127.0.0.1:8100
[XCUITest] Failed to create WDA session (An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: connect ECONNREFUSED 127.0.0.1:8100). Retrying...
[XCUITest] UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: connect ECONNREFUSED 127.0.0.1:8100
[XCUITest] at JWProxy.command (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:274:13)
[XCUITest] at runMicrotasks ()
[XCUITest] at processTicksAndRejections (internal/process/task_queues.js:85:5)
[XCUITest] Unable to start WebDriverAgent session because of xcodebuild failure: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: connect ECONNREFUSED 127.0.0.1:8100
[XCUITest] Quitting and uninstalling WebDriverAgent
[WebDriverAgent] Shutting down sub-processes
[iOSSim] Building bundle path map
[iOSSim] The simulator has '1' bundles which have 'WebDriverAgentRunner-Runner' as their 'CFBundleName':
[iOSSim] 'com.jano.facebook.WebDriverAgentRunner.xctrunner'
[WebDriverAgent] Uninstalling WDAs: 'com.jano.facebook.WebDriverAgentRunner.xctrunner'
[XCUITest] {}
[DevCon Factory] Releasing connections for F5A500AB-FAA5-41A0-A009-E5A8EDB8643A device on any port number
[DevCon Factory] Found cached connections to release: ["F5A500AB-FAA5-41A0-A009-E5A8EDB8643A:8100"]
[DevCon Factory] Cached connections count: 0
[XCUITest] Not clearing log files. Use `clearSystemFiles` capability to turn on.
[IOSSimulatorLog] Stopping iOS log capture
[BaseDriver] Event 'newSessionStarted' logged at 1632488146662 (14:55:46 GMT+0200 (Central European Summer Time))
[MJSONWP] Encountered internal error running command: Error: Unable to start WebDriverAgent session because of xcodebuild failure: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: connect ECONNREFUSED 127.0.0.1:8100
[MJSONWP] at quitAndUninstall (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:544:15)
[MJSONWP] at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:610:11
[MJSONWP] at wrapped (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:60:13)
[MJSONWP] at retry (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:43:13)
[MJSONWP] at retryInterval (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:70:10)
[MJSONWP] at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:559:7
[HTTP] <-- POST /wd/hub/session 500 177858 ms - 388
[HTTP]
[HTTP] --> DELETE /wd/hub/session
To solve this issue,
We need to update our appkum on the computer ( should be 1.22.0 or above)
To see your version:
appium -v
To install / Update your appium:
npm install -g appium
This fixed the simulator part. to fix the appium desktop, you also have to update the desktop app, but now it's moved on as 2 separate app.
One for the server
https://github.com/appium/appium-desktop/releases/
And one for the inspector https://github.com/appium/appium-inspector/releases
I had a similar problem with the old appium (where the server and the inspector were combined), and with the new version, where they were taken out separately.
I solved it by adding server Capabilities:
serverCapabilities.setCapability("wdaStartupRetries", "4");
serverCapabilities.setCapability("iosInstallPause","8000" );
serverCapabilities.setCapability("wdaStartupRetryInterval", "20000");
after that, the wda session became stable
I had the same problem
I solved it by adding appium desired capabilities and I reduced the time from 120 to 60 for newCommandTimeout capabilities
my appium capabilities' last status
"newCommandTimeout": 60,
"wdaStartupRetries": 3,
"wdaStartupRetryInterval": 20000

Bad Gateway 502 - Google App Engine - [CRITICAL] WORKER TIMEOUT

I was working on deploying my web application via Google App Engine when I encountered a 502 Bad Gateway Error(Nginx). After running gcloud app logs read, I tracked the error down to be:
2020-05-12 00:15:59 default[20200511t163633] "GET /input/summary" 200
2020-05-12 00:16:38 default[20200511t163633] [2020-05-12 00:16:38 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:9)
2020-05-12 00:16:38 default[20200511t163633] [2020-05-12 00:16:38 +0000] [9] [INFO] Worker exiting (pid: 9)
2020-05-12 00:16:38 default[20200511t163633] [2020-05-12 00:16:38 +0000] [15] [INFO] Booting worker with pid: 15
2020-05-12 00:16:38 default[20200511t163633] "POST /input/summary" 502
For those wondering, my app.yaml looks like this:
runtime: custom
env: flex
runtime_config:
python_version: 3
resources:
cpu: 4
memory_gb: 16
disk_size_gb: 25
readiness_check:
app_start_timeout_sec: 900
My Dockerfile looks like this:
FROM gcr.io/google-appengine/python
RUN virtualenv /env -p python3.7
ENV VIRTUAL_ENV /env
ENV PATH /env/bin:$PATH
ADD requirements.txt /app/requirements.txt
RUN pip3 install -r /app/requirements.txt
ADD . /app
RUN apt-get update \
&& apt-get install tesseract-ocr -y
EXPOSE 8080
ENTRYPOINT ["gunicorn", "--bind=0.0.0.0:8080", "main:app"]
I am running the app through:
if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0', port=8080)
Everything seems to work fine on localhost but the problems arise when I deploy to Google App Engine. Does anyone know what may be the root of the issue? Thanks in Advance!
Is it failing to deploy? Or does the deploy succeed, but the server fails to run?
If its failing to deploy, you may be hitting the 10 minute timeout that deploy jobs have to finish. You can increase this number by setting your local gcloud config.
gcloud config set app/cloud_build_timeout 1200s

Kafka-Connect For MSSQL Invalid value java.sql.SQLException: No suitable driver found for for configuration

I am trying to connect kafka-connect to my local mssql with localhost:3030
I am receiving this error when I try to make a new connection for mssql. in centos 7(linux). Mssql data is from an external IP(windows), my consumer is inside of linux environment.
"No suitable driver found for configuration".
connect-distributed.properties is shown below;
plugin.path=/usr/local/share/java,/usr/local/share/kafka/plugins,/opt/connectors,
I added "ojdbc7-12.1.0.2.jar" file under /opt/connectors/kafka-connect-jdbc/ but still I am receiving error messages. I dont know what is wrong.
Also my connect-console-source.properties
name=source-sqlserver-user
connector.class=io.confluent.connect.jdbc.JdbcSourceConnector
tasks.max=1
topic.prefix=my-timestamp
connection.url=jdbc:sqlserver://externalIP;database=database;username=username;password=password
version: '2'
services:
kafka-cluster:
image: landoop/fast-data-dev:cp3.3.0
environment:
ADV_HOST: 127.0.0.1
RUNTESTS: 0
ports:
- 2181:2181 # Zookeeper
- 3030:3030 # Landoop UI
- 8081-8083:8081-8083 # REST Proxy, Schema Registry, Kafka Connect ports
- 9581-9585:9581-9585 # JMX Ports
- 9092:9092 # Kafka Broker
ojdbc7-12.1.0.2.jar is the JDBC driver for Oracle.
For MS SQL you need the MS SQL JDBC driver
Edit: Since you're using Docker to run Kafka Connect, you need to make the JDBC JAR file available to the Kafka Connect worker before it runs. You can't just run the Docker container and copy the JDBC driver into it, because you need to restart Kafka Connect afterwards.
To workaround this, you can mount the JAR from your local machine to the relevant path in the container. The relevant path is whereever the Kafka Connect JDBC jar is. Looking at the fast-data-dev image it's in
root#fast-data-dev / $ ls -l /opt/confluent-3.3.0/share/java/kafka-connect-jdbc
total 6544
-rw-r--r-- 1 root root 133842 Jul 28 2017 kafka-connect-jdbc-3.3.0.jar
-rw-r--r-- 1 root root 658466 Jul 28 2017 postgresql-9.4-1206-jdbc41.jar
-rw-r--r-- 1 root root 5575351 Jul 28 2017 sqlite-jdbc-3.8.11.2.jar
So you can run
docker run --rm --net=host --volume ~/Downloads/mssql-jdbc-7.4.1.jre8.jar:/opt/confluent-3.3.0/share/java/kafka-connect-jdbc/mssql-jdbc-7.4.1.jre8.jar landoop/fast-data-dev:cp3.3.0
or mount it in your Docker Compose with a volumes config:
version: '2'
services:
kafka-cluster:
image: landoop/fast-data-dev:cp3.3.0
environment:
ADV_HOST: 127.0.0.1
RUNTESTS: 0
ports:
- 2181:2181 # Zookeeper
- 3030:3030 # Landoop UI
- 8081-8083:8081-8083 # REST Proxy, Schema Registry, Kafka Connect ports
- 9581-9585:9581-9585 # JMX Ports
- 9092:9092 # Kafka Broker
volumes:
- ~/Downloads/mssql-jdbc-7.4.1.jre8.jar:/opt/confluent-3.3.0/share/java/kafka-connect-jdbc/mssql-jdbc-7.4.1.jre8.jar
It's worth noting that Confluent Platform 3.3.0 is really old - the latest is 5.3.1. If you want to see an up-to-date example of running Kafka, Kafka Connect, SQL Server etc with JDBC driver automatically set up see this example here.

when i reload apache I get this error

I have this error when I get status of service apache2.
apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: inactive (dead) since ج 2018-02-23 15:31:18 WET; 1min 23s ago
Docs: man:systemd-sysv-generator(8)
Process: 4329 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS
Process: 4310 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCE
Check if all folders for apache are created. Like "logs" and other. Same for your sites check if you specified folder for logs and if it is actually created.

Resources