Chromedriver executable not found selenium java - amazon-web-services

I am getting following error when trying run CI tool Jenkins which is hosted on AWS:
Running TestSuite
/var/lib/jenkins/workspace/losDummyData/chromedriver: error while
loading shared libraries: libnss3.so: cannot open shared object file:
No such file or directory
Jenkins is using github as source code ,
Here is the code for creating driver instance.
System.setProperty("webdriver.chrome.driver","chromedriver");
driver = new ChromeDriver();
Running TestSuite Starting ChromeDriver (v2.10.267518) on port 32528
Only local connections are allowed. [0.179][WARNING]: PAC support
disabled because there is no system implementation Tests run: 3,
Failures: 1, Errors: 0, Skipped: 2, Time elapsed: 61.019 sec <<<
FAILURE! - in TestSuite login(closeDummyApplication.ViaEmail) Time
elapsed: 60.931 sec <<< FAILURE!
org.openqa.selenium.WebDriverException: unknown error: Chrome failed
to start: exited abnormally (Driver info:
chromedriver=2.10.267518,platform=Linux 3.13.0-74-generic x86_64)
(WARNING: The server did not provide any stacktrace information)

Related

Solana Anchor framework: Can't connect to localhost and therefor not deply to it

Anchor deploy
Deploying workspace: http://localhost:8899
Upgrade authority: /home/tomcatzy/.config/solana/id.json
Deploying program "basic-1"...
Program path: /home/tomcatzy/projects/anchor/examples/tutorial/basic-1/target/deploy/basic_1.so...
Error: RPC request error: cluster version query failed: error sending request for url (http://localhost:8899/): error trying to connect: tcp connect error: Connection refused (os error 111)
There was a problem deploying: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "" }.
solana config set --url http://localhost:8899 (Is this enough to start the localhost ?)
solana-keygen new
solana-test-validator
It seems strange that after a succesful anchor build that i can't do a anchor deploy with the solana command lines ran above.
If by any means 'need' to run a - npm init - then where to do it ?
solana config set --url http://localhost:8899 (Is this enough to start the localhost ?)
solana-keygen new
solana-test-validator
I tried the above and got generated a keypair: keyname_1-keypair.json. The build went succesful but the deploy not !
I'm wondering why not ?
Hopefully some can guide me what to get it succed...
In a separate window / terminal, you need to run solana-test-validator so that the tools can talk to your local network. The error you're seeing on deployment is due to an error on connecting to that network.
By following the Solana docs and doing this
sudo $(command -v solana-sys-tuner) --user $(whoami) > sys-tuner.log 2>&1 &
https://docs.solana.com/running-validator/validator-start#system-tuning
The test-ledger folder is done and a sys-tuner.log file is created but it's 0 bytes...
Then i run the solana-test-validator in a separate terminal and the other solana config commands in another termianl then i get the following results ->
You can deploy on-chain programs with the Solana tools.
To deploy a program, you will need the location of the program's shared object.
It will return when you run anchor build in the command line.
Run solana program deploy <PROGRAM_FILEPATH>.
Successful deployment will return the program id of your program.

AWS Replication agent problem when launching

