Netbeans is not able to deploy web application on Glassfish in Mac os Sierra [duplicate] - macos

I'm running Mac OS. I've set up the Payara server with NetBeans. And when I'll try to run the server it never shows the green 'dot' that indicates its online status, instead it shows the 'loading' dot forever.
However, I can access it on http://localhost:4848, but when I try to deploy an application to the server I get this error:
GlassFish Server is running.
Starting GlassFish Server
Initial deploying slit-ee to /Users/christian/slit/slit-ee/dist/gfdeploy/slit-ee
Completed initial distribution of slit-ee
GlassFish Server, deploy, null, false
/Users/christian/slit/slit-ee/nbproject/build-impl.xml:307: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 22 seconds)
And the full server log
objc[1865]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/bin/java (0x105e334c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x105efb4e0). One of the two will be used. Which one is undefined.
Launching GlassFish on Felix platform
nov 28, 2016 2:14:21 AM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner
INFO: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime#18808234 in service registry.
#!## LogManagerService.postConstruct : rootFolder=/Users/christian/opt/payara41/glassfish
#!## LogManagerService.postConstruct : templateDir=/Users/christian/opt/payara41/glassfish/lib/templates
#!## LogManagerService.postConstruct : src=/Users/christian/opt/payara41/glassfish/lib/templates/logging.properties
#!## LogManagerService.postConstruct : dest=/Users/christian/opt/payara41/glassfish/domains/payaradomain/config/logging.properties
Info: Running Payara Version: Payara Server 4.1.1.164 #badassfish (build 28)
Info: Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter
Info: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
Info: Authorization Service has successfully initialized.
Info: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Info: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Info: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
Info: Registered fish.payara.ha.hazelcast.store.HazelcastBackingStoreFactoryProxy for persistence-type = hazelcast in BackingStoreFactoryRegistry
Info: Registered Hazelcast BackingStoreFactory with persistence-type = hazelcast
Info: Grizzly Framework 2.3.28 started in: 47ms - bound to [/0.0.0.0:8080]
Info: Grizzly Framework 2.3.28 started in: 1ms - bound to [/0.0.0.0:8181]
Info: Grizzly Framework 2.3.28 started in: 2ms - bound to [/0.0.0.0:4848]
Info: Grizzly Framework 2.3.28 started in: 1ms - bound to [/0.0.0.0:3700]
Info: Payara Server 4.1.1.164 #badassfish (28) startup time : Felix (33 542ms), startup services(5 715ms), total(39 257ms)
Info: Payara Notification Service Started with configuration: NotificationExecutionOptions{enabled=true, notifierConfigurationExecutionOptionsList={LOG=NotifierConfigurationExecutionOptions{notifierType=LOG, enabled=true}}}
Info: Cleaning JarFileFactory Cache to prevent jar FD leaks
Info: HV000001: Hibernate Validator 5.1.2.Final
Info: Grizzly Framework 2.3.28 started in: 1ms - bound to [/0.0.0.0:7676]
Info: Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl#7bca6fac as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl#129fed45.
Info: /Users/christian/opt/payara41/glassfish/domains/payaradomain/autodeploy/bundles does not exist, please create it.
Info: JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://192.168.0.183:8686/jndi/rmi://192.168.0.183:8686/jmxrmi
Is there any security mechanism that prevents this on Mac OS?

It seems that Netbeans cannot connect to the started Payara Server. Maybe your issue is similar to this one with Netbeans and Tomcat on a Mac after some system update: https://discussions.apple.com/thread/7680039?start=0&tstart=0
Here is a quote from that page:
Step 1: Go to system preference >Network>Select your wifi
connection>Advanced>select proxies tab.
There check 3 options 1) Auto proxy Discovery 2)Automatic Proxy
configuration 3) web proxy(http)
Step 2: Go to Netbeans>preferences>General> select use system proxy>
reload> test connection

I found an alternative solution for me:
Go to Netbeans-> Preference-> chose No Proxy.
Test the connection. should success, Press Ok. Then clean and run the application.
No need to change any network configuration on mac.

Related

