Interesting...

I ran the command to search for all 'post' processes and killed those that
were related to postgres - there were 3 or 4.

I restarted the postgres server with the following command:

*sudo service postgresql restart*

Running your search command again, I found the following processes:

*ps -aef | grep -i post
postgres 20570     1  0 21:58 ?        00:00:00
/usr/lib/postgresql/9.1/bin/postgres -D /var/lib/postgresql/9.1/main -c
config_file=/etc/postgresql/9.1/main/postgresql.conf
postgres 20572 20570  0 21:58 ?        00:00:00 postgres: writer
process
postgres 20573 20570  0 21:58 ?        00:00:00 postgres: wal writer
process
postgres 20574 20570  0 21:58 ?        00:00:00 postgres: autovacuum
launcher process
postgres 20575 20570  0 21:58 ?        00:00:00 postgres: stats collector
process
ubuntu   20617 19728  0 22:00 pts/1    00:00:00 grep --color=auto -i post*

Are all of those processes used for a single postgres server?

I tried starting OAE up again using *./startup.sh* and tailing the logfile,
which changed:

*tail -f /home/ubuntu/postgres/db_logfile
LOG:  could not bind IPv4 socket: Address already in use
HINT:  Is another postmaster already running on port 5432? If not, wait a
few seconds and retry.
WARNING:  could not create listen socket for "localhost"
FATAL:  could not create any TCP/IP sockets
LOG:  could not bind IPv4 socket: Address already in use
HINT:  Is another postmaster already running on port 5432? If not, wait a
few seconds and retry.
WARNING:  could not create listen socket for "localhost"
FATAL:  could not create any TCP/IP sockets
FATAL:  could not open lock file "/var/run/postgresql/.s.PGSQL.5432.lock":
Permission denied
FATAL:  could not open lock file "/var/run/postgresql/.s.PGSQL.5432.lock":
Permission denied*

My startup.sh file looks like this:

*#! /bin/sh
java -Xms512m -Xmx1024m -XX:MaxPermSize=256m -jar
org.sakaiproject.nakamura.app-1.3.0.jar 1> run.log 1>&1 & SAKAI_PID=$!
if [ -f OAE.pid ]
then
rm OAE.pid
fi
echo $SAKAI_PID > OAE.pid*


So the log has obviously changed, but I tried starting OAE and postgres as
root but still got the same errors.

Any other tips??

Thanks so much.
Tom


On Wed, Aug 15, 2012 at 7:48 AM, Erik Froese <erik.fro...@gmail.com> wrote:

