You should be able to, as the user running ofbiz, type the following.  The
IP must match what is in the  file: entityengine.xml

psql -h IP_OF_DB_HOST -U ofbiz -d ofbiz
[ENTER PASSWORD]  ("ofbiz")

If the above doesn't work, then you may need to tweak the postgres
file: pg_hba.conf, and perform a postgresql "reload" (or restart):
 Examples:

host    all             all             0.0.0.0/0               md5
host    all             all             127.0.0.1/32            md5
local   all             all                                     peer

Depend on that you have locally setup.  For your entityengine.xml, use

       <group-map group-name="org.ofbiz" datasource-name="localpostnew"/>

[localpostnew is superior]

Under the localpostnew section, make sure you have:

        <inline-jdbc
                jdbc-driver="org.postgresql.Driver"
                jdbc-uri="jdbc:postgresql://IP_OF_DB_HOST/ofbiz"
                jdbc-username="ofbiz"
                jdbc-password="ofbiz"


Also, to have ofbiz re-init the database, it first has to exist:

postgres> CREATE DATABASE ofbiz;

Remember, use the "psql" command above to test whether ofbiz can properly
login as he user "dan".  A better test:

dan> psql -h IP_OF_DB_HOST -U ofbiz -d ofbiz -c "CREATE DATABASE ofbiz;"
[ENTER PASSWORD]  ("ofbiz")

Good luck

On Sun, Mar 12, 2017 at 7:23 PM, <stim...@comcast.net> wrote:

> Hi,
>
> ...logged in to psql as user postgres...
>  psql (9.4.9)Type "help" for help. postgres=# \du
>    List of roles Role name |                   Attributes
>  | Member of 
> -----------+------------------------------------------------+-----------
> ofbiz     | Create role, Create DB, Replication            | {} dan       |
> Create role, Create DB, Replication            | {} postgres  | Superuser,
> Create role, Create DB, Replication | {}
> Earlier I had fewer permissions, errors changed to transaction errors
> after adding more permissions/roles to user ofbiz in PostgreSQL. I'm
> wondering, since I'm running ofbiz from my regular system account user
> (user ofbiz exists only in PostgreSQL and is not a system account), yet
> seeing failures in file reads from my regular user (ofbiz is located in
> ~dan/ofbiz/), if perhaps some aspect of the SQL query is somehow unable to
> read files because of an suid within ofbiz? Ofbiz is run in "~dan/ofbiz/"
> as user dan via "./gradlew loadDefault"...I would think that any file reads
> would be as user dan, but apparently this isn't true. Example failure:
> 2017-03-12 19:07:26,728 |main                 |EntityDataLoadContainer
>    |I| [loadData]: Error loading XML Resource "file:/home/dan/ofbiz/
> framework/security/data/SecurityPermissionSeedData.xml"; Error was: A
> transaction error occurred reading data
> Basically user "dan" running gradlew cannot read his own file verified to
> be accessible in 
> /home/dan/ofbiz/framework/security/data/SecurityPermissionSeedData.xml
> as if he isn't really user dan. Is gradlew performing some sort of sudo and
> reading files as someone other than the user that starts gradlew?
>
> Thanks!
>
> ----- Original Message -----From: Mike <mz4whee...@gmail.com>To: user <
> user@ofbiz.apache.org>Sent: Mon, 13 Mar 2017 01:55:09 -0000 (UTC)Subject:
> Re: Current PostgreSQL Instructions
>
> What is your output using "\du ofbiz"
>
> postgres=# \du ofbiz List of roles Role name | Attributes | Member
> of-----------+------------+----------- ofbiz | Create DB | {}
>
> On Sun, Mar 12, 2017 at 2:57 PM, <stim...@comcast.net> wrote:
>
> > Hi,>> I'm just trying to evaluate ofbiz for some simple POS needs (which
> is of> course not really simple). I see there is a lot of ofbiz
> development> activity, and thus a lot of documents which are actually out
> of date.> Sometimes for example the instructions use "ant" directly and do
> not know> of the gradlew command. In entityengine.xml information I
> sometimes see> PostgreSQL info which refers to "org.ofbiz", but this is out
> of date and is> actually "org.apache.ofbiz". The little things like that
> are derailing me.>> To make a long story short, I have PostgreSQL running
> on Fedora, and> apache-ofbiz-16.11.01 working with Derby, but need to
> change to PostgreSQL> (and PostgreSQL is up and running with both my
> regular user and with> "ofbiz/ofbiz" name/pass), and getting connection
> refused (I can manually> run commands such as createdb and dropdb without
> issue). Basically there is> some small detail I'm missing and am wondering
> if there is current> documentation on setting up ofbiz with PostgreSQL
> which I'm missing?>> I really like this documentation...but unfortunately
> it is wrong (out of> date):> https://cwiki.apache.org/
> confluence/display/OFBIZ/Apache+OFBiz+Technical+>
> Production+Setup+Guide>> This in turn points out a lot of facts through
> here:> https://cwiki.apache.org/confluence/display/OFBIZ/>
> Entity+Engine+Configuration+Guide>> ...but I'm more interested in getting
> it working and that information> appears to only be for people who already
> understand ofbiz setup (there are> a lot of facts there and no example
> which works with 16.11.01). I was under> the impression that if PostgreSQL
> were set up and the ofbiz name/pass is> able to create tables then the
> "gradlew loadDefault" would be able to load> sample data into PostgreSQL
> without manually creating each table. Am I> incorrect on this? Do I need to
> manually create tables? I can attach my> entityengine.xml edits, but wanted
> to know first if there are explicit> instructions somewhere for the current
> 16.11.01 (I am not interested in> customization and developing new apps, I
> just want to see the minimal> sample data using PostgreSQL).>> Thanks!
>

Reply via email to