Spring Cloud Bootstrap Config prepending "bootstrapProperties-" to all of my BootstrapProperties

My team and I updated a spring boot application in order to work with oauth2, but with the updated we jumped from Spring Boot 1.5.2 to Spring Boot 2.5.8. The oauth2 is now implemented although the new version of the app cannot found any client encryption keys from the config server. Checking the logs of the last version I have:
INFO Nov 17 16:30:51 [main] org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration: LOCAL_HOST:, APP_ID:, OPERATION_NAME:, TRANSACTION_ID:, CALL_PATH:, REMOTE_HOST:, USER: - Located property source: CompositePropertySource [name='configService', propertySources=[MapPropertySource [name='fulfillments-event-validation-job'], MapPropertySource [name='config-internal']]]
After this log there are several com.esrx.inf.config.client.CustomEnvironmentDecryptApplicationInitializer* logs where it loads the values of config server and decrypts them
But in the new version I have this logs:
INFO Nov 18 02:25:53 [main] org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration: LOCAL_HOST:, APP_ID:, OPERATION_NAME:, TRANSACTION_ID:, CALL_PATH:, REMOTE_HOST:, USER: - Located property source: [BootstrapPropertySource {name='bootstrapProperties-configClient'}, BootstrapPropertySource {name='bootstrapProperties-fulfillments-event-validation-job'}, BootstrapPropertySource {name='bootstrapProperties-config-internal'}]
After this log there are not even one log for com.esrx.inf.config.client.CustomEnvironmentDecryptApplicationInitializer*
The old app can load and decrypt the config server values, the new version doesn't even load the values of config server.
old version
new version
spring-boot-starter-test 1.5.2
2.5.8
it does not have this one
spring-cloud-starter-bootstrap 3.0.5
spring-cloud-starter-config 1.3.0
3.0.6
configService
bootstrapProperties-configClient
fulfillments-event-validation-job
bootstrapProperties-fulfillments-event-validation-job
config-internal
bootstrapProperties-config-internal
So I'm thinking the error is with the values of the new version, for some reason is prepending en every value the string "bootstrapProperties-". You know any related to this issue?
I changed the configuration of my pom and application.properties several times.
At the end I stayed with spring-cloud-starter-bootstrap in order for the app to run.

Fineract doesn't start in mac Mojave

I followed exact same step as per [1] and when I execute
./gradlew tomcatRunWar
Process didn't work after 92%
16:14:48.912 [localhost-startStop-1] INFO o.s.j.c.CachingConnectionFactory - Established shared JMS Connection: ActiveMQConnection {id=ID:Gayans-MacBook-Pro.local-58639-1559299488784-1:1,clientId=null,started=false}
16:14:48.971 [localhost-startStop-1] INFO o.a.f.i.c.b.WarWebApplicationInitializer - Started WarWebApplicationInitializer in 58.585 seconds (JVM running for 141.561)
The following warnings have been detected with resource and/or provider classes:
WARNING: A HTTP GET method, public java.lang.String org.apache.fineract.portfolio.self.savings.api.SelfSavingsApiResource.template(java.lang.Long,java.lang.Long,java.lang.String,javax.ws.rs.core.UriInfo), should not consume any entity.
Started Tomcat Server
The Server is running at http://localhost:8080/fineract-provider
Building 92% > :tomcatRunWar
[1] https://github.com/apache/fineract
./gradlew tomcatRunWar is actually a way to run the Fineract App in Dev mode. The logs you pasted shows Fineract is actually doing the right thing by starting up in Dev mode. What you can do now is get the web app here: https://github.com/openMF/community-app, build it using the instructions in the read me and try to login to the Fineract backend using username: mifos, password: password

SonarQube 6.0 with Sonar-Scanner-2.6.1 Cofinguration with MYSQL

