Page 1 of 2

Cant access mobile web client / postgres

Posted: Tue Dec 11, 2007 3:46 pm
by lei
Hi,


i am using Scalix running on debian sarge since a few month now and i am very happy with it
(Outlook Connector and webmailare running perfect)

Now that i started playing a bit with my handy i tried to access http://blablubb/m

I cant login. Wrong User / Password problem. So i searched the forum and found several threads pointing to a Postgres Problem.

I then deleted the postgres data folder and tried

Code: Select all

/opt/scalix-postgres/bin/sxpsql-init                  # To create the database and tables
/opt/scalix-postgres/bin/sxpsql-setpwd mypassword     # This is a database password you select
/opt/scalix-postgres/bin/sxpsql-whitelist 192.168.1.1 # This is the IP address matching the
                                                      # hostname of the machine as used above



Second command gives an error:

Code: Select all

 root@scalix:/opt/scalix-postgres/bin# ./sxpsql-setpwd xxxxxxxx
psql: FATAL:  database "scalix" does not exist


Hasnt seed data been installed with the deb package? What do do to solve this special problem?





Thank you so much for your help

lei

Posted: Tue Dec 11, 2007 5:44 pm
by mikevl
Debian is not really a supported platform. You MAY get a reply here but if you don't please read the scalix wiki on manual instruction very throughly........ I believe it has worked for some others.

Mike

Posted: Tue Dec 11, 2007 8:12 pm
by lei
yes, i know that debian isnt a recomended distribution to use (RHE, SLE...blablablubb). Its not a very debian specific problem if a table is not exisiting. There must be a way to "manually"
create database or a db dump with seed data or anything like that

thx

lei


P.S:

tail -f pgstartup.log tells me:


Code: Select all

FATAL:  no pg_hba.conf entry for host "192.168.0.11", user "scalix", database "scalix", SSL off

Posted: Wed Dec 12, 2007 3:31 am
by Valerion
Check that your pg_hba.conf contains a line like

host scalix scalix 192.168.0.11/32 md5

/opt/scalix-postgres/bin/sxpsql-whitelist is supposed to add this.

Also, you tried to add 192.168.1.1 in the whitelist, but apparently the connections are from 192.168.0.11. Check your IP address.

The scalix DB is supposed to be created by
/opt/scalix-postgres/bin/sxpsql-init - if this is not the case you may need to dig into this and see why it doesn't get created properly. It's a shell script, so you should be able to see where it fails.

Posted: Wed Dec 12, 2007 8:04 am
by lei
The sxpsql-init script gives no output.

If i try to execute the initdb tool manually i get the error shown below (invalid database). The data folder exists and is chown to postgres.

Code: Select all

root@scalix:/opt/scalix/diag# ./initdb /var/opt/scalix/sx/postgres/data postgres
db_VISTA Version 3.10
Database Initialization Utility

Copyright (C) 1984, 1985, 1986, 1987 by Raima Corp.


*** db_VISTA database error -4 - invalid database
Unable to locate database: /var/opt/scalix/sx/postgres/data
root@scalix:/opt/scalix/diag#



root@scalix:/opt/scalix-postgres/bin# psql scalix

Code: Select all

psql: FATAL:  database "scalix" does not exist


netstat -na | grep 5733 give

Code: Select all



unix  2      [ ACC ]     STREAM     LISTENING     192929   /var/opt/scalix/sx/postgres/data/.s.PGSQL.5733


