Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run sydent error #26

Closed
wjhtinger opened this issue Nov 3, 2016 · 6 comments
Closed

run sydent error #26

wjhtinger opened this issue Nov 3, 2016 · 6 comments

Comments

@wjhtinger
Copy link

(.sydent) [wangjh@localhost .sydent]$ python -m sydent.sydent
INFO:sydent.db.sqlitedb:Using DB file sydent.db
WARNING:sydent.http.httpcommon:No HTTPS private key / cert found: not starting replication server or doing replication pushes
INFO:sydent.http.httpserver:Starting Client API HTTP server on port 8090
INFO:twisted:Site starting on 8090
INFO:twisted:Starting factory <twisted.web.server.Site instance at 0x7f366710c2d8>
Unhandled error in Deferred:
CRITICAL:twisted:Unhandled error in Deferred:

CRITICAL:twisted:
Traceback (most recent call last):
File "/home/wangjh/.sydent/lib/python2.7/site-packages/twisted/internet/defer.py", line 149, in maybeDeferred
result = f(*args, **kw)
File "/home/wangjh/.sydent/lib/python2.7/site-packages/sydent/replication/pusher.py", line 76, in scheduledPush
peers = self.peerStore.getAllPeers()
File "/home/wangjh/.sydent/lib/python2.7/site-packages/sydent/db/peers.py", line 52, in getAllPeers
res = cur.execute("select p.name, p.port, p.lastSentVersion, pk.alg, pk.key from peers p, peer_pubkeys pk "
OperationalError: no such table: peers

What wrong?

@floviolleau
Copy link

Hi,

I already asked directly to the developers (~july 2016) but still no answers...

I gave up for the moment.

@slipeer
Copy link

slipeer commented Mar 22, 2017

@wjhtinger, @floviolleau
There is installation bug.
In sources in sydent/db there some .sql files describes tables in database. Try to creat nesesary tables with them (Note IF NOT EXISTS don't work in sqlite - remove it) - this solution work for me.

@chlw
Copy link

chlw commented Apr 8, 2017

Hi all

Trying to set up an identity server myself. But I have some same problems...

@slipeer
Can you give some more hints how it worked for you?

What I did:

cd /path/to/sydent
sqlite3
.open sydent.db

Then ran all the SQL-Statements from the *.sql files in the db-directory (/path/to/sydent/sydent/db) in the console. I stripped out all existing "IF NOT EXISTS " as recommended by you.

When checking the database with the command .tables, ist seems that all the tables are there.

The I run the command

python -m sydent.sydent

which gives me the following error:

INFO:sydent.db.sqlitedb:Using DB file sydent.db
ERROR:sydent.db.sqlitedb:Error importing threepid_associations.sql
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "sydent.py", line 191, in <module>
  File "sydent.py", line 101, in __init__
  File "sydent/db/sqlitedb.py", line 42, in __init__
    c.executescript(fp.read())
sqlite3.OperationalError: near "(": syntax error

The file contains the mentioned command on line 42 (c.executescript(fp.read())), but I don't know, what's wrong.

The only thing I could possibly think of is, that I mistakenly installed the stuff in the directory "/home/temp/" which probably is not exactly where it belongs to.

Installed all on a Debian Jessie.

Any hints from someone...?

Thank you!

@slipeer
Copy link

slipeer commented Apr 10, 2017

@chlw I found that to sydent work correctly you need sqlite version >=3.12. I'm use 3.16 and all work for me.
As far as I remember, Debian Jessie has an older version. I'm use Stretch.

@chlw
Copy link

chlw commented Apr 29, 2017

@slipeer

Thanks for the quick reply and your help! I Installed a fresh copy of Debian Stretch and it now seems to work (at least the thing with the DB...).

I think the Identity-server now is online and working, but I still cannot get it to work with the homeserver, presumably due to a misconfigured conf file...

The Identity server is set up correctly in terms of DNS (sub.mydomain.tld), I have a working postfix-Server on that machine, but still can't get any mail-addresses or phne numbers to be saved.
In the file homeserver.yaml I have added the following:

# The list of identity servers trusted to verify third party
# identifiers by this server.
trusted_third_party_id_servers:
    - matrix.org
    - vector.im
    - sub.mydomain.tld

What am I missing? Should I use an external SMTP-Server?

Below is my sydent.conf

Thanks again for any hints!

[DEFAULT]
replication.https.port = 4434
email.from = Sydent Validation <noreply@{hostname}>
email.smtpport = 25
email.subject = Your Validation Token
log.path = /opt/sydent/log/sydent.log
db.file = sydent.db
email.template = res/invite_template.eml
email.smtphost = localhost
bodytemplate = Your code is {token}
replication.https.certfile = 
email.tlsmode = 0
email.smtppassword = mypassword
pidfile.path = sydent.pid
ed20086.signingkey = ed20086 0 jhzFryfAOkuvrKnRTimyaqq3cy+juvcxpAPNgvDmItc
clientapi.http.port = 8090
token.length = 6
email.hostname = localhost
email.smtpusername = myusername
obey_x_forwarded_for = False
email.invite.subject = %(sender_display_name)s has invited you to chat
replication.https.cacert = 
server.name = sub.mydomain.tld

[general]
server.name = sub.mydomain.tld

[db]

[http]

[email]

[crypto]
ed20086.signingkey = ed20086 0 jhzFryfAOkuvrKnRTimyaqq3cy+juvcxpAPNgvDmItc

[sms]

@richvdh
Copy link
Member

richvdh commented Mar 14, 2019

hopefully this is fixed now

@richvdh richvdh closed this as completed Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants