health
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Health] OpenSUSE 42.3 GNUhealth external connection


From: Axel Braun
Subject: Re: [Health] OpenSUSE 42.3 GNUhealth external connection
Date: Thu, 03 Aug 2017 07:27:10 +0200

Hello Mohammad,

Please report issues to the mailing list!

Am Mittwoch, 2. August 2017, 16:02:40 CEST schrieb address@hidden:

>..... following the Tryton.Server README instructions. I can connect
> locally as localhost but as external pc on the LAN always get "Could not
> connect to the server"
> 
> I see that some users have the same issue and it's hard to figure out
> the wrong steps over text. so I tried to include as much information and
> questions as possible in that Email.

For the connection issue:
- make sure you have port 8000 open in client and server
- once used without SSL, it will throw up an error when connecting with SSL - 
what are you using?

> What is the postgres default password? When using command su postgres
> without root. It's always authentication failure. Does it matter?

I would need to check the postgres documentation ...dont know
If you log in a s root first, then su postgres, it should not ask for a 
password

>       * I sat Network Settings>Network setup Method
> 
>                      into NetworkManager Service .. I put firewall off
> during the OS installation and SSH enabled in the attempts to solve the
> issue.
> 
> When trying to put Static IP,  internet connection goes off.

Please describe this in more detail (is not related to GNU Health)

> I can not use the command cdexe for some reason.

the alias is only set up for root - and you dont really need it, as all 
required binaries (like gnuhealth-control) are intalled in /usr/bin
 
>       * Below copypaste of trytond.conf, pg_hba.conf, systemctl status for
> trytond postgresql gnuhealth
> 
>       * trytond.conf Changes is in BOLD
> 
> # /etc/tryton/trytond.conf - Configuration file for Tryton Server
> (trytond)
> #
> # This file contains the most common settings for trytond (Defaults
> # are commented).
> # For more information read
> # /usr/share/doc/packages/trytond
> 
> [database]
> # Database related settings
> 
> # The URI to connect to the SQL database (following RFC-3986)
> # uri = database://username:address@hidden:port/
> # (Internal default: sqlite:// (i.e. a local SQLite database))
> #
> # PostgreSQL via Unix domain sockets
> # (e.g. PostgreSQL database running on the same machine (localhost))
> #uri = postgresql://tryton:tryton@/
> #
> # Postgres running on the same machine:
> 
> uri = postgresql:///
> 
> #
> #
> # PostgreSQL via TCP/IP
> # (e.g. connecting to a PostgreSQL database running on a remote machine
> or
> # by means of md5 authentication. Needs PostgreSQL to be configured to
> accept
> # those connections (pg_hba.conf).)
> #uri = postgresql://tryton:address@hidden:5432/
> 
> # The path to the directory where the Tryton Server stores files.
> # The server must have write permissions to this directory.
> # (Internal default: /var/lib/trytond)
> path = /var/lib/tryton
> 
> # Shall available databases be listed in the client?
> #list = True
> 
> # The number of retries of the Tryton Server when there are errors
> # in a request to the database
> #retry = 5
> 
> # The primary language, that is used to store entries in translatable
> # fields into the database.
> #language = en_US
> 
> [ssl]
> # SSL settings
> # Activation of SSL for all available protocols.
> # Uncomment the following settings for key and certificate
> # to enable SSL.
> 
> # The path to the private key
> #privatekey = /etc/ssl/private/ssl-cert-snakeoil.key
> 
> # The path to the certificate
> #certificate = /etc/ssl/certs/ssl-cert-snakeoil.pem
> 
> [jsonrpc]
> # Settings for the JSON-RPC network interface
> 
> # The IP/host and port number of the interface
> # (Internal default: localhost:8000)
> #
> # Listen on all interfaces (IPv4)
> LISTEN = 0.0.0.0:8000
> #
> # Listen on all interfaces (IPv4 and IPv6)
> #listen = [::]:8000
> 
> # The hostname for this interface
> #hostname =
> 
> # The root path to retrieve data for GET requests
> #data = jsondata
> 
> [xmlrpc]
> # Settings for the XML-RPC network interface
> 
> # The IP/host and port number of the interface
> #listen = localhost:8069
> 
> [webdav]
> # Settings for the WebDAV network interface
> 
> # The IP/host and port number of the interface
> #listen = localhost:8080
> 
> [session]
> # Session settings
> 
> # The time (in seconds) until an inactive session expires
> 
> TIMEOUT = 7600
> # The server administration password used by the client for
> # the execution of database management tasks. It is encrypted
> # using using the Unix crypt(3) routine. A password can be
> # generated using the following command line (on one line):
> # $ python -c 'import getpass,crypt,random,string; \
> # print crypt.crypt(getpass.getpass(), \
> # "".join(random.sample(string.ascii_letters + string.digits, 8)))'
> # Example password with 'admin'
> SUPER_PWD = JKUBZGVFNEUGK
> 
> [email]
> # Mail settings
> 
> # The URI to connect to the SMTP server.
> # Available protocols are:
> # - smtp: simple SMTP
> # - smtp+tls: SMTP with STARTTLS
> # - smtps: SMTP with SSL
> #uri = smtp://localhost:25
> 
> # The From address used by the Tryton Server to send emails.
> #from = address@hidden
> 
> [report]
> # Report settings
> 
> # Unoconv parameters for connection to the unoconv service.
> #unoconv = pipe,name=trytond;urp;StarOffice.ComponentContext
> 
> # Module settings
> #
> # Some modules are reading configuration parameters from this
> # configuration file. These settings only apply when those modules
> # are installed.
> #
> #[ldap_authentication]
> # The URI to connect to the LDAP server.
> #uri = ldap://host:port/dn?attributes?scope?filter?extensions
> # A basic default URL could look like
> #uri = ldap://localhost:389/
> 
> [web]
> # Path for the web-frontend
> #root = /usr/lib/node-modules/tryton-sao

