Installation on CentOS 5.6 with PostgreSQL

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
29 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Installation on CentOS 5.6 with PostgreSQL

champagroup
I have been working on an installation of Ofbiz on a dedicated CentOS server using PostgreSQL, but I have run into some problems and I don't know where I've gone wrong. I followed the instructions posted here:

http://www.toivari.com/devblog/2010/06/16/configure-ofbiz-to-use-postgresql-server/

But, it's when I get down to the end, running ant run-install that I seem to have problems. I usually get this message:

Buildfile: build.xml

BUILD FAILED
/etc/ofbiz/build.xml:25: The following error occurred while executing this line:
/etc/ofbiz/macros.xml:21: Class org.apache.tools.ant.taskdefs.ConditionTask doesn't support the nested "antversion" element.

Total time: 1 second


Does anyone have an idea of what's happening here? I have searched the Web, trying to find a good answer to this issue, but it hasn't turned up much, and what I have found has not been very helpful. There has been all of this talk about a SUN SDK, but I really don't understand what they are referring to. I have JDK 1.6 installed, as it was required ant. Please, help me out.

Regards,

Stephen
Reply | Threaded
Open this post in threaded view
|

Re: Installation on CentOS 5.6 with PostgreSQL

Matt Warnock
Check that you are running "./ant run-install", not "ant run-install" as
there is often a difference between the ant version shipped with ofbiz
and the ant version installed on the system.  OFBiz has its own version
of ant, which is the one you should be using.


On Thu, 2011-11-10 at 08:58 -0800, champagroup wrote:

> I have been working on an installation of Ofbiz on a dedicated CentOS server
> using PostgreSQL, but I have run into some problems and I don't know where
> I've gone wrong. I followed the instructions posted here:
>
> http://www.toivari.com/devblog/2010/06/16/configure-ofbiz-to-use-postgresql-server/
>
> But, it's when I get down to the end, running /ant run-install/ that I seem
> to have problems. I usually get this message:
>
> /Buildfile: build.xml
>
> BUILD FAILED
> /etc/ofbiz/build.xml:25: The following error occurred while executing this
> line:
> /etc/ofbiz/macros.xml:21: Class org.apache.tools.ant.taskdefs.ConditionTask
> doesn't support the nested "antversion" element.
>
> Total time: 1 second/
>
> Does anyone have an idea of what's happening here? I have searched the Web,
> trying to find a good answer to this issue, but it hasn't turned up much,
> and what I have found has not been very helpful. There has been all of this
> talk about a SUN SDK, but I really don't understand what they are referring
> to. I have JDK 1.6 installed, as it was required ant. Please, help me out.
>
> Regards,
>
> Stephen
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Installation-on-CentOS-5-6-with-PostgreSQL-tp4024345p4024345.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.

--
Matt Warnock <[hidden email]>
RidgeCrest Herbals, Inc.

Reply | Threaded
Open this post in threaded view
|

Re: Installation on CentOS 5.6 with PostgreSQL

champagroup
Okay. It's funny but I don't see it written that way in the various instructions I came across. I tried it though, and I was able to get it to work. I had to modify permissions for ant, but it did build successfully. Thanks. Now I am experiencing issues with getting Ofbiz started. When I run ./startofbiz.sh, after a while it starts throwing out errors. I am seeing

2011-11-10 15:11:45,411 (org.ofbiz.service.job.JobPoller@de0a6c) [    TransactionUtil.java:351:INFO ] [TransactionUtil.rollback] transaction rolled back
2011-11-10 15:11:45,411 (org.ofbiz.service.job.JobPoller@de0a6c) [    TransactionUtil.java:276:WARN ] [TransactionUtil.commit] Not committing transaction, status is No Transaction (6)
2011-11-10 15:11:45,426 (org.ofbiz.service.job.JobPoller@de0a6c) [   GenericDelegator.java:1295:ERROR]
---- exception report ----------------------------------------------------------
Failure in storeByCondition operation for entity [JobSandbox]: org.ofbiz.entity.GenericDataSourceException: Generic Entity Exception occured in updateByCondition (Unable to esablish a connection with the database. (Unable to acquire a new connection from the pool)). Rolling back transaction.
Exception: org.ofbiz.entity.GenericDataSourceException
Message: Generic Entity Exception occured in updateByCondition (Unable to esablish a connection with the database. (Unable to acquire a new connection from the pool))
---- cause ---------------------------------------------------------------------
Exception: org.ofbiz.entity.GenericDataSourceException
Message: Unable to esablish a connection with the database. (Unable to acquire a new connection from the pool)
---- cause ---------------------------------------------------------------------
Exception: java.sql.SQLException
Message: Unable to acquire a new connection from the pool
---- cause ---------------------------------------------------------------------
Exception: org.postgresql.util.PSQLException
Message: FATAL: Ident authentication failed for user "ofbiz"


