yandex-qatools / embedded-services

Embedded MongoDB/PostgreSQL for your tests
Other
39 stars 8 forks source link

how can i prefix?? #9

Open sleepphoenix opened 8 years ago

sleepphoenix commented 8 years ago

this is not working... What's the problem???

try {
postgres = new PostgresEmbeddedService("127.0.0.1", 54322, "", "", "MyDb", "/Users/minek-admin/workspace_project/spectrum/conf/database", true, 10000);
postgres.start();
}catch(Exception e) {
System.err.println("Start Error = " + e.getLocalizeMessage());
}

Result : ==================================

log4j:WARN No appenders could be found for logger (ru.yandex.qatools.embed.service.PostgresEmbeddedService).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Extract /Users/minek-admin/.embedpostgresql/postgresql-9.5.0-1-osx-binaries.zip START
......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................Extract /Users/minek-admin/.embedpostgresql/postgresql-9.5.0-1-osx-binaries.zip DONE
6월 30, 2016 2:32:48 오후 ru.yandex.qatools.embed.postgresql.PostgresProcess onAfterProcessStart
심각: Failed to read PID file (File '/Users/minek-admin/workspace_project/spectrum/conf/database/postmaster.pid' does not exist)
6월 30, 2016 2:32:48 오후 ru.yandex.qatools.embed.postgresql.PostgresProcess onAfterProcessStart
경고: Could not create database first time (0 of 3 trials)
6월 30, 2016 2:32:49 오후 ru.yandex.qatools.embed.postgresql.PostgresProcess onAfterProcessStart
경고: Could not create database first time (1 of 3 trials)
6월 30, 2016 2:32:49 오후 ru.yandex.qatools.embed.postgresql.PostgresProcess onAfterProcessStart
경고: Could not create database first time (2 of 3 trials)
6월 30, 2016 2:32:49 오후 ru.yandex.qatools.embed.postgresql.PostgresProcess onAfterProcessStart
경고: Could not create database first time (3 of 3 trials)
Start Error = null
Exception in Application constructor
Exception in thread "main" java.lang.RuntimeException: Unable to construct Application instance: class com.p3ec.spectrum.XerPrismSpectrum
    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:907)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$152(LauncherImpl.java:182)
    at com.sun.javafx.application.LauncherImpl$$Lambda$9/403424356.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$158(LauncherImpl.java:819)
    at com.sun.javafx.application.LauncherImpl$$Lambda$55/1702987968.run(Unknown Source)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$172(PlatformImpl.java:326)
    at com.sun.javafx.application.PlatformImpl$$Lambda$56/384993982.run(Unknown Source)
    at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295)
    at com.sun.javafx.application.PlatformImpl$$Lambda$58/2147451411.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294)
    at com.sun.javafx.application.PlatformImpl$$Lambda$57/1704614765.run(Unknown Source)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
smecsia commented 8 years ago

@sleepphoenix Please try to launch postgres manually and see what happens.

  1. Extract /Users/minek-admin/.embedpostgresql/postgresql-9.5.0-1-osx-binaries.zip file somewhere, for example /tmp/postgres
  2. Execute commands:
$ /tmp/postgres/bin/initdb /tmp/database
$ /tmp/postgres/bin/postgres -p 5432 -h localhost -D /tmp/database

Then post the output here.

sleepphoenix commented 8 years ago

➜ postgres jar -xvf /Users/minek-admin/.embedpostgresql/postgresql-9.5.0-1-osx-binaries.zip ➜ cd pgsql ➜ cd bin ➜ chmod 755 ./initdb ➜ chmod 755 ./postgres ➜ bin ./initdb -D ../database The files belonging to this database system will be owned by user "minek-admin". This user must also own the server process.

The database cluster will be initialized with locale "ko_KR.UTF-8". The default database encoding has accordingly been set to "UTF8". initdb: could not find suitable text search configuration for locale "ko_KR.UTF-8" The default text search configuration will be set to "simple".

Data page checksums are disabled.

fixing permissions on existing directory ../database ... ok creating subdirectories ... ok selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting dynamic shared memory implementation ... posix creating configuration files ... ok creating template1 database in ../database/base/1 ... ok initializing pg_authid ... ok initializing dependencies ... ok creating system views ... ok loading system objects' descriptions ... ok creating collations ... ok creating conversions ... ok creating dictionaries ... ok setting privileges on built-in objects ... ok creating information schema ... ok loading PL/pgSQL server-side language ... ok vacuuming database template1 ... ok copying template1 to template0 ... ok copying template1 to postgres ... ok syncing data to disk ... ok

WARNING: enabling "trust" authentication for local connections You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

./pg_ctl -D ../database -l logfile start

➜ bin ./postgres -p 54322 -h localhost -D ../database LOG: database system was shut down at 2016-07-01 11:52:19 KST LOG: MultiXact member wraparound protections are now enabled LOG: database system is ready to accept connections LOG: autovacuum launcher started

mikhailsoparin commented 6 years ago

Was there any solution for that?