looks good so far
 
>       * pg_hba.conf changes is in BOLD
> 
> # PostgreSQL Client Authentication Configuration File
> # ===================================================
> #
> # Refer to the "Client Authentication" section in the PostgreSQL
> # documentation for a complete description of this file. A short
> # synopsis follows.
> #
> # This file controls: which hosts are allowed to connect, how clients
> # are authenticated, which PostgreSQL user names they can use, which
> # databases they can access. Records take one of these forms:
> #
> # local DATABASE USER METHOD [OPTIONS]
> # host DATABASE USER ADDRESS METHOD [OPTIONS]
> # hostssl DATABASE USER ADDRESS METHOD [OPTIONS]
> # hostnossl DATABASE USER ADDRESS METHOD [OPTIONS]
> #
> # (The uppercase items must be replaced by actual values.)
> #
> # The first field is the connection type: "local" is a Unix-domain
> # socket, "host" is either a plain or SSL-encrypted TCP/IP socket,
> # "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a
> # plain TCP/IP socket.
> #
> # DATABASE can be "all", "sameuser", "samerole", "replication", a
> # database name, or a comma-separated list thereof. The "all"
> # keyword does not match "replication". Access to replication
> # must be enabled in a separate record (see example below).
> #
> # USER can be "all", a user name, a group name prefixed with "+", or a
> # comma-separated list thereof. In both the DATABASE and USER fields
> # you can also write a file name prefixed with "@" to include names
> # from a separate file.
> #
> # ADDRESS specifies the set of hosts the record matches. It can be a
> # host name, or it is made up of an IP address and a CIDR mask that is
> # an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that
> # specifies the number of significant bits in the mask. A host name
> # that starts with a dot (.) matches a suffix of the actual host name.
> # Alternatively, you can write an IP address and netmask in separate
> # columns to specify the set of hosts. Instead of a CIDR-address, you
> # can write "samehost" to match any of the server's own IP addresses,
> # or "samenet" to match any address in any subnet that the server is
> # directly connected to.
> #
> # METHOD can be "trust", "reject", "md5", "password", "gss", "sspi",
> # "ident", "peer", "pam", "ldap", "radius" or "cert". Note that
> # "password" sends passwords in clear text; "md5" is preferred since
> # it sends encrypted passwords.
> #
> # OPTIONS are a set of options for the authentication in the format
> # NAME=VALUE. The available options depend on the different
> # authentication methods -- refer to the "Client Authentication"
> # section in the documentation for a list of which options are
> # available for which authentication methods.
> #
> # Database and user names containing spaces, commas, quotes and other
> # special characters must be quoted. Quoting one of the keywords
> # "all", "sameuser", "samerole" or "replication" makes the name lose
> # its special character, and just match a database or username with
> # that name.
> #
> # This file is read on server startup and when the postmaster receives
> # a SIGHUP signal. If you edit the file on a running system, you have
> # to SIGHUP the postmaster for the changes to take effect. You can
> # use "pg_ctl reload" to do that.
> 
> # Put your actual configuration here
> # ----------------------------------
> #
> # If you want to allow non-local connections, you need to add more
> # "host" records. In that case you will also need to make PostgreSQL
> # listen on a non-local interface via the listen_addresses
> # configuration parameter, or via the -i or -h command line switches.
> 
> # TYPE DATABASE USER ADDRESS METHOD
> 
> # "local" is for Unix domain socket connections only
> local all all TRUST
> # IPv4 local connections:
> host all all 127.0.0.1/32 MD5
> # IPv6 local connections:
> host all all ::1/128 MD5
> # Allow replication connections from localhost, by a user with the
> # replication privilege.
> #local replication postgres peer
> #host replication postgres 127.0.0.1/32 ident
> #host replication postgres ::1/128 ident