I am trying to launch aws replication agent in a CENTOS 8.3 and always returns me an error during the process of replication agent installation ( python3 aws-replication-installer-init.py ......)
The output of the process shows me:
The installation of the AWS Replication Agent has started.
Identifying volumes for replication.
Identified volume for replication: /dev/sdb of size 7 GiB
Identified volume for replication: /dev/sda of size 11 GiB
All volumes for replication were successfully identified.
Downloading the AWS Replication Agent onto the source server... Finished.
Installing the AWS Replication Agent onto the source server...
Error: Failed Installing the AWS Replication Agent
Installation failed.
If i check the aws_replication_agent_installer.log i can see that appears messages like:
make -C /lib/modules/4.18.0-348.2.1.el8_5.x86_64/build M=/tmp/tmp8mdbz3st/AgentDriver modules
.....................
retcode: 0
Build essentials returned with code None
--- Building software
running: 'which zypper'
retcode: 256
running: 'make'
retcode: 0
running: 'chmod 0770 ./aws-replication-driver-commander'
retcode: 0
running: '/sbin/rmmod aws-replication-driver'
retcode: 256
running: '/sbin/insmod ./aws-replication-driver.ko'
retcode: 256
running: '/sbin/rmmod aws-replication-driver'
retcode: 256
Cannot insert module. Try 0.
running: '/sbin/rmmod aws-replication-driver'
retcode: 256
running: '/sbin/insmod ./aws-replication-driver.ko'
retcode: 256
running: '/sbin/rmmod aws-replication-driver'
retcode: 256
Cannot insert module. Try 1.
............
Cannot insert module. Try 9.
Installation returned with code 2
Installation failed due to unspecified error:
stderr: sh: /var/lib/aws-replication-agent/stopAgent.sh: No such file or directory
which: no zypper in (/sbin:/bin:/usr/sbin:/usr/bin:/sbin:/usr/sbin)
which: no apt-get in (/sbin:/bin:/usr/sbin:/usr/bin:/sbin:/usr/sbin)
which: no zypper in (/sbin:/bin:/usr/sbin:/usr/bin:/sbin:/usr/sbin)
rmmod: ERROR: Module aws_replication_driver is not currently loaded
insmod: ERROR: could not insert module ./aws-replication-driver.ko: Required key not available
rmmod: ERROR: Module aws_replication_driver is not currently loaded
Any issue of the error?
Launching with the command:
mokutil --disable-validation
will allow to change kernel modules (next boot will confirm it introducing password that must be entered afet command mokutil)

VS Code use Jupyter Notebook behind proxy

I referred to this question but I have a different question
Get VS Code Python extension to connect to Jupyter running on remote AWS EMR master node
Environment:
The Jupyter Notebook is on AWS EMR.
To access notebook from the browser using a SOCKS5 proxy. To do so, I have to connect to the VPN to work, SSH using PuTTY using .ppk file and Tunnel (Dynamic Port Forwarding).
To automate the step above, I am using PLink(Homepage | Docs | Download) : c:\stuff\plink.exe --ssh -i c:\stuff\file.ppk -D XXXX user-name#<some_IP_address
I can successfully enable proxy by using msedge.exe --proxy-server="socks5://<address>" or chrome.exe --proxy-server="socks5://<address>"
VS Code Version:
C:\Users\ablaze>code --version
1.55.2
3c4e3df9e89829dce27b7b5c24508306b151f30d
x64
Objective:
How can I access the remote Jupyter Notebook hosted on AWS EMR behind a proxy from Visual Studio Code?
I tried and failed:
Given Visual Studio Code is built on top of Electron and benefits from all the networking stack capabilities of Chromium.
I used Plink like above to SSH and then executed the following command on my windows command prompt: C:\Users\ablaze>code --proxy-server="socks5://<address>" --verbose
Error message:
[17668:0505/104410.116:WARNING:dns_config_service_win.cc(692)] Failed to read DnsConfig.
[main 2021-05-05T14:44:10.224Z] Starting VS Code
[main 2021-05-05T14:44:10.224Z] from: c:\Users\ablaze\AppData\Local\Programs\Microsoft VS Code\resources\app
[main 2021-05-05T14:44:10.224Z] args: {
_: [],
...
'no-proxy-server': false,
'proxy-server': 'socks5://localhost:8088',
...
logsPath: 'C:\\Users\\ablaze\\AppData\\Roaming\\Code\\logs\\20210505T104410'
}
...
[main 2021-05-05T14:44:10.258Z] windowsManager#open pathsToOpen [
{
backupPath: 'C:\\Users\\ablaze\\AppData\\Roaming\\Code\\Backups\\1620224957079',
remoteAuthority: undefined
}
]
To double check I also opened the log file C:\Users\ablaze\AppData\Roaming\Code\logs\20210505T104410\main.log
...
[2021-05-05 10:44:40.345] [main] [trace] update#checkForUpdates, state = idle
[2021-05-05 10:44:40.345] [main] [info] update#setState checking for updates
[2021-05-05 10:44:40.345] [main] [trace] RequestService#request https://update.code.visualstudio.com/api/update/win32-x64-user/stable/3c4e3df9e89829dce27b7b5c24508306b151f30d
[2021-05-05 10:44:40.346] [main] [trace] resolveShellEnv(): skipped (Windows)
[2021-05-05 10:44:44.354] [main] [error] Error: net::ERR_PROXY_CONNECTION_FAILED
at SimpleURLLoaderWrapper.<anonymous> (electron/js2c/browser_init.js:109:6508)
at SimpleURLLoaderWrapper.emit (events.js:315:20)
[2021-05-05 10:44:44.354] [main] [info] update#setState idle