> On Tue, Aug 14, 2012 at 11:45 PM, Tom Huffner <thuff...@gmail.com> wrote:
> > Ok, I actually installed Maven 3 and replaced the jar file in my binary
> > directory with the one created in the source folder's app/target
> directory.
> >
> > However, when I start OAE up, I get the following error when I run the
> > command tail -f /home/ubuntu/postgres/db_logfile to see what's happening:
> >
> > WARNING:  could not create listen socket for "localhost"
> > FATAL:  could not create any TCP/IP sockets
> > LOG:  could not bind IPv4 socket: Address already in use
> > HINT:  Is another postmaster already running on port 5432? If not, wait a
> > few seconds and retry.
> > WARNING:  could not create listen socket for "localhost"
> > FATAL:  could not create any TCP/IP sockets
> > LOG:  could not bind IPv4 socket: Address already in use
> > HINT:  Is another postmaster already running on port 5432? If not, wait a
> > few seconds and retry.
> > WARNING:  could not create listen socket for "localhost"
> > FATAL:  could not create any TCP/IP sockets
>
>
> Those error messages are pretty explicit. It looks like you might have
> 2 copies of the postgres server running.
> Make sure postgres is dead and then restart it.
>
> /etc/init.d/postgres stop
> ps -aef | grep -i post
> (kill any processes that show up)
>
> Then start it up again.
>
> >
> > It seems like I need to replace localhost in some file with the server's
> > correct URL so it connects.  I tried editing (actually had to remove a #
> > before the listen_addresses and port and added my server's URL)  the
> > postgresql.conf file in /postgres/dbdata/ and restarted postgres, but
> still
> > get the error.
> >
> > As stated in the book:
> >
> > You'll eventually see an entry in the database log like the following:
> > ERROR: relation "css" does not exist at character 22
> > STATEMENT: select count(*) from css
> > The select statement on the css table is a check for the existence of the
> > database tables.  When OAE receives the error that no such table exists,
> it
> > creates the data schema in postgres.
> >
> > This obviously looks like the final piece in the installation process.
>  So
> > close!
> >
> > Any ideas??
> >
> > Thanks,
> > Tom
> >
> >
> >
> > On Tue, Aug 14, 2012 at 10:21 AM, Erik Froese <erik.fro...@gmail.com>
> wrote:
> >>
> >> On Mon, Aug 13, 2012 at 10:12 PM, Tom Huffner <thuff...@gmail.com>
> wrote:
> >> > Hey again everybody.  I decided to redo the JDBC part of the
> PostgreSQL
> >> > installation process as a way of troubleshooting a problem we were
> >> > having.
> >> >
> >> > I am on page 104 of the Sakai OAE Deployment and Management book, and
> >> > have a
> >> > question about rebuilding nakamura from the source code zip file.
> >> >
> >> > I completely shut down OAE as instructed, and have a few lingering
> >> > questions
> >> > before I proceed.  Namely, in the section I mentioned, there is a
> >> > subsection
> >> > called: Cheat sheet for rebuilding nakamura clean that has the
> following
> >> > commands in it:
> >> >
> >> > cd source
> >> > rm -r nakamura
> >> > unzip
> >> > sakaiproject-nakamura-org.sakaiproject.nakamura-1.3.0-0-g80f19c6.zip
> >> > mv sakai-project-nakamura-6407909 nakamura
> >> > cd nakamura
> >> > export MAVEN_OPTS="-Xmx256m -XX:PermSize=256m"
> >> > mvn clean install
> >> >
> >> > After I do this, I do not need to replace any jar files or update the
> >> > current OAE installation, correct?  When I reinstall nakamura, as the
> >> > code
> >> > above instructs, that's it for this part...right??
> >>
> >> No. "maven install" just builds the application and installs it in
> >> your local maven repository.
> >> You need to copy the application jar to wherever you run OAE. The new
> >> jar is in nakamura/app/target.
> >>
> >>
> >> >
> >> > It then instructs to "configure the JDBC connection parameters" by
> first
> >> > creating a cfg file in a load folder in the nakamura directory.  The
> >> > correct
> >> > nakamura folder is located in the binary directory, correct?
>  Obviously,
> >> > I
> >> > want the load folder to be in the correct nakamura directory.
> >>
> >> The .cfg file method has been deprecated. We'll be issuing an
> >> over-the-air update to the book soon ;-)
> >>
> >> Follow these instructions to connect OAE to Postgres
> >>
> >>
> >>
> https://oae-community.sakaiproject.org/content#p=kXyf3CaWaa/Configuring%20Nakamura%20for%20Postgres
> >>
> >> >
> >> > After this, I then simply start OAE back up again and I should be all
> >> > set
> >> > with PostgreSQL in OAE, correct?
> >>
> >> That's it. Just verify the configuration at /system/console/configMgr
> >> Search for the JDBCStorageClientPool class to view its config.
> >>
> >> >
> >> > I have looked at the remainder of the PostgreSQL instructions in the
> >> > book
> >> > and an online resource...is there any further configuration needed for
> >> > the
> >> > JDBC/PostgreSQL to work correctly in OAE?  Do I have to edit anything
> in
> >> > the
> >> > system console's Configuration page?
> >> >
> >> > Thanks so much!
> >> > Tom
> >> >
> >> >
> >> > On Mon, Aug 13, 2012 at 6:27 PM, Tom Huffner <thuff...@gmail.com>
> wrote:
> >> >>
> >> >> Thanks Branden...we have figured out the issue we were having and are
> >> >> testing adding content and courses now!
> >> >>
> >> >> Tom
> >> >>
> >> >>
> >> >> On Sun, Aug 12, 2012 at 11:00 AM, Branden Visser <mrvis...@gmail.com
> >
> >> >> wrote:
> >> >>>
> >> >>> Hi Tom,
> >> >>>
> >> >>> I think the ServerProtectionService is not configured to allow
> access
> >> >>> from http://ec2-23-20-174-168.compute-1.amazonaws.com:8080
> >> >>>
> >> >>> Can you ensure that your trusted hosts configuration includes a
> >> >>> trusted
> >> >>> host of:
> >> >>>
> >> >>> ec2-23-20-174-168.compute-1.amazonaws.com:8080
> >> >>>
> >> >>> Thanks,
> >> >>> Branden
> >> >>>
> >> >>> On Sat, Aug 11, 2012 at 8:52 PM, Tom Huffner <thuff...@gmail.com>
> >> >>> wrote:
> >> >>> > I have completed the Integrating with PostgreSQL section in the
> >> >>> > book,
> >> >>> > but am
> >> >>> > getting the same "blank page" error I was getting a while back
> when
> >> >>> > first
> >> >>> > installing OAE.
> >> >>> >
> >> >>> > I tried to rectify the issue using the "Configure Server
> Protection
> >> >>> > Server"
> >> >>> > as seen here:
> >> >>> >
> >> >>> >
> >> >>> >
> https://confluence.sakaiproject.org/display/3AK/OAE+Configuration+and+Deployment
> >> >>> >
> >> >>> > But my edits from before are still present and I still get the
> >> >>> > "blank
> >> >>> > page"
> >> >>> > when I try to visit my Sakai OAE index page.
> >> >>> >
> >> >>> > Any ideas as to what else can be done??
> >> >>> >
> >> >>> > I attached a screenshot of the blank page.
> >> >>> >
> >> >>> > Thanks,
> >> >>> > Tom
> >> >>> >
> >> >>> > On Mon, Aug 6, 2012 at 12:24 PM, Lance Speelmon <la...@rsmart.com
> >
> >> >>> > wrote:
> >> >>> >>
> >> >>> >> IIUC you need to be running as the postgres user; i.e.: sudo su -
> >> >>> >> postgres.  L
> >> >>> >>
> >> >>> >>
> >> >>> >> On Aug 6, 2012, at 9:19 AM, Tom Huffner <thuff...@gmail.com>
> wrote:
> >> >>> >>
> >> >>> >> That seemed to progress things, Erik...thanks!
> >> >>> >>
> >> >>> >> At least now, when I try to create a database, it recognizes it
> as
> >> >>> >> something exists.  However, now, it doesn't recognize my username
> >> >>> >> (ubuntu)
> >> >>> >> as a role that exists, throwing this error:
> >> >>> >>
> >> >>> >> createdb: could not connect to database postgres: FATAL:  role
> >> >>> >> "ubuntu"
> >> >>> >> does not exist
> >> >>> >>
> >> >>> >> hmmmm...
> >> >>> >>
> >> >>> >> On Mon, Aug 6, 2012 at 12:12 PM, Erik Froese
> >> >>> >> <erik.fro...@gmail.com>
> >> >>> >> wrote:
> >> >>> >>>
> >> >>> >>> Tom,
> >> >>> >>>
> >> >>> >>> Looks like createdb can't connect to your postgres instance.
> >> >>> >>> Can you try starting postgres with /etc/init.d/postgres start?
> >> >>> >>>
> >> >>> >>> That script probably configures the postgres daemon properly for
> >> >>> >>> your
> >> >>> >>> system.
> >> >>> >>>
> >> >>> >>> Erik
> >> >>> >>>
> >> >>> >>> On Mon, Aug 6, 2012 at 3:09 AM, Tom Huffner <thuff...@gmail.com
> >
> >> >>> >>> wrote:
> >> >>> >>> > Exciting stuff happening on Mars isn't it??
> >> >>> >>> >
> >> >>> >>> > Anyways - I was able to shut down the database using the
> >> >>> >>> > following
> >> >>> >>> > command:
> >> >>> >>> >
> >> >>> >>> > /usr/lib/postgresql/9.1/bin/pg_ctl stop
> >> >>> >>> > -D/usr/var/postgresql/9.1/main/
> >> >>> >>> >
> >> >>> >>> > But am having an issue creating a database within the service.
> >> >>> >>> >
> >> >>> >>> > I can start a clean database server with the following
> commands:
> >> >>> >>> >
> >> >>> >>> > /usr/lib/postgresql/9.1/bin/pg_ctl -D \
> >> >>> >>> > /home/ubuntu/postgres/dbdata -l \
> >> >>> >>> > /home/ubuntu/postgres/db_logfile start
> >> >>> >>> >
> >> >>> >>> > But can't seem to create a database.  What is recommended is
> the
> >> >>> >>> > following:
> >> >>> >>> >
> >> >>> >>> > postgresdir/bin/createdb sakaioae
> >> >>> >>> >
> >> >>> >>> > I found two createdb files, and tried both commands (logged in
> >> >>> >>> > as
> >> >>> >>> > both
> >> >>> >>> > the
> >> >>> >>> > sakai user and as postgres) to try and create a database
> within
> >> >>> >>> > the
> >> >>> >>> > service,
> >> >>> >>> > but get the same error with each command (listed after):
> >> >>> >>> >
> >> >>> >>> > /usr/lib/postgresql/9.1/bin/createdb sakaioae
> >> >>> >>> > /usr/bin/createdb sakaioae
> >> >>> >>> >
> >> >>> >>> > Error I received with both:
> >> >>> >>> > createdb: could not connect to database postgres: could not
> >> >>> >>> > connect
> >> >>> >>> > to
> >> >>> >>> > server: No such file or directory
> >> >>> >>> >         Is the server running locally and accepting
> >> >>> >>> >         connections on Unix domain socket
> >> >>> >>> > "/var/run/postgresql/.s.PGSQL.5432"?
> >> >>> >>> >
> >> >>> >>> > Any ideas?
> >> >>> >>> >
> >> >>> >>> > Thanks,
> >> >>> >>> > Tom
> >> >>> >>> >
> >> >>> >>> >
> >> >>> >>> > On Fri, Aug 3, 2012 at 2:57 PM, Zach A. Thomas
> >> >>> >>> > <zach.tho...@gmail.com>
> >> >>> >>> > wrote:
> >> >>> >>> >>
> >> >>> >>> >> Hi, Tom. /Library is a Mac OS X path.
> >> >>> >>> >>
> >> >>> >>> >> We're using PostgreSQL on one of our ubuntu servers, and
> while
> >> >>> >>> >> it's a
> >> >>> >>> >> somewhat older version, this is the command we use:
> >> >>> >>> >> /usr/lib/postgresql/8.4/bin/postgres -D
> >> >>> >>> >> /var/lib/postgresql/8.4/main
> >> >>> >>> >> -c
> >> >>> >>> >> config_file=/etc/postgresql/8.4/main/postgresql.conf
> >> >>> >>> >>
> >> >>> >>> >> So you might have luck looking in /usr/lib, /var/lib, and
> /etc
> >> >>> >>> >> for
> >> >>> >>> >> what
> >> >>> >>> >> you need to run your db.
> >> >>> >>> >>
> >> >>> >>> >> regards,
> >> >>> >>> >> Zach
> >> >>> >>> >>
> >> >>> >>> >> On Aug 3, 2012, at 1:12 PM, Tom Huffner <thuff...@gmail.com>
> >> >>> >>> >> wrote:
> >> >>> >>> >>
> >> >>> >>> >> Hey Max, thanks for the web site!  I am actually doing our
> >> >>> >>> >> install
> >> >>> >>> >> on
> >> >>> >>> >> 1.3
> >> >>> >>> >> and I can't seem to get things straight.
> >> >>> >>> >>
> >> >>> >>> >> Is the directory structure of 1.2 vs. 1.3 the same or any
> >> >>> >>> >> different??
> >> >>> >>> >> I
> >> >>> >>> >> switched to the postgres user, tried to run the following
> >> >>> >>> >> command
> >> >>> >>> >> as
> >> >>> >>> >> listed
> >> >>> >>> >> on the web site:
> >> >>> >>> >>
> >> >>> >>> >> /Library/PostgreSQL/9.1/bin/pg_ctl stop
> >> >>> >>> >> -D/Library/PostgreSQL/9.1/data/
> >> >>> >>> >>
> >> >>> >>> >> But do not see a Library folder, even after searching for
> one.
> >> >>> >>> >> Is
> >> >>> >>> >> this a
> >> >>> >>> >> wildcard library folder or (again), am I missing something?
> >> >>> >>> >>
> >> >>> >>> >> Thanks!
> >> >>> >>> >> Tom
> >> >>> >>> >>
> >> >>> >>> >> On Thu, Aug 2, 2012 at 1:23 PM, Max Whitney <m...@nyu.edu>
> >> >>> >>> >> wrote:
> >> >>> >>> >>>
> >> >>> >>> >>> Hi Tom:
> >> >>> >>> >>>
> >> >>> >>> >>> I did Postgres install notes for OAE version 1.2 back in
> June.
> >> >>> >>> >>> They
> >> >>> >>> >>> are
> >> >>> >>> >>> not current with 1.4, but might provide some insight. The
> >> >>> >>> >>> notes
> >> >>> >>> >>> are
> >> >>> >>> >>> posted
> >> >>> >>> >>> on the OAE community instance, which has a lot of useful
> >> >>> >>> >>> information.
> >> >>> >>> >>>
> >> >>> >>> >>>
> >> >>> >>> >>>
> >> >>> >>> >>>
> >> >>> >>> >>>
> >> >>> >>> >>>
> https://oae-community.sakaiproject.org/content#p=lbmK1eqsKub/Sakai%20OAE%201.2%20Postgres%20Installation
> >> >>> >>> >>>
> >> >>> >>> >>> You might also consider the O'Reilly book which provides an
> >> >>> >>> >>> overview
> >> >>> >>> >>> of
> >> >>> >>> >>> installation on 1.2:
> >> >>> >>> >>> http://shop.oreilly.com/product/0636920023241.do
> >> >>> >>> >>>
> >> >>> >>> >>> Max Whitney
> >> >>> >>> >>>
> >> >>> >>> >>>
> >> >>> >>> >>> On Aug 1, 2012, at 1:21 AM, Tom Huffner wrote:
> >> >>> >>> >>>
> >> >>> >>> >>> Hey everyone...my name is Tom Huffner and I am working with
> >> >>> >>> >>> Dr.
> >> >>> >>> >>> Wang
> >> >>> >>> >>> at
> >> >>> >>> >>> the University of Delaware to get an instance of OAE up and
> >> >>> >>> >>> running
> >> >>> >>> >>> where we
> >> >>> >>> >>> can make our own changes.
> >> >>> >>> >>>
> >> >>> >>> >>> I'm at the point of beginning database integration, and we
> >> >>> >>> >>> would
> >> >>> >>> >>> like
> >> >>> >>> >>> to
> >> >>> >>> >>> use PostgreSQL in our Ubuntu environment.
> >> >>> >>> >>>
> >> >>> >>> >>> I followed the simple instructions on how to install it from
> >> >>> >>> >>> the
> >> >>> >>> >>> web
> >> >>> >>> >>> site: http://www.postgresql.org/download/linux/ubuntu/ and
> >> >>> >>> >>> simply
> >> >>> >>> >>> ran
> >> >>> >>> >>> this
> >> >>> >>> >>> command: sudo apt-get install postgresql-9.1
> >> >>> >>> >>>
> >> >>> >>> >>> My question is: is this the only command I should run to
> >> >>> >>> >>> install
> >> >>> >>> >>> it??
> >> >>> >>> >>> There are 5 other packages that I can install (as listed in
> >> >>> >>> >>> the
> >> >>> >>> >>> above
> >> >>> >>> >>> web
> >> >>> >>> >>> site)...are all/any of those necessary for OAE/PostgreSQL
> >> >>> >>> >>> integration?  In
> >> >>> >>> >>> my OAE Deployment and Management instructions, it then tells
> >> >>> >>> >>> me
> >> >>> >>> >>> to
> >> >>> >>> >>> work in
> >> >>> >>> >>> the bin directory of Postgres, but I can't seem to find it
> in
> >> >>> >>> >>> /etc/postgres
> >> >>> >>> >>> or /etc/postgres-common   Am I missing something??
> >> >>> >>> >>>
> >> >>> >>> >>> Thanks so much!
> >> >>> >>> >>> Tom
> >> >>> >>> >>> _______________________________________________
> >> >>> >>> >>> oae-dev mailing list
> >> >>> >>> >>> oae-dev@collab.sakaiproject.org
> >> >>> >>> >>> http://collab.sakaiproject.org/mailman/listinfo/oae-dev
> >> >>> >>> >>>
> >> >>> >>> >>>
> >> >>> >>> >>
> >> >>> >>> >> _______________________________________________
> >> >>> >>> >> oae-dev mailing list
> >> >>> >>> >> oae-dev@collab.sakaiproject.org
> >> >>> >>> >> http://collab.sakaiproject.org/mailman/listinfo/oae-dev
> >> >>> >>> >>
> >> >>> >>> >>
> >> >>> >>> >
> >> >>> >>> >
> >> >>> >>> > _______________________________________________
> >> >>> >>> > oae-dev mailing list
> >> >>> >>> > oae-dev@collab.sakaiproject.org
> >> >>> >>> > http://collab.sakaiproject.org/mailman/listinfo/oae-dev
> >> >>> >>> >
> >> >>> >>
> >> >>> >>
> >> >>> >> _______________________________________________
> >> >>> >> oae-dev mailing list
> >> >>> >> oae-dev@collab.sakaiproject.org
> >> >>> >> http://collab.sakaiproject.org/mailman/listinfo/oae-dev
> >> >>> >>
> >> >>> >>
> >> >>> >
> >> >>> >
> >> >>> > _______________________________________________
> >> >>> > oae-dev mailing list
> >> >>> > oae-dev@collab.sakaiproject.org
> >> >>> > http://collab.sakaiproject.org/mailman/listinfo/oae-dev
> >> >>> >
> >> >>
> >> >>
> >> >
> >> >
> >> > _______________________________________________
> >> > oae-dev mailing list
> >> > oae-dev@collab.sakaiproject.org
> >> > http://collab.sakaiproject.org/mailman/listinfo/oae-dev
> >> >
> >
> >
>
_______________________________________________
oae-dev mailing list
oae-dev@collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/oae-dev

Reply via email to