C-Gate with Raspberry Pi - Backup Error

Discussion in 'C-Gate Developers' started by abg, Apr 29, 2014.

  1. abg

    abg

    Joined:
    Dec 25, 2007
    Messages:
    208
    Likes Received:
    2
    Location:
    Sydney
    I have been running C-Gate on a Raspberry Pi for a couple of months now (thank you to all those that posted their tips) and it is very stable.

    Toolkit and HomeGate connect perfectly and changes through the Toolkit interface all work updating the project file xml on the pi as expected.

    The only issue is trying to do a backup of the projects. I've attached the error log created by Toolkit. Any clues as to why? I suspect it's something to do with file transfer between the Pi and Windows but not sure how to resolve.

    Thanks for any help.
     

    Attached Files:

    Last edited by a moderator: Apr 29, 2014
    abg, Apr 29, 2014
    #1
  2. abg

    Mr Mark

    Joined:
    Jan 27, 2006
    Messages:
    322
    Likes Received:
    5
    Location:
    FNQ
    Hello abg. I've been running c-gate on a Pi for ages also but never tried backing up a project. Will try tonight and let you know what happens - I can try on both W7 64 bit and W8.1.
     
    Mr Mark, Apr 29, 2014
    #2
  3. abg

    abg

    Joined:
    Dec 25, 2007
    Messages:
    208
    Likes Received:
    2
    Location:
    Sydney
    Thanks Mr Mark.

    I forgot to add that I am running Samba on the pi and file sharing between the pi and windows (with the toolkit PC - W7 64) is working.
     
    abg, Apr 29, 2014
    #3
  4. abg

    Mr Mark

    Joined:
    Jan 27, 2006
    Messages:
    322
    Likes Received:
    5
    Location:
    FNQ
    Ahhh... no good.
    Windows 8.1 throws the attached.
     

    Attached Files:

    • W8-1.txt
      File size:
      28.4 KB
      Views:
      569
    Mr Mark, Apr 29, 2014
    #4
  5. abg

    Mr Mark

    Joined:
    Jan 27, 2006
    Messages:
    322
    Likes Received:
    5
    Location:
    FNQ
    And similar with Windows 7.
     

    Attached Files:

    • W7.txt
      File size:
      27.8 KB
      Views:
      529
    Mr Mark, Apr 29, 2014
    #5
  6. abg

    abg

    Joined:
    Dec 25, 2007
    Messages:
    208
    Likes Received:
    2
    Location:
    Sydney
    Thanks for checking.

    Looks like a manual backup of the xml file then....
     
    abg, Apr 30, 2014
    #6
  7. abg

    Mr Mark

    Joined:
    Jan 27, 2006
    Messages:
    322
    Likes Received:
    5
    Location:
    FNQ
    I use WinSCP to transfer files, but will look into samba as an option for file sharing. I don't know a lot about linux, essentially got my RPi to do what I needed and have left it at that, so hopefully someone else here will have an answer?
     
    Mr Mark, Apr 30, 2014
    #7
  8. abg

    zei20t

    Joined:
    Aug 18, 2010
    Messages:
    130
    Likes Received:
    1
    Location:
    Sydney, Australia
    ive also had nothing but errors on win 7 and 8/8.1 and raspberry pi with backup too.

    any of you been able to program an eDLT using the pi as the c-gate server? that was why ive had to change back to a PC based c-gate server
     
    zei20t, Apr 30, 2014
    #8
  9. abg

    abg

    Joined:
    Dec 25, 2007
    Messages:
    208
    Likes Received:
    2
    Location:
    Sydney
    I can add and program an eDLT in the database (don't have one so can't connect it to the network) but the display representation doesn't seem to change when I add items (might be me as never used one before) and it is very slow to load and save from db.
     
    abg, May 1, 2014
    #9
  10. abg

    zei20t

    Joined:
    Aug 18, 2010
    Messages:
    130
    Likes Received:
    1
    Location:
    Sydney, Australia
    ok I'm glad its not just me. thanks for letting me know!

    Not a big deal, IMO the backup is more important than programming an eDLT.
     
    zei20t, May 5, 2014
    #10
  11. abg

    cheekymonkey

    Joined:
    Mar 10, 2013
    Messages:
    19
    Likes Received:
    1
    Location:
    Perth, WA
    The logs show a few "socket" errors so something appears to be failing when trying to communicate with the pi on one of the tcp ports.

    I must admit to not having used the backup menu option and right now am pretty busy and cannot predict when I will get a bit of downtime, but will endeavour look at it in the next couple of weeks.

    Wireshark will help with the port identification, but if it something else it will take a bit longer to diagnose.
     
    cheekymonkey, May 5, 2014
    #11
  12. abg

    daniel C-Busser Moderator

    Joined:
    Jul 26, 2004
    Messages:
    766
    Likes Received:
    20
    Location:
    Adelaide
    Thanks everyone for these reports, I have logged a ticket regarding backup/restore from remote C-Gate: TK-10001
     
    daniel, May 7, 2014
    #12
  13. abg

    zei20t

    Joined:
    Aug 18, 2010
    Messages:
    130
    Likes Received:
    1
    Location:
    Sydney, Australia
    thank you!
     
    zei20t, May 7, 2014
    #13
  14. abg

    Mr Mark

    Joined:
    Jan 27, 2006
    Messages:
    322
    Likes Received:
    5
    Location:
    FNQ
    Haven't tried it yet, but is this a problem when both the local and remote machines are Windows based? Time permitting, I'll test this at home this weekend.

    Disregard the above query. Remembered a remote site and successfully backed up the database - it was slow though and took a few minutes.
    Remote PC is running XP, Service Pack 3;
    Local PC is running Windows 8.1.
     
    Last edited by a moderator: May 9, 2014
    Mr Mark, May 9, 2014
    #14
  15. abg

    daniel C-Busser Moderator

    Joined:
    Jul 26, 2004
    Messages:
    766
    Likes Received:
    20
    Location:
    Adelaide
    Thanks Mr Mark. Can you confirm the remote C-Gate version at that site?
     
    daniel, May 12, 2014
    #15
  16. abg

    Mr Mark

    Joined:
    Jan 27, 2006
    Messages:
    322
    Likes Received:
    5
    Location:
    FNQ
    Hello Daniel.
    Remote site is running c-gate version 2.10.0 (build 3087).
     
    Mr Mark, May 12, 2014
    #16
  17. abg

    mminehan

    Joined:
    Oct 31, 2012
    Messages:
    36
    Likes Received:
    2
    Location:
    Auckland, New Zealand
    Has there been any resolution to this?
    I used to run cgate on a PC running Win10, but decided to move it to a Pi to unburden the PC.
    But not being able to back, other than copying the xml file, is a bit of pain.
     
    mminehan, Mar 15, 2019
    #17
  18. abg

    mminehan

    Joined:
    Oct 31, 2012
    Messages:
    36
    Likes Received:
    2
    Location:
    Auckland, New Zealand
    @daniel
    Hi Daniel, not sure where you guys are at with the cgate on a pi backup problem.
    I have been doing a little investigation and notice this in the logs when Toolkit connects to Cgate on a Pi:

    Feb 19 09:27:25 raspberrypi systemd[1]: Started cgate.
    Feb 19 09:27:25 raspberrypi java[4689]: Clipsal C-Gate(TM) v2.11.5 (build 3255)
    Feb 19 09:27:28 raspberrypi java[4689]: Logging to file: logs/event.txt
    Feb 19 09:27:28 raspberrypi java[4689]: 20200219-092728 800 cgate - C-Gate start
    ed.
    Feb 19 09:27:28 raspberrypi java[4689]: C-Gate is running.
    Feb 19 09:33:03 raspberrypi java[4689]: WARNING: An illegal reflective access op
    eration has occurred
    Feb 19 09:33:03 raspberrypi java[4689]: WARNING: Illegal reflective access by or
    g.exolab.castor.xml.BaseXercesOutputFormat (file:/usr/local/bin/cgate/lib/castor
    -xml-1.4.1.jar) to method com.sun.org.apache.xml.internal.serialize.OutputFormat
    .setMethod(java.lang.String)
    Feb 19 09:33:03 raspberrypi java[4689]: WARNING: Please consider reporting this
    to the maintainers of org.exolab.castor.xml.BaseXercesOutputFormat
    Feb 19 09:33:03 raspberrypi java[4689]: WARNING: Use --illegal-access=warn to en
    able warnings of further illegal reflective access operations
    Feb 19 09:33:03 raspberrypi java[4689]: WARNING: All illegal access operations w
    ill be denied in a future release


    I'm not a java or xml expert but it looks like Castor XML might be the problem.

    Hope this helps the team with the debugging.

    Marty
     
    mminehan, Feb 18, 2020
    #18
  19. abg

    jpharvey

    Joined:
    Oct 31, 2008
    Messages:
    9
    Likes Received:
    5
    This is an old thread but i took a look at what was happening. Toolkit is requesting to fetch the file tag\PROJECT_NAME.xml using \ instead of a /.
    It should be easy for clipsal to update toolkit to use a / always which should work on all platforms.
    A workaround i just tried is in the area where cgate is installed
    ln -s tag/{PROJECT_NAME}.xml tag\\{PROJECT_NAME}.xml

    replace {PROJECT_NAME} with your project name and repeat for each of them if you have more than one.
    You may need to run this with sudo depending on your permissions.
    toolkit is now able to backup those files.
     
    jpharvey, Apr 8, 2020
    #19
    Timbo, Mr Mark and DarylMc like this.
  20. abg

    mminehan

    Joined:
    Oct 31, 2012
    Messages:
    36
    Likes Received:
    2
    Location:
    Auckland, New Zealand
    @jpharvey Thanks for finding this. Have you submitted a support request with this information? There a a few people who would like this fixed officially.
     
    mminehan, May 7, 2020
    #20
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.