I take it that there is something wrong with authentication, but how do I make sure to set that up properly?
Reply | Threaded
Open this post in threaded view
|

Re: Installation on CentOS 5.6 with PostgreSQL

Matt Warnock
Yeah, i fell into that trap myself once, which is why I wanted to
respond right away.  Hate to see others in that situation.  It should be
documented more clearly, IMHO.

Next thing is to make sure you can login to your ofbiz database using
psql -h <hostname> -U ofbiz <ofbizdb>
where: <hostname> is the host where the database is (can be localhost);
ofbiz is the username that has been created in postgres using
createuser; and <ofbizdb> is the database name that has been created
with createdb and is owned by user ofbiz.  The database can/should be
empty, but it must exist and the ofbiz user must be able to connect to
it using the password you specify in the entity engine config file.  

If you don't specify a host (-h localhost), psql will use Unix sockets,
not TCP/IP, which is what ofbiz needs.  By default, postgres may not
allow TCP/IP connections, even from localhost, so you may need to
edit /etc/postgresql/8.4/main/pg_hba.conf as I'm not sure what CentOS
uses by default, I'm on Debian.

Once you can login to the DB using the ofbiz username and password, then
try "./ant run-install" again, and it should work.



On Thu, 2011-11-10 at 13:49 -0800, champagroup wrote:

> Okay. It's funny but I don't see it written that way in the various
> instructions I came across. I tried it though, and I was able to get it to
> work. I had to modify permissions for ant, but it did build successfully.
> Thanks. Now I am experiencing issues with getting Ofbiz started. When I run
> ./startofbiz.sh, after a while it starts throwing out errors. I am seeing
>
> /2011-11-10 15:11:45,411 (org.ofbiz.service.job.JobPoller@de0a6c) [  
> TransactionUtil.java:351:INFO ] [TransactionUtil.rollback] transaction
> rolled back
> 2011-11-10 15:11:45,411 (org.ofbiz.service.job.JobPoller@de0a6c) [  
> TransactionUtil.java:276:WARN ] [TransactionUtil.commit] Not committing
> transaction, status is No Transaction (6)
> 2011-11-10 15:11:45,426 (org.ofbiz.service.job.JobPoller@de0a6c) [  
> GenericDelegator.java:1295:ERROR]
> ---- exception report
> ----------------------------------------------------------
> Failure in storeByCondition operation for entity [JobSandbox]:
> org.ofbiz.entity.GenericDataSourceException: Generic Entity Exception
> occured in updateByCondition (Unable to esablish a connection with the
> database. (Unable to acquire a new connection from the pool)). Rolling back
> transaction.
> Exception: org.ofbiz.entity.GenericDataSourceException
> Message: Generic Entity Exception occured in updateByCondition (Unable to
> esablish a connection with the database. (Unable to acquire a new connection
> from the pool))
> ---- cause
> ---------------------------------------------------------------------
> Exception: org.ofbiz.entity.GenericDataSourceException
> Message: Unable to esablish a connection with the database. (Unable to
> acquire a new connection from the pool)
> ---- cause
> ---------------------------------------------------------------------
> Exception: java.sql.SQLException
> Message: Unable to acquire a new connection from the pool
> ---- cause
> ---------------------------------------------------------------------
> Exception: org.postgresql.util.PSQLException
> Message: FATAL: Ident authentication failed for user "ofbiz"/
>
> I take it that there is something wrong with authentication, but how do I
> make sure to set that up properly?
>
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Installation-on-CentOS-5-6-with-PostgreSQL-tp4024345p4029536.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.

--
Matt Warnock <[hidden email]>
RidgeCrest Herbals, Inc.

Reply | Threaded
Open this post in threaded view
|

Re: Installation on CentOS 5.6 with PostgreSQL

champagroup
Well, it doesn't seem that I can. I ran