Sonarqube server cannot be reached from sonarscanner - docker container

I have sonarqube running on the aws ec2 instance. I'm using the aws codebuild to build and spin up the container in aws on the same vpc. When I try to run sonar-scanner from the project root directory, it throws the error below:
INFO: SonarQube Scanner 3.0.3.778 INFO: Java 1.8.0_121 Oracle
Corporation (64-bit) INFO: Linux 4.9.43-17.38.amzn1.x86_64 amd64 INFO:
User cache: /root/.sonar/cache ERROR: SonarQube server
[http://34.253.186.73:9000/sonar] can not be reached INFO:
------------------------------------------------------------------------ INFO: EXECUTION FAILURE INFO:
------------------------------------------------------------------------ INFO: Total time: 5.415s INFO: Final Memory: 3M/57M INFO:
------------------------------------------------------------------------ ERROR: Error during SonarQube Scanner execution
org.sonarsource.scanner.api.internal.ScannerException: Unable to
execute SonarQube at
org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:84)
at
org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:71)
at java.security.AccessController.doPrivileged(Native Method)
Please advise. Thanks.
The error message indicates that the scanner was not able to reach the SonarQube server (failed to establish a connection).
You can try to access http://34.253.186.73:9000/sonar with your browser while debugging the problem.

Teamcity Build Error

When I run my Automation test script locally its working absolutely fine without any error message. But when I run on server, I can see that its working fine, but at the end, instead of Pass status, it shows test failure.
Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 282.662 sec <<<
FAILURE!
allNumbersEditorsDraws(NumbersEditor.TestSuiteAdmin) Time elapsed: 0.047 sec <
<< FAILURE!
org.openqa.selenium.remote.SessionNotFoundException: Session ID is null. Using WebDriver after calling quit()?
Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09'
System info: host: 'W-SL-DEVBUILD1', ip: '10.130.32.68', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_131'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:134)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:644)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:363)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:500)
at org.openqa.selenium.By$ByXPath.findElement(By.java:361)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:355)
at NumbersEditor.LoginPage.loginAdmin(LoginPage.java:32)
at NumbersEditor.TestSuiteAdmin.allNumbersEditorsDraws(TestSuiteAdmin.java:18)
Results :
Failed tests: allNumbersEditorsDraws(NumbersEditor.TestSuiteAdmin): Session ID is null. Using WebDriver after calling quit()?(..)
Tests run: 3, Failures: 1, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:50 min
[INFO] Finished at: 2017-06-26T10:41:18+01:00
[INFO] Final Memory: 13M/328M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.
12.4:test (default-test) on project NumbersEditor: There are test failures.
[ERROR]
[ERROR] Please refer to C:\BuildAgent\work\f3b21200f1a5caf2\Automation\target\su
refire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
This is a common issue when you are doing UI test with Selenium on virtual machines.
When you run your tests, your session should be active. So, if you are connected in remote desktop on the VM, the current script is working, but, if you exit, the current session disapear.
In order to make it works, you should leave the current remote session with a script :
for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (
%windir%\System32\tscon.exe %%s /dest:console
)