I always used mysql :(

Posted: Wed Dec 12, 2007 8:11 am
by lei
I deleted the data folder and restarted the sxpsql-init script.

It initially creates everything, but then the postgres log tells me:

Code: Select all

LOG:  could not bind IPv4 socket: Address already in use
HINT:  Is another postmaster already running on port 5733? If not, wait a few seconds and retry.
FATAL:  could not create listen socket for "scalix.server.csx"



and when i try

psql -p 5733 scalix

Code: Select all

root@scalix:/etc/init.d# psql -p 5733 scalix
psql: could not connect to server: 8T½·@ü×·
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5733"?
is thrown.


and also sxpsql-setpwd "password" command returns:

Code: Select all

root@scalix:/opt/scalix-postgres/bin# ./sxpsql-setpwd xxx
psql: could not connect to server: 8Tº·@üÔ·
        Is the server running locally and accepting
        connections on Unix domain socket "/var/opt/scalix/sx/postgres/data/.s.PGSQL.5733"?


I dont get the point. Are two postgres server systems running? If yes why? And where to stop?

Posted: Wed Dec 12, 2007 10:43 am
by Valerion
do a lsof -i:5733 and see what shows up as listening? You may have to kill off the offending process first.

Posted: Wed Dec 12, 2007 11:56 am
by lei
thx for your help Valerion.

I deleted the data folder (Storage point for postgres)
I killed the process and then the sxpsql-init script ran just fine and created the table and the user, and maybe more i dunno.

tail -f pgstartup.log running in background...



Code: Select all

LOG:  database system is shut down
LOG:  database system was shut down at 2007-12-12 16:48:15 UTC
LOG:  checkpoint record is at 0/9BCFCC
LOG:  redo record is at 0/9BCFCC; undo record is at 0/0; shutdown TRUE
LOG:  next transaction ID: 542; next OID: 17143
LOG:  database system is ready



when i try to connect to the db

psql -p 5733 scalix

i get

Code: Select all

root@scalix:/opt/scalix-postgres/bin# psql -p 5733 scalix
psql: could not connect to server: 8
                                    ¶·@,Ñ·
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5733"?




when i do a telnet "MACHINEIP" 5733

and i type anything an error is shwon in the postgres error log which points out that the server must be running on 5733.

Code: Select all

LOG:  invalid length of startup packet




Now the question:

How to figure out if postgres is running in general and with correct seed data?
How to find out why mobile-client wont let me login?

Code: Select all

2007-12-12 22:45:15,244 DEBUG [Init.contextInitialized:16] Received contextInitialized event
2007-12-12 22:45:15,273 DEBUG [Config.getInputStreamForFile:101] Reading config from /var/opt/scalix/sx/mobile/mobile.properties
2007-12-12 22:45:15,275 DEBUG [Config.load:78] done loading Scalix Mobile Web Client configuration (version 11.0.4.25)
2007-12-12 22:45:45,419 DEBUG [LoginController.processFormSubmission:61] authentication failed for sxadmin
2007-12-12 22:45:51,176 DEBUG [LoginController.processFormSubmission:61] authentication failed for sxadmin
2007-12-12 22:45:56,720 DEBUG [LoginController.processFormSubmission:61] authentication failed for sxadmin

Posted: Thu Dec 13, 2007 3:40 am
by Valerion
You can find out if postgresql is running properly by doing a

psql -h <hostname> -p 5733 -U scalix scalix

I suggest you look at the logfiles in the tomcat directory to see what the cause of the Mobile client failing is.

Posted: Thu Dec 13, 2007 6:32 am
by lei
cool with your help a can be sure that psql is running bit the actuall problem remains, i cant login t o mobile web client

Code: Select all

root@scalix:/etc/opt/scalix-tomcat/connector/ajp# psql -h 192.168.0.11 -p 5733 -U scalix scalix
Password:
Welcome to psql 7.4.7, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

scalix=#


Code: Select all


\l ouputs:
       List of databases
   Name    |  Owner   | Encoding
-----------+----------+-----------
 scalix    | postgres | SQL_ASCII
 template0 | postgres | SQL_ASCII
 template1 | postgres | SQL_ASCII

scalix-# ;
 server_version
----------------
 7.4.7
(1 row)









The error in the tomcat/logs/mobile*.log was posted in the reply above

2007-12-12 22:45:15,244 DEBUG [Init.contextInitialized:16] Received contextInitialized event
2007-12-12 22:45:15,273 DEBUG [Config.getInputStreamForFile:101] Reading config from /var/opt/scalix/sx/mobile/mobile.properties
2007-12-12 22:45:15,275 DEBUG [Config.load:78] done loading Scalix Mobile Web Client configuration (version 11.0.4.25)
2007-12-12 22:45:45,419 DEBUG [LoginController.processFormSubmission:61] authentication failed for sxadmin
2007-12-12 22:45:51,176 DEBUG [LoginController.processFormSubmission:61] authentication failed for sxadmin
2007-12-12 22:45:56,720 DEBUG [LoginController.processFormSubmission:61] authentication failed for sxadmin




The api log in the tomcat logs folder is empty :(

Posted: Thu Dec 13, 2007 6:47 am
by Valerion
I just had an issue where I restarted postgresql, then my mobile client stopped working until I restarted tomcat as well. Not sure if it will help you either. My mobile and API logs are all empty, so that doesn't mean anything either.

Let's start at the beginning. Go to the mobile.properties file and check the platform API URL. you can test this by going to http://host.domain/api/docs, as well as trying some variations as described in the API guide.

Also, I see you're on Scalix 11.0.4 ATM. You may want to consider uprgading to 11.2.0 or soon to 11.3.0.

Posted: Thu Dec 13, 2007 7:07 am
by lei
Thank you so much for helping me with my problem. And yes i should consider upgrading. But i want to solve that problem maybe thats a hardheaded stupidity.

I can get the pages at http://192.168.0.11/api/docs


i have

Code: Select all

platform.url=http://scalix.server.csx/api



in mobile.properties


I cannot reach http://scalix.server.csx from miy windows machine as i have no dns server running. But as im not using a distributed system but all services on one server this shouldnt be a problem as scalix.server.csx is the hostname of the machine running scalix

SAC and Webmail work just fine since a long time.

Posted: Thu Dec 13, 2007 7:17 am
by Valerion
Try using a browser on your Scalix server to check the URLs. You will need DNS sooner or later, it will make your life a lot easier, even if you only have 2 or 3 machines. Mail works a lot better when DNS is available. For now you can also use the hosts file on your Windows machine to check.

SAC is probably the hardest item to get to work properly, so if that is working it is encouraging.

What username and password are you trying to log in with? And does the exact same credentials work in SAC and SWA?

Posted: Thu Dec 13, 2007 8:14 am
by lei
I do get the pages. And setting a host file would just trick my windows into finally using the ip again.

Sac is working and Swa too. I can even login when postgres is not running. Im not quite sure how scalix handles its authentication. Where are the pwd for mobile web client?

I login using user: sxadmin pass: xxx

Maybe its an error in the locale seting of the scalix table. is ascii_table ok?


Where to check else?



Greetings lei

Posted: Thu Dec 13, 2007 5:17 pm
by kanderson
Add the host entry to your hosts file and try it.

There's a difference between connecting to an IP and a FQDN. Even though one points at the other.

Kev.