psql -h ofbiz -U ofbiz ofbiz

It seems that everything is ofbiz. Hmm. I don't know if that could be a problem of not. Thoughts?
Reply | Threaded
Open this post in threaded view
|

Re: Installation on CentOS 5.6 with PostgreSQL

Mike Z
In reply to this post by Matt Warnock
I use this script to create the postgres databases:  I seem to recall
that I had to do this prior to running ant.

postgres@db02:~$ cat recreate_ofbis.sh
#! /bin/bash

dropdb ofbiztenant; dropdb ofbizolap; dropdb ofbiz

for db in ofbiz ofbizolap ofbiztenant; do
    cmd="
CREATE DATABASE $db
 WITH OWNER = ofbiz
 ENCODING = 'UTF8'
 TABLESPACE = pg_default
 LC_COLLATE = 'en_US.UTF-8'
 LC_CTYPE = 'en_US.UTF-8'
 CONNECTION LIMIT = -1;
"
    psql -c "$cmd" -d postgres
done


On Thu, Nov 10, 2011 at 2:20 PM, Matt Warnock
<[hidden email]> wrote:

> Yeah, i fell into that trap myself once, which is why I wanted to
> respond right away.  Hate to see others in that situation.  It should be
> documented more clearly, IMHO.
>
> Next thing is to make sure you can login to your ofbiz database using
> psql -h <hostname> -U ofbiz <ofbizdb>
> where: <hostname> is the host where the database is (can be localhost);
> ofbiz is the username that has been created in postgres using
> createuser; and <ofbizdb> is the database name that has been created
> with createdb and is owned by user ofbiz.  The database can/should be
> empty, but it must exist and the ofbiz user must be able to connect to
> it using the password you specify in the entity engine config file.
>
> If you don't specify a host (-h localhost), psql will use Unix sockets,
> not TCP/IP, which is what ofbiz needs.  By default, postgres may not
> allow TCP/IP connections, even from localhost, so you may need to
> edit /etc/postgresql/8.4/main/pg_hba.conf as I'm not sure what CentOS
> uses by default, I'm on Debian.
>
> Once you can login to the DB using the ofbiz username and password, then
> try "./ant run-install" again, and it should work.
>
>
>
> On Thu, 2011-11-10 at 13:49 -0800, champagroup wrote:
>> Okay. It's funny but I don't see it written that way in the various
>> instructions I came across. I tried it though, and I was able to get it to
>> work. I had to modify permissions for ant, but it did build successfully.
>> Thanks. Now I am experiencing issues with getting Ofbiz started. When I run
>> ./startofbiz.sh, after a while it starts throwing out errors. I am seeing
>>
>> /2011-11-10 15:11:45,411 (org.ofbiz.service.job.JobPoller@de0a6c) [
>> TransactionUtil.java:351:INFO ] [TransactionUtil.rollback] transaction
>> rolled back
>> 2011-11-10 15:11:45,411 (org.ofbiz.service.job.JobPoller@de0a6c) [
>> TransactionUtil.java:276:WARN ] [TransactionUtil.commit] Not committing
>> transaction, status is No Transaction (6)
>> 2011-11-10 15:11:45,426 (org.ofbiz.service.job.JobPoller@de0a6c) [
>> GenericDelegator.java:1295:ERROR]
>> ---- exception report
>> ----------------------------------------------------------
>> Failure in storeByCondition operation for entity [JobSandbox]:
>> org.ofbiz.entity.GenericDataSourceException: Generic Entity Exception
>> occured in updateByCondition (Unable to esablish a connection with the
>> database. (Unable to acquire a new connection from the pool)). Rolling back
>> transaction.
>> Exception: org.ofbiz.entity.GenericDataSourceException
>> Message: Generic Entity Exception occured in updateByCondition (Unable to
>> esablish a connection with the database. (Unable to acquire a new connection
>> from the pool))
>> ---- cause
>> ---------------------------------------------------------------------
>> Exception: org.ofbiz.entity.GenericDataSourceException
>> Message: Unable to esablish a connection with the database. (Unable to
>> acquire a new connection from the pool)
>> ---- cause
>> ---------------------------------------------------------------------
>> Exception: java.sql.SQLException
>> Message: Unable to acquire a new connection from the pool
>> ---- cause
>> ---------------------------------------------------------------------
>> Exception: org.postgresql.util.PSQLException
>> Message: FATAL: Ident authentication failed for user "ofbiz"/
>>
>> I take it that there is something wrong with authentication, but how do I
>> make sure to set that up properly?
>>
>>
>> --
>> View this message in context: http://ofbiz.135035.n4.nabble.com/Installation-on-CentOS-5-6-with-PostgreSQL-tp4024345p4029536.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
> --
> Matt Warnock <[hidden email]>
> RidgeCrest Herbals, Inc.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Installation on CentOS 5.6 with PostgreSQL

