Accessing CouchDB server on iOS

Viewing 12 reply threads
  • Author
    Posts
  • March 10, 2018 at 9:01 AM #27710

    czygen
    Participant

    Hello
    Sinc the modifications of cloudant plan, I tried to use CouchDB (without SSL for the moment)
    I installed and setup a CouchDB server on my Mac using TapForms manual
    When I log in Tap Forms to the server :
    It’s running OK on the Mac
    But I cannot log on my iOS device. I receive a message “VĂ©rifiez l’URL du serveur, le nom d’utilisateur et le mot de passe. Connexion au serveur impossible”
    I use the same IP address than the Mac : 127….
    I don’t know what is the good IP address to use as “actual IP address” of my own couchDB server

    Could you help me please. Thank you very much

    March 10, 2018 at 12:19 PM #27712

    Brendan
    Keymaster

    Make sure you set the bind_address in the CouchDB settings to 0.0.0.0.

    That will tell CouchDB to accept connections from any IP address on your network and not just from localhost (127.0.0.1).

    Attached is a sample couchdb2-local.ini file which you can use to compare with your’s. A few things have been changed to blah-blah-blah just to obscure passwords and stuff, but the rest is the same as what I use.

    You can find that file in:

    ~/Library/Preferences/couchdb2-local.ini

    Attachments:
    You must be logged in to view attached files.
    March 10, 2018 at 11:05 PM #27718

    czygen
    Participant

    Thank you Brendan, this is very helpful
    It is running on the Mac
    But I still have a problem in the setup for iOS Tap Forms and I don’t understand which IP address do I enter in Tap Forms on my iPhone ?
    I don’t know where I can find the IP address of my CouchDB server
    I tried with the IP address of my Mac but it failed

    March 11, 2018 at 12:08 AM #27719

    Brendan
    Keymaster

    Did you make sure that the bind_address was set to 0.0.0.0? And after you did that, did you restart the CouchDB software? If not, you should do that.

    You can also use the name of your computer too. For example, mine is Voyager, so I use http://voyager.local:5984

    But if you want to use an IP address, go to the System Preferences app, then click Network. Then read what it says there for the active network interface. For example, my WiFi network interface says 10.0.1.20. So the IP address I would use on my iPhone is http://10.0.1.20:5984

    March 11, 2018 at 12:57 AM #27721

    czygen
    Participant

    That works !!!!
    Thank you very much Brendan for your availability
    Tap Forms is very nice and you too

    March 11, 2018 at 8:31 AM #27723

    czygen
    Participant

    Hi Brendan
    I think I am very near the end but a new problem block me with Setup after SSL configuration, as you noticed CouchDB gets stuck trying to launch again and again. I am obliged to cancel it
    Note at each launch a new tab to 127.0.0.1:5984 in my browser with a message 127.0.0.1 doesn’t authorize connection
    I looked to the local.ini file you mentioned in your manual but I could not find it at the location you mentioned
    Do you have an idea ?
    Thanks a lot in advance

    March 11, 2018 at 11:34 AM #27726

    czygen
    Participant

    This is the part which causes the problem
    [daemons]
    httpsd = {chttpd, start_link, [https]}

    [ssl]
    port = 6984
    key-file = /Users/Claude/Documents/CouchDB/couchdb.key
    cert_file = /Users/Claude/Documents/CouchDB/couchdb.crt
    ciphers = undefined
    tls_versions = undefined
    secure_renegotiate = undefined

    Without it, it works well

    March 12, 2018 at 1:09 PM #27755

    Brendan
    Keymaster

    Are you using CouchDB 2.1.1? I remember a while back having that re-launch problem, but it seems to have been fixed in the latest 2.1.1 version.

    Maybe try rebooting your Mac and see if that solves the problem.

    Everything there looks good to me. So I’m not sure why it’s relaunching the admin console over and over again.

    March 12, 2018 at 1:10 PM #27756

    Brendan
    Keymaster

    Did you install the certificate on your Mac and other devices? You do that by double-clicking on the .crt file and then setting the Trust to Always Trust in the Keychain Access application.

    March 13, 2018 at 5:02 AM #27787

    czygen
    Participant

    I installed the certificate and reboot
    No way

    March 13, 2018 at 11:34 AM #27799

    Brendan
    Keymaster

    What macOS version are you using?

    Are you accessing the database over the Internet at all? Maybe if you’re just accessing it over your own network you can skip the SSL stuff for now. Perhaps an update to CouchDB will resolve the relaunching problem. Or you can post a message on the Apache CouchDB forum and ask them what the problem might be.

    https://groups.google.com/forum/#!forum/couchdb-user-archive

    Do you get green checkmarks across the board when you verify the installation?

    Maybe try experimenting a bit by removing some of these lines to see what happens:

    
    ciphers = undefined
    tls_versions = undefined
    secure_renegotiate = undefined
    
    March 15, 2018 at 1:08 AM #27840

    czygen
    Participant

    I did it !!!
    None of these lines are usefull for me but it does’nt change anything
    In fact I made a mistake on the keyword key_file (- instead of _)
    Thank you very much Brendan your questions and help wer very usefull for me to find it

    March 15, 2018 at 2:00 AM #27842

    Brendan
    Keymaster

    Ah excellent!

    I’m glad you found the mistake and it’s all working now.

    Thanks!

    Brendan

Viewing 12 reply threads

You must be logged in to reply to this topic.