Ja ich denke schon Wie genau kann ich das kontrollieren?
Es müssten so 4 oder 5 Prozesse unter dem Namen postgres laufen. Prüfen mit ps -faux
hm jede menge postfix aber kein postgres… ich glaube auch diese installation brachte einen Fehler wie oben genannt ohne dass die logs was anzeigen…
Wir halten fest: es läuft kein PG-Server. Das wäre nun das, was für Dich zu tun ist: diesen installieren und ans laufen bekommen. Remote-Diagnose ist schwer, zumindest ohne konkrete Fehlerbilder.
Du könntest natürlich bei uns einen buchen, dann stellen wir Dir den fix und fertig hin
Bei Installation des Servers kommt halt folgende Fehlermeldung:
root@s18629602:/home# apt-get -y install postgresql postgresql-contrib
Reading package lists... Done
Building dependency tree
Reading state information... Done
postgresql is already the newest version.
postgresql-contrib is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up postgresql-9.3 (9.3.10-0ubuntu0.14.04) ...
* Starting PostgreSQL 9.3 database server * The PostgreSQL server failed to start. Please check the log output.
[fail]
invoke-rc.d: initscript postgresql, action "start" failed.
dpkg: error processing package postgresql-9.3 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of postgresql:
postgresql depends on postgresql-9.3; however:
Package postgresql-9.3 is not configured yet.
dpkg: error processing package postgresql (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of postgresql-contrib-9.3:
postgresql-contrib-9.3 depends on postgresql-9.3 (= 9.3.10-0ubuntu0.14.04); however:
Package postgresql-9.3 is not configured yet.
dpkg: error processing package postgresql-contrib-9.3 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of postgresql-contrib:
postgresql-contrib depends on postgresql-contrib-9.3; however:
Package postgresql-contrib-9.3 is not configured yet.
dpkg: error processing package postgresql-contrib (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
postgresql-9.3
postgresql
postgresql-contrib-9.3
postgresql-contrib
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@s18629602:/home#
schau mal in den Tiefen unter /var/lib, wo PG sein datadir hat und ob es da ein Log gibt, und natürlich, was da drin steht.
Möglicherweise ist erst einmal (handisch?) initdb auszuführen.
Btw.: aktuell ist 9.4, bald 9.5. Warum willst Du 9.3 installieren?
habe folgendes log gefunden. (9.3. vermutlich weil die ganzen tutorials noch mit 9.3 geschrieben wurden )
" ============================================================================
" Netrw Directory Listing (netrw v149)
" /var/lib/postgresql/9.3/main/pg_xlog
" Sorted by name
" Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$
" Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:exec
" ============================================================================
../
./
archive_status/
000000010000000000000001
.swp
okay, die Verzeichnisstruktur scheint schon mal da zu sein, das ist das pg_xlog - Verzeichnis, wo die Transactionlogs landen. Steht was in /var/lib/postgresql/9.3/ selbst? startup.log oder so…
ansonsten kannst Du mal als User postgres (!) versuchen:
pg_ctl -w start -D /var/lib/postgresql/9.3/main/
und schauen, was da passiert.
falls Du, was ich vermute, noch keine Daten in der DB hast, kannst auch /var/lib/postgresql/9.3/main/ löschen und, wieder als user postgres, aufrufen:
initdb -D /var/lib/postgresql/9.3/main/
Damit initialisiert Du alles noch mal neu. Dann sollte das starten klappen.
der Ordner /var/lib/postgresql/9.3/ ist leer, bis auf das main verzeichnis…
Das ausführen des anderen war auch nicht erfolgreich
root@s18629602:/var/lib/postgresql/9.3# su postgres
postgres@s18629602:~/9.3$ pg_ctl -w start -D /var/lib/postgresql/9.3/main/
bash: pg_ctl: command not found
postgres@s18629602:~/9.3$
Aber schonmal vorab danke für die Hilfe
P.S. command “initdb” auch “not found”
Das ist nen 1und1 vserver. Ich hab schon bemerkt dass der bei der ubuntu installation irgendwie nicht die gleichen voraussetzungen hat wie eine “normale” ubuntu webserver installation
Schau mal nach wo pg_ctl und initdb liegen (mit find) und ob das Verzeichnis im Pfad liegt (als postgres echo $PATH).
Ich weiß jetzt auf Anhieb nicht wo das auf Ubuntu sein müsste.
also, ich habe pg_ctl und initdb gefunden und konnte es auch ausführen. Hier ist der output dazu:
postgres@s18629602:/usr/lib/postgresql/9.3/bin$ ./initdb -D /var/lib/postgresql/ 9.3/main/
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locales
COLLATE: en_US.UTF-8
CTYPE: en_US
MESSAGES: en_US.UTF-8
MONETARY: en_US.UTF-8
NUMERIC: en_US.UTF-8
TIME: en_US.UTF-8
The default database encoding has accordingly been set to "LATIN1".
initdb: encoding mismatch
The encoding you selected (LATIN1) and the encoding that the
selected locale uses (UTF8) do not match. This would lead to
misbehavior in various character string processing functions.
Rerun initdb and either do not specify an encoding explicitly,
or choose a matching combination.
postgres@s18629602:/usr/lib/postgresql/9.3/bin$
Das starten danach war leider nicht erfolgreich:
postgres@s18629602:/usr/lib/postgresql/9.3/bin$ ls
clusterdb dropdb oid2name pg_controldata pg_isready pg_standby pg_xlogdump reindexdb
createdb droplang pg_archivecleanup pg_ctl pg_receivexlog pg_test_fsync postgres vacuumdb
createlang dropuser pg_basebackup pg_dump pg_resetxlog pg_test_timing postmaster vacuumlo
createuser initdb pgbench pg_dumpall pg_restore pg_upgrade psql
postgres@s18629602:/usr/lib/postgresql/9.3/bin$ ./pg_ctl -w start -D /var/lib/postgresql/9.3/main/
waiting for server to start....postgres cannot access the server configuration file "/var/lib/postgresql/9.3/main/postgresql.conf": No such file or directory
.... stopped waiting
pg_ctl: could not start server
Examine the log output.
postgres@s18629602:/usr/lib/postgresql/9.3/bin$
Die "postgresql.conf existiert in der Tat nicht. Hätte auch gern das log output gepostet, weiß aber nicht welches hier gemeint ist
ok Fortsetzung dank google (http://frosty-postgres.blogspot.de/2014/04/how-to-start-postgresql-debian-way-with.html):
config file liegt woanders… jetzt shared memory problem seufz
postgres@s18629602:/usr/lib/postgresql/9.3/bin$ ./pg_ctl -D /var/lib/postgresql/9.3/main/ -o "-c config-file=/et c/postgresql/9.3/main/postgresql.conf" start
server starting
postgres@s18629602:/usr/lib/postgresql/9.3/bin$ 2015-10-21 13:13:04.847 GMT [56278f60.7994]: [1-1] FATAL: could not map anonymous shared memory: Cannot allocate memory
2015-10-21 13:13:04.847 GMT [56278f60.7994]: [2-1] HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory or swap space. To reduce the request size (currently 56451072 0 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections.
ok Fortsetzung Teil 2:
mit der Anpassung der max_connections auf 20 und shared buffers auf 64MB zeigt er keine error meldung mehr, dafür macht er aber auch nix weiter an der stelle… steht still…
postgres@s18629602:/usr/lib/postgresql/9.3/bin$ ./pg_ctl -D /var/lib/postgresql/9.3/main/ -o "-c config-file=/etc/postgresql/9.3/main/postgresql.conf" start server starting
postgres@s18629602:/usr/lib/postgresql/9.3/bin$ 2015-10-21 13:20:41.466 GMT [56279129.7b9d]: [1-1] LOG: redirecting log output to logging collector process
2015-10-21 13:20:41.466 GMT [56279129.7b9d]: [2-1] HINT: Future log output will appear in directory "/var/log/postgresql".
Fortsetzung end: es scheint jetzt, dass alles läuft… ob ich ein Linux Server Admin Fan werde weiß ich nicht, aber vielen Dank für die Hilfe an alle!!
Btw: Du bist beim falschen Hoster
Wird schon. Sind nur die ersten Stolpersteine. Wenn du die gepackt hast kommst du auch über die grösseren Klötze die noch kommen werden
Ist halt mal zum testen und monatlich kündbar