Embedded Postgres cannot obtain process PID on Mac OS - macos

I'm using embedded PostgreSQL with Java 11 for integration testing. On Windows it runs fine, but on Mac it first downloads Mac OS binaries (which is expected):
Extract /Users/fubar/.embedpostgresql/postgresql-11.1-1-osx-binaries.zip START
But then it fails with the following stacktrace:
java.lang.NoSuchFieldException: handle
at java.base/java.lang.Class.getDeclaredField(Class.java:2411)
at de.flapdoodle.embed.process.runtime.Processes.windowsProcessId(Processes.java:109)
at de.flapdoodle.embed.process.runtime.Processes.access$200(Processes.java:51)
at de.flapdoodle.embed.process.runtime.Processes$PidHelper$2.getPid(Processes.java:209)
When I look into Processes source code I see that internally it uses PidHelper.LEGACY, that fails the first attempt to obtain pid via unixLikeProcessId().
Could anyone, please, give a hint why this is happenning or how to fix that?

Logs revealed the following:
Possibly failed to run initdb:
initdb: invalid locale name "en-US"
So the initdb failed, PostgeSQL instance didn't start and didn't create a postmaster.pid file, which all led to the error above.
The problem was in locale that was configured via additionalInitDbParams=[--locale=en-US, -EUTF8].

Related

ApacheDS - default service fails to start on Windows

I have been trying to start ApacheDS service on windows for a while, but failed.
I want to connect to LDAP but the ApacheDS service can't start.
I tried to check my wrapper log file and found the error -
Unable to load the Wrapper's native library 'wrapper.dll'.
However, I am running a 64-bits JVM and my computer has 64-bits as well. How can I find the wrapper.dll file of 64-bits, if it is the cause to the error?
I hope if this error gets fixed, I will be able to connect LDAP without error: [LDAP result code 52 - unavailable] Proxy operation retry failed.
Thank you for your assistance.
wrapper log file

Error while installing Weblogic in windows 10

While installing the Weblogic in windows 10 using jar file, I am getting the error message as Unable to access or modify the system registry. Select Run as Administrator when opening the Command Prompt and try again. though am executing as Administrator. From the log file I got the below error.
WARNING [1] com.oracle.cie.common.jni.WinRegistryHelper - Create Key Failed: HKEY_LOCAL_MACHINE\Software\Oracle
2017-10-06 11:19:54,972 SEVERE [1] com.oracle.cie.nextgen.launcher.PlatformHelper - createRegistry to add a value failed
2017-10-06 11:19:54,972 SEVERE [1] com.oracle.cie.nextgen.launcher.Launcher - Unable to access or modify the system registry. Select Run as Administrator when opening the Command Prompt and try again.
I understood that on making the System Registry entry HKEY_LOCAL_MACHINE\Software\Oracle, it is failing because the same entry already exists in my system as HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE. Though system registry is case-insensitive, weblogic is failing on making entries to this registry. Is there any solution to overcome this? The same issue has been already posted in different sites but not yet answered.Any help to solve this issue will be really appreciable.
I had the same problem, the next lines works to solve the problem.
Open cmd like administrator.
java -d64 -jar fmw_12.2.1.3.0_wls.jar If you don't have correctly configured the JAVA_HOME, you can replace the word "java", for the path where you have installed de JDK. Something like this:
C:\JRockit\jdk1.8.0_144\bin\java.exe

Driver info: driver.version: unknown when Switching from Selenium Standalone 2.X to 3.X

I am using Selenium Standalone Server on OS X together with facebook/php-webdriver. I am trying to run a PHP script using ChromeDriver 2.28 which is up to date. If I launch selenium-server-standalone-2.53.0, my script works perfectly. If I launch selenium-server-standalone-3.3.1, my script dies with the message Driver info: driver.version: unknown. I have tried to add -Dwebdriver.chrome.driver=chromedriver in my Java command but it does not change anything. Chrome, ChromeDriver and the selenium-server-standalone-3.3.1.jar are in the Applications directory and I launch my Java command line from that directory.
Sorry, I found the answer, it's an issue between facebook/php-webdriver and the new selenium-server-standalone-3.3.1.jar. With the previous version of selenimum server, the \Facebook\WebDriver\RemoteRemoteDriver::createBySessionID() was creating a new session when the session id passed as an argument was null whereas it now fails with the message Driver info: driver.version:unknown. I don't think it can be considered as a bug apart from the fact that the error it triggers does not help to determine its origin.

problems when install postgresql on windows server 2008

I'm trying to install PostgreSQL 9.0.1 on Windows Server 2008, but every time, there will be such error message
"Problem running post-install step. Installation may not complete
correctly. Failed to start the database server"
in the installation log, it is due to a failure in initdb.exe, error is
"The program postgres is needed by initdb, but was not found in the
same directory as D:\PostgreSQL\9.0\bin\initdb.exe, Check your
installation."
I searched such error in internet and tried the solution in this page "Installing PostgreSQL on Windows Server 2008", but no help.
After reading code of initdb, I know it is caused by the window api CreateProcess in the function pipe_read_line. the calling of CreateProcess returned -5 (access denied). it is because initdb was executed in a subprocess invoked in the functiion CreateRestrictedProcess.
I know it is due to privilege setting, I ran gpedit.msc to add users group (even everyone) into almost all privilege policy, but the error was still there.
I also assigned full control rights of the install target folder to everyone, no help!
I also tried postgresql 9.6.2, the error was still there :-)
from the code, I know if there is the environment variable PG_RESTRICT_EXEC with value 1, initdb will not executed in a restricted process. so before run initdb.exe, I set an environment PG_RESTRICT_EXEC=1 in command prompt, then run initdb.exe. this time such error was gone!!
So I wonder how to change the os settings to allow the installation running without error!

Starting Neo4j failed: Address localhost:7474 is already in use, cannot bind to it on Mac OSX

I'm trying to install a neo4j server on my localhost (mac osx - El-capitan) and i'm getting this error -
Starting Neo4j failed: Address localhost:7474 is already in use,
cannot bind to it.
I tried to stop the port from running and then install it throw the neo4j install app, but it still give this error
When i try to start the neo4j server it gives me this error :
./usr/local/bin/neo4j: line 229: [: too many arguments
Try to kill your java processes :
sudo killall -9 java
Then restart your neo4j server :
./bin/neo4j restart
Same problem using Win 10, I had to turn off https-support
in neo4j-server.properties, i.e.
\# Turn https-support on/off
org.neo4j.server.webserver.https.enabled=false
You don’t need to install anything. Just download the linux tar.gz package, uncompress it and use the terminal to run the command ‘./bin/neo4j console’ to run it in console mode. You can start it in background too but based on your question, it sounds like this is just a dev machine.

Resources