The project has worked fine but suddenly it hangs on startup without any error.
Run-App --verbose --stacktrace give this print:
grails> run-app --verbose --stacktrace
| Running application...
> Configuring > 0/1 projects > root project > Resolving dependencies ':classpath> Configuring > 1/1 projects > Resolving dependencies ':agent' > Resolving depen> Configuring > 1/1 projects > Resolving dependencies ':agent' > Resolving depen:compileJava UP-TO-DATE
:compileGroovy UP-TO-DATE
:buildProperties UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:findMainClass
:bootRun
2017-04-18 14:20:47.410 ERROR --- [ main] g.boot.config.tools.ClassPathScanner : The application defines a Groovy source using the default package. Please move all Groovy sources into a package.
> Building 85% > :bootRun
Configuring Spring Security Core ...
... finished configuring Spring Security Core
> Building 85% > :bootRun
Configuring Spring Security UI ...
... finished configuring Spring Security UI
> Building 85% > :bootRun
Can not see what's going on. I tried to clean up the build-directory but that didn't help.
The only things that's changed since working session is that I have added a few GSP-files. But can't think it would hang the startup, would it?
Ok, this mysterious problem has got it's solution.
I forgot to check if the database was ok in MSSQL. Well other databases that didn't used tcp worked but this one used port 49678 which now had been taken by the operating system.
Using the beautiful app "cports" I could see this:
services.exe 772 TCP 49678 :: :: Listening services.exe Operativsystemet Microsoft® Windows® Tjänst- och styrenhetsapp 10.0.14393.0 (rs1_release.160715-1616) Microsoft Corporation N/A 2017-04-18 14:58:44
So I changed the port used by MSSQL to 1433 and then the pain was over.
Related
Thanks for reading my post. I've got a problem that I'd like to pick your brains about. I have many automated Selenium tests that are written in Java. They leverage JUnit for testing. I am tasked with optimizing the run time of these tests on an Amazon EC2 CentOS server. The tests are pulled from a Github repository and get stored inside a Docker Container on the EC2 instance. Similarly, these tests also run from the client's laptop through Eclipse using Cucumber. On the laptop, the tests take a fraction of the time that they do on the EC2 instance. The EC2 instance and laptop have the same amount of RAM and plenty of CPU processing power to run the tests, so I would think that the tests on the EC2 instance wouldn't take nearly as long as they do. Both the EC2 instance and the laptop have to go through a proxy to get to the Internet as well. I have made sure this part was set up correctly, as I had to set HTTP_PROXY, HTTPS_PROXY, and no_proxy to specific IP addresses.
In this section, I will provide the code that the chromedriver gets instantiated with whenever it is called. I will also provide the exact commands that I am using to run the tests. Please see below:
Here is the method that is called when it gets instantiated:
public static ChromeOptions setupChromeOptions() {
ChromeOptions options = new ChromeOptions();
Map<String, Object> p refs = new HashMap<String, Object>();
prefs.put("profile.default_content_setting_values.notifications", 2);
options.setHeadless(true);
options.setProxy(null);
options.setExperimentalOption("prefs", prefs);
options.addArguments("--disable-dev-shm-usage");
options.addArguments("--disable-extensions");
options.addArguments("--disable-gpu");
options.addArguments("--headless");
options.addArguments("--no-proxy-server");
options.addArguments("--no-sandbox");
options.addArguments("--proxy-bypass-list=*");
options.addArguments("--proxy-server=");
options.addArguments("--proxy-server='direct://'");
options.addArguments("--start-maximized");
options.addArguments("--window-size=1280,720");
return options;
}
Here are the commands that are ran through Jenkins on the EC2 instance:
#!/bin/bash
cd /home/ec2-user/Git/REPOS_NAME # Navigate to where the repos are at on the EC2.
git fetch --all
git reset --hard origin/master
git pull # Pull down the latest.
sudo docker container ls # Display the running containers.
sudo docker exec 0967d39b1967 bash -c 'cd /Selenium/ ; rm -rf REPO_ROOT_FOLDER/ ; exit' # Delete the automated test folder so that it gets copied over fresh.
sudo docker cp /home/ec2-user/Git/REPO_NAME/REPO_ROOT_FOLDER 0967d39b1967:/Selenium/ # Copy the latest from the Github Repository to the Docker container.
sudo docker exec 0967d39b1967 bash -c 'cd /Selenium/REPO_ROOT_FOLDER/ANOTHER_FOLDER/driver ; chmod 0777 chromedriver ; cd .. ; mvn clean test' # Activate the Testrunner that is enabled in pom.xml. This kicks off the automated tests.
Finally, here are the version numbers and OS details of what I'm running:
Amazon EC2: CentOS 6.10
Docker Container OS: Ubuntu 16.04
Selenium: selenium-server-standalone-3.141.59.jar
Chromedriver: 84.0.4147.30
Google Chrome: 84.0.4147.105
Java: OpenJDK 1.8.0_252
Cucumber: 2.0.0
I cannot provide links to an HTML Page that I'm scraping because it's all inside of a Salesforce environment.
EC2 Specs:
AWS T2.XLarge
4 vCPUs
64-Bit
16 GB RAM
54 CPU Credits per hour
Laptop Specs:
Intel Core i7-8665U # 1.90GHz, 2112 MHz, 4 cores, 8 Logocal Processors
16 GB RAM
Windows 10
Group of Tests 1:
EC2: 50 minutes
Laptop through Eclipse: 20 minutes
Group of Tests 2:
EC2: 2 hours 43 minutes
Laptop through Eclipse: 1 hour 15 minutes
There are two breakdowns of the timings for two groups of tests. As you can see, the times off of the EC2 are much longer than that of that laptop.
Finally, here is a log of the set of tests that take 50 minutes to run. I had to change some of the directory and path names to protect the client.
Started by user Scott-IM
Running as SYSTEM
[EnvInject] - Loading node environment variables.
Building remotely on EC2_INSTANCE in workspace /var/lib/jenkins/workspace/Run mvn test
[Run mvn test] $ /bin/bash /tmp/jenkins166122467778007381.sh
Fetching origin
FIPS mode initialized
HEAD is now at 506f4ef Setting proxy to null for Chromeoptions
FIPS mode initialized
Already up to date.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0967d39b1967 IMAGE_NAME "/Selenium/setup.sh" 4 hours ago Up 4 hours 0.0.0.0:8080->8080/tcp CONTAINER_NAME
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[INFO] Scanning for projects...
[INFO]
[INFO] --------------< test:automation >--------------
[INFO] Building test-automation 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # automation ---
[INFO] Deleting /Selenium/automation/automation/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # automation ---
[WARNING] Using platform encoding (UTF8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Selenium/automation/automation/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # automation ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # automation ---
[WARNING] Using platform encoding (UTF8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Selenium/automation/automation/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # automation ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF8, i.e. build is platform dependent!
[INFO] Compiling 111 source files to /Selenium/salesforce-automation/salesforce-automation/target/test-classes
[WARNING] /Selenium/automation/automation/src/test/java/com/test/mapper/OIDP_Flow/OIDP_Email_Auto_Approval_Flow_2.java:[797,128] unmappable character for encoding UTF8
[WARNING] /Selenium/automation/automation/src/test/java/com/test/mapper/OIDP_Flow/OIDP_Email_Auto_Approval_Flow_2.java:[1842,130] unmappable character for encoding UTF8
[WARNING] /Selenium/automation/automation/src/test/java/com/test/shared/ExtentReporter.java:[126,33] unmappable character for encoding UTF8
[WARNING] /Selenium/automation/automation/src/test/java/com/test/shared/ExtentReporter.java:[127,32] unmappable character for encoding UTF8
[WARNING] /Selenium/automation/automation/src/test/java/com/test/mapper/rsiaa/HD_ISO_VSC_Auto_Approval_of_Resubmitted_Si.java:[4977,95] unmappable character for encoding UTF8
[WARNING] /Selenium/automation/automation/src/test/java/com/test/pages/aao/TrackingRecord.java:[27,39] unmappable character for encoding UTF8
[WARNING] /Selenium/automation/automation/src/test/java/com/test/pages/aao/TrackingRecord.java:[117,84] unmappable character for encoding UTF8
[WARNING] /Selenium/automation/automation/src/test/java/com/test/pages/aao/TrackingRecord.java:[156,92] unmappable character for encoding UTF8
[WARNING] /Selenium/automation/automation/src/test/java/com/test/pages/aao/TrackingRecord.java:[195,84] unmappable character for encoding UTF8
[WARNING] /Selenium/automation/automation/src/test/java/restApiPOC/PrivacyRestApiConnection.java: Some input files use unchecked or unsafe operations.
[WARNING] /Selenium/automation/automation/src/test/java/restApiPOC/PrivacyRestApiConnection.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-surefire-plugin:2.19:test (default-test) # automation ---
[WARNING] The parameter forkMode is deprecated since version 2.14. Use forkCount and reuseForks instead.
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
Running com.test.runner.TestRunner2
Starting ChromeDriver 84.0.4147.30 (48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147#{#310}) on port 23815
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[1604696323.888][SEVERE]: bind() failed: Cannot assign requested address (99)
Nov 06, 2020 8:58:44 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Frame count :3
Frame count :4
Frame count :6
Newly Generated Service Item Number is :15355359
Frame count :3
Frame count :3
Clicked on new service item :15355359
Frame count :2
Frame count :2
Frame count :4
Frame count :3
Frame count :3
1 Scenarios (1 passed)
33 Steps (33 passed)
44m57.274s
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2,698.236 sec - in com.salesforcetest.runner.TestRunner2
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 45:05 min
[INFO] Finished at: 2020-11-06T21:43:40Z
[INFO] ------------------------------------------------------------------------
Finished: SUCCESS
If anything was unclear or didn't make sense, please let me know and I will address the issue. I have looked all over the Internet for solutions and haven't found anything yet. I'm almost at a loss of what to do, as I'm not entirely sure what the exact cause of the slowness is. If anyone could provide some clues or things to try, I would be more than willing to give it a shot.
Thanks much for any and all help.
Not a solution per se, but throwing some things out there worth trying.
Since you're comparing Chrome run times I would advise trying to keep the versions in sync. That's tough on windows because you often have no control when Chrome updates. This isn't to say it would solve your problem but it would help eliminate a variable.
Chrome (and chromedriver for that matter) goes through a decent amount of changes that not being on the same version CAN and HAS made a difference for me.
Here are a few of the chrome options I've had to resort to using over the past couple years to get things running smoothly. I noticed 3 you didn't have.
--disable-extensions -- You never know what they might have on their local version of chrome.
--dns-prefetch-disable -- script would hang without this in older versions of chromedriver. https://bugs.chromium.org/p/chromedriver/issues/detail?id=402#c128
--enable-features=NetworkService,NetworkServiceInProcess -- script freezing https://groups.google.com/forum/m/#!topic/chromedriver-users/ktp-s_0M5NM[21-40]
I am trying to configure DSE on newly configured centos 7 VM but I am getting error Attempting to configure dse-full 5.1.0, but found a different version installed. Upgrades and downgrades aren't supported." (opscd-pool-4) I am not able to understand why getting this error when the machine is completely new, even I haven't run any DSE command.
ERROR: Received error from node event-subtype="MeldError" job-id="a38724e1-2139-45f5-9266-079638c2ca2e" name="cassandra-5" ssh-management-address="192.168.159.175" node-id="dafe635a-6e98-4ae6-b0ea-6afa0da51731" event-type="error" message="Attempting to configure dse-full 5.1.0, but found a different version installed. Upgrades and downgrades aren't supported." (opscd-pool-4)
I am using Opscentre to configure Node.
Here you go detailed log of LCM
2017-11-29 05:38:37,753 [opscenterd] INFO: configure job started for node name="cassandra-5" ssh-management-address="192.168.138.237" node-id="dafe635a-6e98-4ae6-b0ea-6afa0da51731" (async-thread-macro-32)
2017-11-29 05:38:37,776 [opscenterd] INFO: Trying to establish ssh connection name="cassandra-5" ssh-management-address="192.168.138.237" node-id="dafe635a-6e98-4ae6-b0ea-6afa0da51731" node-name="cassandra-5" job-id="4fae4fe1-ca3c-4924-abdb-62c4cf4ad878" (async-thread-macro-32)
2017-11-29 05:38:38,515 [opscenterd] INFO: Received milestone from node name="cassandra-5" ssh-management-address="192.168.138.237" node-id="dafe635a-6e98-4ae6-b0ea-6afa0da51731" message="Uploaded facts to OpsCenter server" job-id="4fae4fe1-ca3c-4924-abdb-62c4cf4ad878" (opscd-pool-0)
2017-11-29 05:38:40,135 [opscenterd] ERROR: Received error from node event-subtype="MeldError" job-id="4fae4fe1-ca3c-4924-abdb-62c4cf4ad878" name="cassandra-5" ssh-management-address="192.168.138.237" node-id="dafe635a-6e98-4ae6-b0ea-6afa0da51731" event-type="error" message="Attempting to configure dse-full 5.1.0, but found a different version installed. Upgrades and downgrades aren't supported." (opscd-pool-7)
2017-11-29 05:38:40,161 [opscenterd] ERROR: Configure job 4fae4fe1-ca3c-4924-abdb-62c4cf4ad878 failed! (async-thread-macro-33)
2017-11-29 05:38:41,102 [opscenterd] INFO: configure job finished for node name="cassandra-5" ssh-management-address="192.168.138.237" node-id="dafe635a-6e98-4ae6-b0ea-6afa0da51731" (async-thread-macro-32)
Here you go node info:
[root#li1639-135 ~]# dpkg -l dse-full
-bash: dpkg: command not found
[root#li1639-135 ~]# yum info dse-full
Loaded plugins: fastestmirror
base | 3.6 kB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
(1/4): base/7/x86_64/group_gz | 156 kB 00:00
(2/4): extras/7/x86_64/primary_db | 130 kB 00:00
(3/4): base/7/x86_64/primary_db | 5.7 MB 00:00
(4/4): updates/7/x86_64/primary_db | 3.6 MB 00:00
Determining fastest mirrors
* base: mirrors.linode.com
* extras: mirrors.linode.com
* updates: mirrors.linode.com
Error: No matching Packages to list
Job ID4fae4fe1-ca3c-4924-abdb-62c4cf4ad878
11/29/2017, 5:38:40AM UTC ERROR - MELDERROR Attempting to configure dse-full 5.1.0, but found a different version installed. Upgrades and downgrades aren't supported.
11/29/2017, 5:38:40AM UTC SHELL-COMMAND - RESULT Finished executing command: rpm -qa | grep -E ^dse-full-[[:digit:]] | grep 5.1.0
11/29/2017, 5:38:39AM UTC SHELL-COMMAND - INVOCATION Invoked command: rpm -qa | grep -E ^dse-full-[[:digit:]] | grep 5.1.0
11/29/2017, 5:38:39AM UTC CHECK - IS-PACKAGE-INSTALLED Checking if package dse-full is installed with version 5.1.0
11/29/2017, 5:38:39AM UTC CHANGE - PACKAGE-PROXY Not using proxy
11/29/2017, 5:38:38AM UTC MILESTONE - UPLOADED-FACTS Uploaded facts to OpsCenter server
11/29/2017, 5:38:38AM UTC SHELL-COMMAND - INVOCATION Invoked command: if [ -x "$(which yum)" ] && [ -f "/etc/redhat-release" -o -f "/etc/SuSE-release" -o -f "/etc/system-release" ]; then echo -n "yum"; elif [ -x "$(which...
Updated Answer
I was able to sync up with Ranjeet offline and found that the logs posted above were the result of configure jobs, which require that DSE is already installed. When running install jobs, things proceeded as expected.
There were also some issues with newly supported platforms and platform checks working in confusing ways, but none of that is reflected in the logs for the original post in this question.
Original Answer
OpsCenter/LCM engineer here, I work on the provisioning features.
"Attempting to configure dse-full 5.1.0, but found a different version installed. Upgrades and downgrades aren't supported." The meaning of the error message seems pretty clear. You're asking OpsCenter/LCM to install/configure DSE 5.1.0. Are you positive that you don't have a different version already installed?
On apt-based target machines, you can check what version of DSE is install with 'dpkg -l dse-full'
On yum-based target machines, you can check what version of DSE is installed with 'yum info dse-full'
If you're really trying to install DSE 5.1.0, but a different version is already present on your nodes, you'll have to upgrade/downgrade outside OpsCenter LCM and can the resume managing configs with LCM after the desired version is installed. See http://docs.datastax.com/en/upgrade/doc/upgrade/datastax_enterprise/upgrdDSE.html
If you're attempting to install some other version (which matches what's already installed), then you'll have to clone your config profile and set the correct DSE version when you create the new CP. See: https://support.datastax.com/hc/en-us/articles/212267063-Lifecycle-Manager-Cloning-Configuration-Profiles
If you believe the error from OpsCenter/LCM is mistaken, and that you don't really have a different version of DSE installed on the target nodes, then we'll need more log snippets from LCM with the events leading up to the error, and information about how you confirmed the DSE version on all nodes.
I'm trying to add ElasticSearch plugin in my Grails 3.1.6 project.
I installed plugin as:
dependencies {
//..
compile 'org.grails.plugins:elasticsearch:1.0.0.2'
//..}
And configured application.yml as
elasticSearch:
client:
node: local
datastoreImpl: hibernateDatastore
But when I try to run application, i'm getting error as below:
BUILD SUCCESSFUL
Total time: 5.118 secs
|Running application...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':bootRun'.
> A problem occurred starting process 'command 'C:\Program Files\Java\jdk1.8.0_45\bin\java.exe''
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error |
Failed to start server (Use --stacktrace to see the full trace)
Process finished with exit code 1
I'm using IntellijIdea v2016 as IDE.
Would someone please help me to figure out the error spot please.
Thanks.
This isn't related to the plugin, it's a Boot/Gradle problem caused by having a classpath that causes the process to fail because the combined length of the process command is larger than the max Windows allows. This was fixed in 3.1.2 but you have to add a small config setting to build.gradle since it's not a problem in Linux or OSX:
grails {
pathingJar = true
}
See https://github.com/grails/grails-core/issues/9125 for more info.
I'm just trying out grails and it's already failing with this error:
grails> create-app
| Application created at /path/hello
| Initializing application. Please wait...
BUILD SUCCESSFUL
Total time: 2.553 secs
grails> run-app
| Running application...
java.lang.ExceptionInInitializerError
[stack trace]
Caused by: java.lang.RuntimeException: java.lang.IllegalAccessException: Class org.springsource.loaded.ri.ReflectiveInterceptor can not access a member of class org.codehaus.groovy.reflection.GroovyClassValuePreJava7 with modifiers "public"
[more stack trace]
Caused by: java.lang.IllegalAccessException: Class org.springsource.loaded.ri.ReflectiveInterceptor can not access a member of class org.codehaus.groovy.reflection.GroovyClassValuePreJava7 with modifiers "public"
(GrailsAutoConfiguration.groovy:36)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':bootRun'.
> Process 'command '/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25.x86_64/bin/java'' finished with non-zero exit value 1
I think there's some cache that's blocked up somewhere, but I've tried "grails clean" and "gradle clean" and "clean-all" but no luck there.
I'm really not doing anything more than what you see in the dump above- I create a new app and try to run it. What's going on?
I had same problems withs jvm 1.7.
Try to use jvm 1.8. Tested at 1.8.0_25.
Or you can try to run app using "grails run-app" command from app folder (works with jvm 1.7.0_80).
I've just created a test project in Grails 3.1.0 that uses the new rest-api profile:
grails create-app rest-test --profile=rest-api
Without any modifications, when I try and gradle build the application the build fails:
cd rest-test
gradle build
:compileJava UP-TO-DATE
:compileGroovy
:processResources
:classes
:compileTestJava UP-TO-DATE
:compileTestGroovy UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:compileIntegrationTestJava UP-TO-DATE
:compileIntegrationTestGroovy UP-TO-DATE
:findMainClass
:buildProperties
:compileGsonViews
Invalid arguments: [C:\projects\rest-test\grails-app\views,C:\projects\rest-test\build\gson-classes\main,1.8,rest-test,C:\projects\rest-test\grails-app\conf\application.yml,UTF-8]
Usage: java -cp CLASSPATH grails.plugin.json.view.JsonViewCompiler [srcDir] [destDir] [targetCompatibility] [packageImports] [packageName] [configFile] [encoding]
:compileGsonViews FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileGsonViews'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_66\bin\java.exe'' finished with non-zero exit value 1
Looking at that error message, it seems there aren't enough arguments passed to the java call.
If I do a grails run-app I'm able to start the app successfully and can see the gson views at localhost:8080.
Does anyone have any ideas why the gradle build command is failing?
Found the solution on Grails GitHub issue tracker:
Please replace the line
classpath "org.grails.plugins:views-gradle:1.0.1"
With
classpath "org.grails.plugins:views-gradle:1.0.3"
In your build.gradle file
I tested it with Grails 3.1.2 -- it works!