Looks good as well

>       * Current systemctl status trytond. A repeated issue of failed for
> limit start when trying to change .conf or systemctl start gnuhealth in
> attempts which result to reinstall the whole OS

Can you explain more in detail? I doubt that a failed systemd start forces the 
reinstallation of the whole operating system! If yo, it should be reported in 
bugzilla.opensuse.org
 
> trytond.service - Tryton server
> Loaded: loaded (/usr/lib/systemd/system/trytond.service; enabled; vendor
> preset: disabled)
> Active: active (running) since Wed 2017-08-02 11:21:50 GMT; 1h 46min ago
> Main PID: 1762 (trytond)
> Tasks: 1 (limit: 512)
> CGroup: /system.slice/trytond.service
> └─1762 /usr/bin/python3 /usr/bin/trytond --config
> /etc/tryton/trytond.conf --pidfile=/var/lib/tryton/trytond.pid
> --logconf=/etc/tryton/trytond_log.conf
> 
> Aug 02 11:21:50 linux-hime systemd[1]: Started Tryton server.
> 
>       * Current systemctl status postgresql
> 
> postgresql.service - PostgreSQL database server
> Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled;
> vendor preset: disabled)
> Active: active (running) since Wed 2017-08-02 11:21:17 GMT; 1h 48min ago
> Main PID: 1728 (postgres)
> Tasks: 8 (limit: 512)
> CGroup: /system.slice/postgresql.service
> ├─1728 /usr/lib/postgresql96/bin/postgres -D /var/lib/pgsql/data
> ├─1729 postgres: logger process
> ├─1731 postgres: checkpointer process
> ├─1732 postgres: writer process
> ├─1733 postgres: wal writer process
> ├─1734 postgres: autovacuum launcher process
> ├─1735 postgres: stats collector process
> └─3636 postgres: tryton mydb [local] idle
> 
> Aug 02 11:21:16 linux-hime systemd[1]: Starting PostgreSQL database
> server...
> Aug 02 11:21:16 linux-hime postgresql-init[1717]: 2017-08-02 11:21:16
> GMT LOG: redirecting log output to logging collector process
> Aug 02 11:21:16 linux-hime postgresql-init[1717]: 2017-08-02 11:21:16
> GMT HINT: Future log output will appear in directory "pg_log".
> Aug 02 11:21:17 linux-hime systemd[1]: Started PostgreSQL database
> server.
> 
>       * Current systemctl status gnuhealth
> 
> gnuhealth.service - GNU Health server
> Loaded: loaded (/usr/lib/systemd/system/gnuhealth.service; disabled;
> vendor preset: disabled)
> 
> Active: inactive (dead)

yes, you need only one of the two (trytond.service OR gnuhealth.service)

> 
>       * psql -U postgres -c "\list"
> 
> List of databases
> Name | Owner | Encoding | Collate | Ctype | Access privileges
> -----------+----------+----------+-------------+-------------+--------------
> ---------
> 
> mydb | tryton | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
> postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
> template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
> 
> | | | | | postgres=CTc/postgres
> 
> template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
> 
> | | | | | postgres=CTc/postgres
> 
> (4 rows)

so, your database is called mydb. Looks good as well

Best regards
Axel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]