I was using SonarQube 5.1.2 with Sonar-runner-dist 2.4 but I have to upgrade my SonarQube to 6.0 along with Sonar-Scanner-2.6.1
I was using MySQL for SonarQube 5.1.2 but When I upgraded to SonarQube 6.0 I am getting this error , Can someone help me how to override the error and what changes required with SonarQube 6.0
Not Sure why I am getting
WARN: Property 'sonar.jdbc.username' is not supported any more. It will be ignor
ed. There is no longer any DB connection to the SQ database.
Complete Error Log
WARN: sonar-runner.bat script is deprecated. Please use sonar-scanner.bat instea
d.
D:\Softwares\SonarQube_old\sonar-scanner-2.6.1\sonar-scanner-2.6.1
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
INFO: Scanner configuration file: D:\Softwares\SonarQube_old\sonar-scanner-2.6.1
\sonar-scanner-2.6.1\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarQube Scanner 2.6.1
INFO: Java 1.8.0_111 Oracle Corporation (32-bit)
INFO: Windows 7 6.1 x86
INFO: User cache: C:\Users\391007\.sonar\cache
INFO: Load global repositories
INFO: Load global repositories (done) | time=124ms
WARN: Property 'sonar.jdbc.url' is not supported any more. It will be ignored. T
here is no longer any DB connection to the SQ database.
WARN: Property 'sonar.jdbc.username' is not supported any more. It will be ignor
ed. There is no longer any DB connection to the SQ database.
WARN: Property 'sonar.jdbc.password' is not supported any more. It will be ignor
ed. There is no longer any DB connection to the SQ database.
INFO: User cache: C:\Users\391007\.sonar\cache
INFO: Load plugins index
INFO: Load plugins index (done) | time=9ms
INFO: SonarQube server 6.0
INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is
platform dependent)
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 2.553s
INFO: Final Memory: 40M/96M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Unable to register extension com.sonar.governance.task.A.A from plugin 'g
overnance'
ERROR: Caused by: Lorg/sonar/batch/bootstrap/BatchWsClient;
ERROR: Caused by: org.sonar.batch.bootstrap.BatchWsClient
ERROR:
ERROR: To see the full stack trace of the errors, re-run SonarQube Scanner with
the -e switch.
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging
I have referred below Answer but I am not getting solution to solve the problem
https://stackoverflow.com/a/35231407/3973543
"WARN: Property 'sonar.jdbc.url' is not supported any more " is not an error, just a warning, since 5.6 sonar.jdbc.url, sonar.jdbc.username and sonar.jdbc.password are not needed anymore in jenkins side. The sonarqube DataBase is only access from sonarqube instance, not from the clients as jenkins. So you should let them empty now. Just fill the sonarqube instance url for the WS connection.
Governance plugin is now commercial, you have to registry a license for using it

Authenticate sonar-runner via basic auth