Matt Warnock
In reply to this post by champagroup
That assumes that the postgresql server is named "ofbiz" as well (which
seems weird, I'd expect sql or dbms or something).  It also assumes that
postgres is configured to listen on its external host interfaces, and to
respond to queries from the host where ofbiz is installed, neither of
which is default behavior for postgresql.

Default behavior for postgres is that it only listens on localhost
(127.0.0.*).  So if "ofbiz" resolves to a real public or private host IP
address (not localhost or 127.0.0.1), then postgres isn't listening.
You can test with the numeric addresses to see if that is the issue.  If
you need to open postgres to listen on a non-localhost interface, change
the "listen" line in /etc/postgresql/8.4/main/postgresql.conf.

Is the postgresql server on the same server as the ofbiz install (i.e.
localhost)?  If so, you don't need to reconfigure postgresql, just
change "-h ofbiz" to "-h localhost" in the line you gave, and it will
probably just work, assuming that the ofbiz user and database exist.

On Thu, 2011-11-10 at 15:26 -0800, champagroup wrote:

> Well, it doesn't seem that I can. I ran
>
> psql -h ofbiz -U ofbiz ofbiz
>
> It seems that everything is ofbiz. Hmm. I don't know if that could be a
> problem of not. Thoughts?
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Installation-on-CentOS-5-6-with-PostgreSQL-tp4024345p4029874.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.

--
Matt Warnock <[hidden email]>
RidgeCrest Herbals, Inc.

Reply | Threaded
Open this post in threaded view
|

Re: Installation on CentOS 5.6 with PostgreSQL

Matt Warnock
In reply to this post by Mike Z
Are the OLAP and tenant databases used at all if you aren't running
multi-tenant?  Running "./ant run-install" didn't seem to create any
tables there when I tested it a year or so ago back.

On Thu, 2011-11-10 at 15:58 -0800, Mike wrote:

> I use this script to create the postgres databases:  I seem to recall
> that I had to do this prior to running ant.
>
> postgres@db02:~$ cat recreate_ofbis.sh
> #! /bin/bash
>
> dropdb ofbiztenant; dropdb ofbizolap; dropdb ofbiz
>
> for db in ofbiz ofbizolap ofbiztenant; do
>     cmd="
> CREATE DATABASE $db
>  WITH OWNER = ofbiz
>  ENCODING = 'UTF8'
>  TABLESPACE = pg_default
>  LC_COLLATE = 'en_US.UTF-8'
>  LC_CTYPE = 'en_US.UTF-8'
>  CONNECTION LIMIT = -1;
> "
>     psql -c "$cmd" -d postgres
> done
>
>
> On Thu, Nov 10, 2011 at 2:20 PM, Matt Warnock
> <[hidden email]> wrote:
> > Yeah, i fell into that trap myself once, which is why I wanted to
> > respond right away.  Hate to see others in that situation.  It should be
> > documented more clearly, IMHO.
> >
> > Next thing is to make sure you can login to your ofbiz database using
> > psql -h <hostname> -U ofbiz <ofbizdb>
> > where: <hostname> is the host where the database is (can be localhost);
> > ofbiz is the username that has been created in postgres using
> > createuser; and <ofbizdb> is the database name that has been created
> > with createdb and is owned by user ofbiz.  The database can/should be
> > empty, but it must exist and the ofbiz user must be able to connect to
> > it using the password you specify in the entity engine config file.
> >
> > If you don't specify a host (-h localhost), psql will use Unix sockets,
> > not TCP/IP, which is what ofbiz needs.  By default, postgres may not
> > allow TCP/IP connections, even from localhost, so you may need to
> > edit /etc/postgresql/8.4/main/pg_hba.conf as I'm not sure what CentOS
> > uses by default, I'm on Debian.
> >
> > Once you can login to the DB using the ofbiz username and password, then
> > try "./ant run-install" again, and it should work.
> >
> >
> >
> > On Thu, 2011-11-10 at 13:49 -0800, champagroup wrote:
> >> Okay. It's funny but I don't see it written that way in the various
> >> instructions I came across. I tried it though, and I was able to get it to
> >> work. I had to modify permissions for ant, but it did build successfully.
> >> Thanks. Now I am experiencing issues with getting Ofbiz started. When I run
> >> ./startofbiz.sh, after a while it starts throwing out errors. I am seeing
> >>
> >> /2011-11-10 15:11:45,411 (org.ofbiz.service.job.JobPoller@de0a6c) [
> >> TransactionUtil.java:351:INFO ] [TransactionUtil.rollback] transaction
> >> rolled back
> >> 2011-11-10 15:11:45,411 (org.ofbiz.service.job.JobPoller@de0a6c) [
> >> TransactionUtil.java:276:WARN ] [TransactionUtil.commit] Not committing
> >> transaction, status is No Transaction (6)
> >> 2011-11-10 15:11:45,426 (org.ofbiz.service.job.JobPoller@de0a6c) [
> >> GenericDelegator.java:1295:ERROR]
> >> ---- exception report
> >> ----------------------------------------------------------
> >> Failure in storeByCondition operation for entity [JobSandbox]:
> >> org.ofbiz.entity.GenericDataSourceException: Generic Entity Exception
> >> occured in updateByCondition (Unable to esablish a connection with the
> >> database. (Unable to acquire a new connection from the pool)). Rolling back
> >> transaction.
> >> Exception: org.ofbiz.entity.GenericDataSourceException
> >> Message: Generic Entity Exception occured in updateByCondition (Unable to
> >> esablish a connection with the database. (Unable to acquire a new connection
> >> from the pool))
> >> ---- cause
> >> ---------------------------------------------------------------------
> >> Exception: org.ofbiz.entity.GenericDataSourceException
> >> Message: Unable to esablish a connection with the database. (Unable to
> >> acquire a new connection from the pool)
> >> ---- cause
> >> ---------------------------------------------------------------------
> >> Exception: java.sql.SQLException
> >> Message: Unable to acquire a new connection from the pool
> >> ---- cause
> >> ---------------------------------------------------------------------
> >> Exception: org.postgresql.util.PSQLException
> >> Message: FATAL: Ident authentication failed for user "ofbiz"/
> >>
> >> I take it that there is something wrong with authentication, but how do I
> >> make sure to set that up properly?
> >>
> >>
> >> --
> >> View this message in context: http://ofbiz.135035.n4.nabble.com/Installation-on-CentOS-5-6-with-PostgreSQL-tp4024345p4029536.html
> >> Sent from the OFBiz - User mailing list archive at Nabble.com.
> >
> > --
> > Matt Warnock <[hidden email]>
> > RidgeCrest Herbals, Inc.
> >
> >

--
Matt Warnock <[hidden email]>
RidgeCrest Herbals, Inc.

Reply | Threaded
Open this post in threaded view
|

Re: Installation on CentOS 5.6 with PostgreSQL

Mike Z
In reply to this post by Matt Warnock
It's just an example. I blow away my databases frequently [grin].
Also, I run postgres on a completely separate, dedicated server.

This particular script is run under the user "postgres".  I create all
three types of databases even though I don't yet use multi-tenant yet.


On Thu, Nov 10, 2011 at 4:10 PM, Matt Warnock
<[hidden email]> wrote:

> That assumes that the postgresql server is named "ofbiz" as well (which
> seems weird, I'd expect sql or dbms or something).  It also assumes that
> postgres is configured to listen on its external host interfaces, and to
> respond to queries from the host where ofbiz is installed, neither of
> which is default behavior for postgresql.
>
> Default behavior for postgres is that it only listens on localhost
> (127.0.0.*).  So if "ofbiz" resolves to a real public or private host IP
> address (not localhost or 127.0.0.1), then postgres isn't listening.
> You can test with the numeric addresses to see if that is the issue.  If
> you need to open postgres to listen on a non-localhost interface, change
> the "listen" line in /etc/postgresql/8.4/main/postgresql.conf.
>
> Is the postgresql server on the same server as the ofbiz install (i.e.
> localhost)?  If so, you don't need to reconfigure postgresql, just
> change "-h ofbiz" to "-h localhost" in the line you gave, and it will
> probably just work, assuming that the ofbiz user and database exist.
>
> On Thu, 2011-11-10 at 15:26 -0800, champagroup wrote:
>> Well, it doesn't seem that I can. I ran
>>
>> psql -h ofbiz -U ofbiz ofbiz
>>
>> It seems that everything is ofbiz. Hmm. I don't know if that could be a
>> problem of not. Thoughts?
>>
>> --
>> View this message in context: http://ofbiz.135035.n4.nabble.com/Installation-on-CentOS-5-6-with-PostgreSQL-tp4024345p4029874.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
> --
> Matt Warnock <[hidden email]>
> RidgeCrest Herbals, Inc.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Installation on CentOS 5.6 with PostgreSQL

Jacques Le Roux
Administrator
In reply to this post by Matt Warnock
From: "Matt Warnock" <[hidden email]>
> Yeah, i fell into that trap myself once, which is why I wanted to
> respond right away.  Hate to see others in that situation.  It should be
> documented more clearly, IMHO.

You could submit a change to the README. Also we could update it (memory used)

Jacques
Reply | Threaded
Open this post in threaded view
|

Re: Installation on CentOS 5.6 with PostgreSQL

Matt Warnock
On Fri, 2011-11-11 at 07:35 +0100, Jacques Le Roux wrote:
> From: "Matt Warnock" <[hidden email]>
> You could submit a change to the README. Also we could update it (memory used)

Good idea.  Here is a proposed patch for the README:

15c15,23
< Once that is properly setup just run the executable jar file
---
> OFBiz uses the java build tool "ant".  A copy of "ant" is included
> with OFBiz, and the OFBiz codebase is designed for use with the
> included version.  Using a different version of ant (such as the one
> installed with your java JDK) may produce different results.  The
> above commands (note the use of "./ant", not just "ant" in linux) will
> use the local OFBiz version. Running the "./ant -p" command in this
> directory will show the many build targets available for OFBiz.
>
> Once OFBiz is properly setup just run the executable jar file
20a29,32
> or easier still, using ant, just use the following command:
> linux:    ./ant run
> windows:  ant run
>
22c34,45
< operating systems, namely startofbiz.bat and startofbiz.sh.
---

> operating systems, namely startofbiz.bat and startofbiz.sh.  
>
> These scripts will start OFBiz in a console window, with a lot of
> logging output to the screen.  This output is also saved in the log
> file at runtime/logs/ofbiz.log.  To halt the server while it is
> running, press Ctrl-C.
>
> For scripts to run OFBiz as a background process, or to start, stop,
> restart, or show status of an OFBiz background process, see:
> rc.ofbiz (for CentOS, Redhat, and similar systems)
> rc.ofbiz.for.debian
> rc.ofbiz.for.ubuntu


I have not changed the memory line, as I don't know what the current
default preference is but I assume it may be in the current build.xml
target for ./ant run?

Also while we're at it, all of the rc.ofbiz* files should have the
executable bit set, and at least the debian and ubuntu versions of
should have the first line changed to #!/bin/bash, as they won't run
with the default /bin/sh (which is dash).  

Finally, we should probably provide instructions to add a symlink
at /usr/local/sbin/ofbiz (or /etc/init.d/ofbiz) to whichever rc.ofbiz*
is appropriate, and you would have a working server daemon similar to
others on the system.  However, when I tried running those scripts from
a server (through ssh) and then logged out, IIRC, the daemon died.  I
seem to recall having to add a "nohup" before the $JAVA command to make
them work.

--
Matt Warnock <[hidden email]>
RidgeCrest Herbals, Inc.

Reply | Threaded
Open this post in threaded view
|

Re: Installation on CentOS 5.6 with PostgreSQL

Jacques Le Roux
Administrator
Hi Matt,

I appreciate your help but, mmm... that's not really what we call a patch ;o)

Please follow
https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices#OFBizContributorsBestPractices-HowtoSendinYourContributions%28orhowtocreateandapplypatches%29

Thanks

Jacques

From: "Matt Warnock" <[hidden email]>

> On Fri, 2011-11-11 at 07:35 +0100, Jacques Le Roux wrote:
>> From: "Matt Warnock" <[hidden email]>
>> You could submit a change to the README. Also we could update it (memory used)
>
> Good idea.  Here is a proposed patch for the README:
>
> 15c15,23
> < Once that is properly setup just run the executable jar file
> ---
>> OFBiz uses the java build tool "ant".  A copy of "ant" is included
>> with OFBiz, and the OFBiz codebase is designed for use with the
>> included version.  Using a different version of ant (such as the one
>> installed with your java JDK) may produce different results.  The
>> above commands (note the use of "./ant", not just "ant" in linux) will
>> use the local OFBiz version. Running the "./ant -p" command in this
>> directory will show the many build targets available for OFBiz.
>>
>> Once OFBiz is properly setup just run the executable jar file
> 20a29,32
>> or easier still, using ant, just use the following command:
>> linux:    ./ant run
>> windows:  ant run
>>
> 22c34,45
> < operating systems, namely startofbiz.bat and startofbiz.sh.
> ---
>> operating systems, namely startofbiz.bat and startofbiz.sh.
>>
>> These scripts will start OFBiz in a console window, with a lot of
>> logging output to the screen.  This output is also saved in the log
>> file at runtime/logs/ofbiz.log.  To halt the server while it is
>> running, press Ctrl-C.
>>
>> For scripts to run OFBiz as a background process, or to start, stop,
>> restart, or show status of an OFBiz background process, see:
>> rc.ofbiz (for CentOS, Redhat, and similar systems)
>> rc.ofbiz.for.debian
>> rc.ofbiz.for.ubuntu
>
>
> I have not changed the memory line, as I don't know what the current
> default preference is but I assume it may be in the current build.xml
> target for ./ant run?
>
> Also while we're at it, all of the rc.ofbiz* files should have the
> executable bit set, and at least the debian and ubuntu versions of
> should have the first line changed to #!/bin/bash, as they won't run
> with the default /bin/sh (which is dash).
>
> Finally, we should probably provide instructions to add a symlink
> at /usr/local/sbin/ofbiz (or /etc/init.d/ofbiz) to whichever rc.ofbiz*
> is appropriate, and you would have a working server daemon similar to
> others on the system.  However, when I tried running those scripts from
> a server (through ssh) and then logged out, IIRC, the daemon died.  I
> seem to recall having to add a "nohup" before the $JAVA command to make
> them work.
>
> --
> Matt Warnock <[hidden email]>
> RidgeCrest Herbals, Inc.
>
Reply | Threaded
Open this post in threaded view
|

Re: Installation on CentOS 5.6 with PostgreSQL

champagroup
In reply to this post by Matt Warnock
Sorry for the long break between responses.

Postgresql and ofbiz are on the same machine. I ran

psql -h localhost -U ofbiz ofbiz

But, I still get psql: FATAL:  Ident authentication failed for user "ofbiz".
I know there is a user ofbiz that I created. One thing that I noticed is that this command doesn't include the password for user ofbiz. Would that be necessary since I created the user with one?
Reply | Threaded
Open this post in threaded view
|

Re: Installation on CentOS 5.6 with PostgreSQL

Colin Rooney-2
Did you make an entry in the pg_hba.conf file to allow ofbiz to access the DB?
For **testing** I normally put a
host all all 127.0.0.1/32 trust
line to ensure I have full access.

Colin
On 14 November 2011 15:49, champagroup
<[hidden email]> wrote:

> Sorry for the long break between responses.
>
> Postgresql and ofbiz are on the same machine. I ran
>
> /psql -h localhost -U ofbiz ofbiz /
>
> But, I still get psql: FATAL:  Ident authentication failed for user "ofbiz".
> I know there is a user ofbiz that I created. One thing that I noticed is
> that this command doesn't include the password for user ofbiz. Would that be
> necessary since I created the user with one?
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Installation-on-CentOS-5-6-with-PostgreSQL-tp4024345p4039872.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Installation on CentOS 5.6 with PostgreSQL

Mike Z
In reply to this post by champagroup
Have you tried:

ALTER USER ofbiz WITH PASSWORD 'ofbiz';

http://www.postgresql.org/docs/9.0/static/user-manag.html

You'll also have to 'GRANT ALL' to allow the ofbiz user the ability to
create tables.

On Mon, Nov 14, 2011 at 7:49 AM, champagroup
<[hidden email]> wrote:

> Sorry for the long break between responses.
>
> Postgresql and ofbiz are on the same machine. I ran
>
> /psql -h localhost -U ofbiz ofbiz /
>
> But, I still get psql: FATAL:  Ident authentication failed for user "ofbiz".
> I know there is a user ofbiz that I created. One thing that I noticed is
> that this command doesn't include the password for user ofbiz. Would that be
> necessary since I created the user with one?
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Installation-on-CentOS-5-6-with-PostgreSQL-tp4024345p4039872.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Installation on CentOS 5.6 with PostgreSQL

Mike Z
In reply to this post by champagroup
Here is script that I used to use when I was flopping back/forth
between mysql and postgres.

#! /bin/bash

HOST=10.2.10.101
DB=ofbiz
USER=ofbiz
PASS=ofbiz
TYPE="psql"
#TYPE="mysql"

if [ "$TYPE" == "mysql" ]; then
    mysql -h $HOST -u $USER -p$PASS -A -D $DB
else
    export PGPASSWORD=$PASS
    psql -h $HOST -U $USER -d $DB
fi

Postgres is annoying because you need to use an environment variable
(PGPASSWORD) in order to log in on the command line.

In your example, HOST would be set to localhost or 127.0.0.1.

On Mon, Nov 14, 2011 at 7:49 AM, champagroup
<[hidden email]> wrote:

> Sorry for the long break between responses.
>
> Postgresql and ofbiz are on the same machine. I ran
>
> /psql -h localhost -U ofbiz ofbiz /
>
> But, I still get psql: FATAL:  Ident authentication failed for user "ofbiz".
> I know there is a user ofbiz that I created. One thing that I noticed is
> that this command doesn't include the password for user ofbiz. Would that be
> necessary since I created the user with one?
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Installation-on-CentOS-5-6-with-PostgreSQL-tp4024345p4039872.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Installation on CentOS 5.6 with PostgreSQL

champagroup
In reply to this post by Colin Rooney-2
I did perform GRANT ALL for user ofbiz on the three db's I created, as for the pg_hba.conf file, this is what's in it

# TYPE  DATABASE        USER            CIDR-ADDRESS            METHOD

# "local" is for Unix domain socket connections only
local             all             all                                               ident
# IPv4 local connections:
host             all             all                127.0.0.1/32              ident
# IPv6 local connections:
host             all             all                ::1/128                     ident
Reply | Threaded
Open this post in threaded view
|

Re: Installation on CentOS 5.6 with PostgreSQL

Mike Z
Try changing 'ident' to 'password'.

On Tue, Nov 15, 2011 at 8:56 AM, champagroup
<[hidden email]> wrote:

> I did perform GRANT ALL for user ofbiz on the three db's I created, as for
> the pg_hba.conf file, this is what's in it
>
> # TYPE  DATABASE        USER            CIDR-ADDRESS            METHOD
>
> # "local" is for Unix domain socket connections only
> local             all             all
> ident
> # IPv4 local connections:
> host             all             all                127.0.0.1/32
> ident
> # IPv6 local connections:
> host             all             all                ::1/128
> ident
>
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Installation-on-CentOS-5-6-with-PostgreSQL-tp4024345p4073256.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Installation on CentOS 5.6 with PostgreSQL

champagroup
Thanks a lot for the suggestion, Mike. That seems to have solved the problem. I had used trust, and that worked too. But I did not think it would be a good idea to leave it unsecure like that.

Thanks to everyone else, as well.
Reply | Threaded
Open this post in threaded view
|

Re: Installation on CentOS 5.6 with PostgreSQL

Mike Z
postgres-# \l                                   List of databases
Name     |  Owner   | Encoding |  Collation  |    Ctype    |   Access
privileges-------------+----------+----------+-------------+-------------+-----------------------
ofbiz       | ofbiz    | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
Make sure the ofbiz database(s) are created with UTF8 encoding, or
multiple languages will be a problem.
On Tue, Nov 15, 2011 at 2:33 PM, champagroup
<[hidden email]> wrote:

> Thanks a lot for the suggestion, Mike. That seems to have solved the problem.
> I had used trust, and that worked too. But I did not think it would be a
> good idea to leave it unsecure like that.
>
> Thanks to everyone else, as well.
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Installation-on-CentOS-5-6-with-PostgreSQL-tp4024345p4074506.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
12