I keep getting this error while trying to start rails in docker.
2023-02-15 13:42:52 [54] WARNING hook before_worker_boot failed with exception (Redis::CannotConnectError) getaddrinfo_a: System error
2023-02-15 13:42:52 [55] WARNING hook before_worker_boot failed with exception (Redis::CannotConnectError) getaddrinfo_a: System error
2023-02-15 13:42:52 [51] WARNING hook before_worker_boot failed with exception (Redis::CannotConnectError) getaddrinfo_a: System error
("GET /csc108/admin" - (172.27.0.1)): #<Redis::CannotConnectError: getaddrinfo_a: System error>
However, it worked for a few times with the same procedure.
I tried to rebuild the image and restart the container
our end to end tests run in a docker container and use Webdriver.io - with selenium-standalone.
Since updating to an M1/arm64 Mac I've been trying to update the tests to run.
Our unit tests (jest) were fixed easily by changing from using the ./google-chrome-stable_current_amd64.deb to using chromium.
Test container dockerfile:
FROM node:14-bullseye
ENV CHROME_BIN=/usr/bin/chromium
RUN apt-get update \
&& apt-get install -y chromium \
openjdk-11-jre \
xvfb \
x11vnc \
php \
&& mkdir ~/.vnc \
&& x11vnc -storepasswd "fakepwd" ~/.vnc/passwd \
&& rm -rf /var/lib/apt/lists/*
COPY ./entrypoint.sh /usr/local/bin/
ENTRYPOINT ["entrypoint.sh"]
I hoped it would be as simple for webdriver tests but no luck so far.
I've upgraded #wdio packages as below:
"#wdio/allure-reporter": "^7.10.1",
"#wdio/cli": "^7.19.3",
"#wdio/devtools-service": "^7.19.3",
"#wdio/junit-reporter": "^7.19.1",
"#wdio/local-runner": "^7.19.3",
"#wdio/mocha-framework": "^7.19.3",
"#wdio/selenium-standalone-service": "^7.19.1",
"#wdio/sync": "^7.19.3",
In the lock file I've confirmed the selenium-standalone version is 7.1.
(As above we use 7.19.1 of #wdio's service - this uses ^7.0 but only 7.1 works for M1's: https://github.com/webdriverio/selenium-standalone/commit/10e31d0e20444b0f6eb2d897cb3b471782dd243d)
I've confirmed that the correct chromedriver binary is used too (under ./node_modules/selenium-standalone/.selenium/chromedriver is 99.0.4844.51-arm64)
From wdio.conf.js:
services:[['selenium-standalone',{
installArgs: {
drivers: {
chrome: {
binary: '/usr/bin/chromium',
version: chromeDriverVersion,
arch : process.arch,
baseURL : 'https://chromedriver.storage.googleapis.com'
}
}
},
args: {
drivers: {
chrome: {
binary: '/usr/bin/chromium',
version: chromeDriverVersion,
arch : process.arch
}
}
}
}]];
capabilities: [{
browserName: process.env._BROWSER,
acceptInsecureCerts: true,
maxInstances: 4,
'goog:browserOptions': {
binary: '/usr/bin/chromium', // may not be needed, tried anyway
args: process.env._ENABLE_UI === 'false' ?
['--disable-dev-shm-usage','--no-sandbox','--headless','--disable-infobars','--deterministic-fetch', `--window-size=${default_viewport_width},${default_viewport_height}`] :
['--disable-dev-shm-usage','--no-sandbox','--disable-infobars', `--window-size=${default_viewport_width},${default_viewport_height}`]
}
}],
Watching wdio log outputs:
2022-04-01T08:09:37.336Z WARN #wdio/utils:shim: You are running tests with #wdio/sync which will be discontinued starting Node.js v16.Read more on https://github.com/webdriverio/webdriverio/discussions/6702
2022-04-01T08:09:40.101Z INFO #wdio/local-runner: Run worker command: run
2022-04-01T08:09:40.124Z DEBUG #wdio/config:ConfigParser: No compiler found, continue without compiling files
2022-04-01T08:09:42.042Z DEBUG #wdio/local-runner:utils: init remote session
2022-04-01T08:09:42.048Z DEBUG #wdio/utils:initialiseServices: initialise service "selenium-standalone" as NPM package
2022-04-01T08:09:42.648Z DEBUG #wdio/sync: Finished to run "beforeSession" hook in 0ms
2022-04-01T08:09:44.535Z DEBUG #wdio/local-runner:utils: init remote session
2022-04-01T08:09:44.536Z INFO webdriver: Initiate new session using the WebDriver protocol
2022-04-01T08:09:44.585Z INFO webdriver: [POST] http://127.0.0.1:4433/wd/hub/session
2022-04-01T08:09:44.586Z INFO webdriver: DATA {
capabilities: {
alwaysMatch: {
browserName: 'chromium',
acceptInsecureCerts: true,
'goog:browserOptions': [Object]
},
firstMatch: [ {} ]
},
desiredCapabilities: {
browserName: 'chromium',
acceptInsecureCerts: true,
'goog:browserOptions': { binary: '/usr/bin/chromium', args: [Array] }
}
}
2022-04-01T08:09:44.600Z ERROR webdriver: RequestError: connect ECONNREFUSED 127.0.0.1:4433
at ClientRequest.<anonymous> (/srv/api/author/node_modules/got/dist/source/core/index.js:956:111)
at Object.onceWrapper (events.js:520:26)
at ClientRequest.emit (events.js:412:35)
at ClientRequest.emit (domain.js:475:12)
at ClientRequest.origin.emit (/srv/api/author/node_modules/#szmarczak/http-timer/dist/source/index.js:43:20)
at Socket.socketErrorListener (_http_client.js:475:9)
at Socket.emit (events.js:400:28)
at Socket.emit (domain.js:475:12)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1159:16)
2022-04-01T08:09:44.601Z ERROR #wdio/runner: Error: Failed to create session.
Unable to connect to "http://127.0.0.1:4433/wd/hub", make sure browser driver is running on that address.
If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver.
at startWebDriverSession (/srv/api/author/node_modules/webdriver/build/utils.js:72:15)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Function.newSession (/srv/api/author/node_modules/webdriver/build/index.js:46:45)
at async remote (/srv/api/author/node_modules/#wdio/runner/node_modules/webdriverio/build/index.js:77:22)
at async Runner._startSession (/srv/api/author/node_modules/#wdio/runner/build/index.js:223:56)
at async Runner._initSession (/srv/api/author/node_modules/#wdio/runner/build/index.js:176:25)
at async Runner.run (/srv/api/author/node_modules/#wdio/runner/build/index.js:88:19)
2022-04-01T08:09:44.601Z DEBUG #wdio/sync: Finished to run "after" hook in 0ms
I presume it's chromium having an issue starting - but I can't find any relevant logs.
I've tried to start it inside the container manually, but I have no idea if there's anything useful here:
root#15adddf1e180:/srv/mydir# export DISPLAY=:99
root#15adddf1e180:/srv/mydir# /usr/bin/Xvfb :99 -ac -screen 0 1920x1080x24 > /dev/null 2>&1 &
[1] 9
root#15adddf1e180:/srv/mydir# x11vnc -listen 0.0.0.0 -display :99.0 -usepw -forever -nevershared > /dev/null 2>&1 &
[2] 24
root#15adddf1e180:/srv/mydir# /usr/bin/chromium --no-sandbox
[25:67:0401/081257.532385:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[25:67:0401/081257.532481:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[25:66:0401/081257.540896:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[25:66:0401/081257.540933:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
*** stack smashing detected ***: terminated
*** stack smashing detected ***: terminated
[25:66:0401/081257.571813:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[25:66:0401/081257.571995:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[25:25:0401/081257.619504:ERROR:gpu_process_host.cc(972)] GPU process exited unexpectedly: exit_code=6
*** stack smashing detected ***: terminated
[25:89:0401/081257.630541:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[25:89:0401/081257.631138:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[25:89:0401/081257.631196:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[25:89:0401/081257.631336:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[25:89:0401/081257.631366:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
*** stack smashing detected ***: terminated
*** stack smashing detected ***: terminated
*** stack smashing detected ***: terminated
*** stack smashing detected ***: terminated
[25:25:0401/081257.665149:ERROR:gpu_process_host.cc(972)] GPU process exited unexpectedly: exit_code=6
*** stack smashing detected ***: terminated
*** stack smashing detected ***: terminated
[25:25:0401/081257.679383:ERROR:gpu_process_host.cc(972)] GPU process exited unexpectedly: exit_code=6
*** stack smashing detected ***: terminated
*** stack smashing detected ***: terminated
[25:25:0401/081257.691523:ERROR:gpu_process_host.cc(972)] GPU process exited unexpectedly: exit_code=6
*** stack smashing detected ***: terminated
*** stack smashing detected ***: terminated
[25:25:0401/081257.701605:ERROR:gpu_process_host.cc(972)] GPU process exited unexpectedly: exit_code=6
*** stack smashing detected ***: terminated
*** stack smashing detected ***: terminated
[25:25:0401/081257.705098:ERROR:gpu_process_host.cc(972)] GPU process exited unexpectedly: exit_code=6
[25:25:0401/081257.705122:FATAL:gpu_data_manager_impl_private.cc(447)] GPU process isn't usable. Goodbye.
*** stack smashing detected ***: terminated
[0401/081257.720823:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0401/081257.720915:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
Trace/breakpoint trap
root#15adddf1e180:/srv/mydir#
Any help would be appreciated, thanks!
It turns out that the "drivers" section must use "chromium" and not "chrome"
And for "capabilities" it should be "chrome"
I can't explain why unfortunately as selenium/webdriver docs seem to only mention chrome as the driver, not chromium - but this is the only way to get it to work
I.e.
const drivers = {};
drivers[process.env._BROWSER] = {
binary: '/usr/bin/chromium',
version: chromeDriverVersion,
arch : process.arch,
baseURL : 'https://chromedriver.storage.googleapis.com'
};
services:[['selenium-standalone', {
installArgs: {
drivers: drivers
},
args: {
drivers: drivers
}
}]];
capabilities: [{
browserName: process.env._BROWSER === "chromium" ? "chrome" : process.env._BROWSER,
...
Nebula Graph fails on CentOS 6.5, the error message is as follows:
# storage log
Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
# meta log
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
E0415 22:32:38.944437 15532 AsyncServerSocket.cpp:762] failed to set SO_REUSEPORT on async server socket Protocol not available
E0415 22:32:38.945001 15510 ThriftServer.cpp:440] Got an exception while setting up the server: 92failed to bind to async server socket: [::]:0: Protocol not available
E0415 22:32:38.945057 15510 RaftexService.cpp:90] Setup the Raftex Service failed, error: 92failed to bind to async server socket: [::]:0: Protocol not available
E0415 22:32:38.949586 15463 NebulaStore.cpp:47] Start the raft service failed
E0415 22:32:38.949597 15463 MetaDaemon.cpp:88] Nebula store init failed
E0415 22:32:38.949796 15463 MetaDaemon.cpp:215] Init kv failed!
Nebula service status is as follows:
[root#redhat6 scripts]# ./nebula.service status all
[WARN] The maximum files allowed to open might be too few: 1024
[INFO] nebula-metad: Exited
[INFO] nebula-graphd: Exited
[INFO] nebula-storaged: Running as 15547, Listening on 44500
Reason for error: CentOS 6.5 system kernel version is 2.6.32, which is less than 3.9. However, SO_REUSEPORT only supports Linux 3.9 and above.
Upgrading the system to CentOS 7.5 can solve the problem by itself.
Get the following error when protractor is about to run on a windows host via jenkins job. We run selenium hub on a linux host with the selenium node running off of windows
^
`Error: ECONNREFUSED connect ECONNREFUSED
at ClientRequest.<anonymous> (C:\dependencies-dashboard\node_modules\selenium-webdriver\http\index.js:172:16)
at ClientRequest.emit (events.js:107:17)
at Socket.socketErrorListener (_http_client.js:271:9)
at Socket.emit (events.js:107:17)
at net.js:459:14
at process._tickCallback (node.js:355:11)
From: Task: WebDriver.createSession()
at Function.webdriver.WebDriver.acquireSession_ (C:\dependencies-dashboard\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:157:22)
at Function.webdriver.WebDriver.createSession (C:\dependencies-dashboard\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:131:30)
at new Driver (C:\dependencies-dashboard\node_modules\selenium-webdriver\chrome.js:810:36)
at [object Object].DirectDriverProvider.getNewDriver (C:\dependencies-dashboard\node_modules\protractor\lib\driverProviders\direct.js:68:16)
at [object Object].Runner.createBrowser (C:\dependencies-dashboard\node_modules\protractor\lib\runner.js:182:37)
at C:\dependencies-dashboard\node_modules\protractor\lib\runner.js:263:21
at _fulfilled (C:\dependencies-dashboard\node_modules\protractor\node_modules\q\q.js:797:54)
at self.promiseDispatch.done (C:\dependencies-dashboard\node_modules\protractor\node_modules\q\q.js:826:30)
at Promise.promise.promiseDispatch (C:\dependencies-dashboard\node_modules\protractor\node_modules\q\q.js:759:13)
at C:\dependencies-dashboard\node_modules\protractor\node_modules\q\q.js:525:49
[launcher] Process exited with error code 1
events.js:85
throw er; // Unhandled 'error' event
^
Error: protractor exited with code 1
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE`
I was trying the simple chain code, with membersvc and validation peer running in Docker for Mac. I got this error when running the chain code example 2:
CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=localhost:30303 ./chaincode_example02
16:58:41.242 [shim] DEBU : Peer address: localhost:30303
16:58:41.244 [shim] DEBU : os.Args returns: [./chaincode_example02]
16:58:41.244 [shim] DEBU : Registering.. sending REGISTER
2016/08/22 16:58:41 transport: http2Client.notifyError got notified that the client transport was broken EOF.
16:58:41.245 [shim] ERRO : Received error from server: rpc error: code = 13 desc = "transport is closing", ending chaincode stream
Error starting Simple chaincode: rpc error: code = 13 desc = "transport is closing"
This issue is resolved with the latest docker build with the latest docker-compose file.