Our sonarqube server is behind http basic authentication and local runner fails with 401 error. Is it somehow possible to provide credentials to it? AOfficial docs shows how to provide sonarqube's internal user...
UPD #1:
sonarqube: v5.3,
sonar-runner: v2.5
Debug log of runner:
INFO: Scanner configuration file: /Users/user/Documents/Projects/Project1/sonar-scanner-2.5/conf/sonar-runner.properties
INFO: Project configuration file: /Users/user/Documents/Projects/Project1/sonar-project.properties
INFO: SonarQube Scanner 2.5
INFO: Java 1.8.0_45 Oracle Corporation (64-bit)
INFO: Mac OS X 10.11.3 x86_64
INFO: Error stacktraces are turned on.
DEBUG: cache: /Users/user/.sonar/ws_cache/https%3A%2F%2Fexample.com%2Fsonar%2F/global
INFO: User cache: /Users/user/.sonar/cache
DEBUG: Extract sonar-runner-batch in temp...
DEBUG: Get bootstrap index...
DEBUG: Download: https://example.com/sonar/batch_bootstrap/index
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 1.171s
INFO: Final Memory: 5M/245M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
org.sonar.runner.impl.RunnerException: Unable to execute SonarQube
at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:100)
at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:87)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:87)
at org.sonar.runner.impl.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:83)
at org.sonar.runner.api.EmbeddedRunner.doStart(EmbeddedRunner.java:249)
at org.sonar.runner.api.EmbeddedRunner.start(EmbeddedRunner.java:187)
at org.sonar.runner.api.EmbeddedRunner.start(EmbeddedRunner.java:182)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:66)
Caused by: java.lang.IllegalStateException: Fail to download libraries from server
at org.sonar.runner.impl.Jars.downloadFiles(Jars.java:93)
at org.sonar.runner.impl.Jars.download(Jars.java:70)
at org.sonar.runner.impl.JarDownloader.download(JarDownloader.java:40)
at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:91)
... 9 more
Caused by: java.lang.IllegalStateException: Status returned by url [https://example.com/sonar/batch_bootstrap/index] is not valid: [401]
at org.sonar.runner.impl.ServerConnection.callUrl(ServerConnection.java:186)
at org.sonar.runner.impl.ServerConnection.downloadString(ServerConnection.java:121)
at org.sonar.runner.impl.ServerConnection.tryServerFirst(ServerConnection.java:148)
at org.sonar.runner.impl.ServerConnection.download(ServerConnection.java:112)
at org.sonar.runner.impl.Jars.downloadFiles(Jars.java:78)
... 12 more
No it doesn't look like sonar-runner supports proxy authentication. SonarQube has built-in access control so I'm not sure why you'd need proxy authentication on top of that. Maybe you could disable proxy authentication for SonarQube's URL.
The sonar-runner, even if configured with credentials, does not use these to make it's first call to the server. The endpoint is /batch/index. You have to allow public access to that endpoint. For all other urls basic auth is fine.
More details about my working setup in my answer here: https://stackoverflow.com/a/60132667/1838233
I've tried that setup with the runner and a sonar-project.properties file containing:
sonar.host.url=https://myserver/sonar/
sonar.login=${env.SONARUSER}
sonar.password=${env.SONARPWD}
and could access Sonar behind Apache basic auth that way.
I have been looking for this too and failed to find any options to allow this. One use case I can think of for needing this is you have the sonar client running on the far end of a GCP IAP away from the sonar server. You'd need to have the client pass through the initial proxy to get to the sonar server. Even if the sonar server supports this auth natively you need some way for the client to pass an auth header.
This is for scenarios where you either don't trust sonar or you don't trust the deployment of sonar by some novice, but you do trust a zero-trust protected proxy by gcp's platform

karaf 3.0.1 not starting up

I'm trying to start karaf 3.0.1 in a solaris box (without internet) but getting the following error:
karaf: Ignoring predefined value for KARAF_HOME
Could not resolve mvn:org.eclipse/org.eclipse.osgi/3.8.2.v20130124-134944
and in karaf.log:
Jun 30, 2014 12:21:09 PM org.apache.karaf.main.Main main
SEVERE: Could not launch framework
java.lang.RuntimeException: Could not resolve mvn:org.eclipse/org.eclipse.osgi/3.8.2.v20130124-134944
at org.apache.karaf.main.util.SimpleMavenResolver.resolve(SimpleMavenResolver.java:59)
at org.apache.karaf.main.Main.createClassLoader(Main.java:315)
at org.apache.karaf.main.Main.launch(Main.java:234)
at org.apache.karaf.main.Main.main(Main.java:171)
the bundles are well in place (system folder) and the org.ops4j.pax.url.mvn.cfg file states:
org.ops4j.pax.url.mvn.repositories=\
file:${karaf.home}/${karaf.default.repository}#id=system.repository, \
file:${karaf.data}/kar#id=kar.repository#multi\
http://repo1.maven.org/maven2#id=central,\
http://repository.springsource.com/maven/bundles/release#id=spring.ebr.release,\
http://repository.springsource.com/maven/bundles/external#id=spring.ebr.external
I've tried running the framework using the three methods (server, service, client) but nothing seems to be working.
my environment is:
KARAF_BASE=/export/home/mehdi/bin/karaf
KARAF_HOME=/export/home/mehdi/bin/karaf
KARAF_ETC=/export/home/mehdi/bin/karaf/etc
KARAF_DATA=/export/home/mehdi/bin/karaf/data
JAVA_HOME=/opt/temp/jre1.7.0_13
I googled a bit and found a workaround which says to add -h 127.0.0.1 to the client script, but still nothing.

Resources