You are here

Raspberry Pi and MeshChat Lock Sync Errors

10 posts / 0 new
Last post
AA0Z
Raspberry Pi and MeshChat Lock Sync Errors
I'm slowly getting everything installed on my nodes, but having trouble with getting MeshChat to work on a Pi and sync messages.

I've installed MeshChat successfully on AA0Z-1 node, and it's running great.  AA0Z-1 meshchat zone is MeshChat-3791 which I'm trying to sync messages to from the Pi.

I've installed the API package on AA0Z-2 but have no way of telling if it's running?

Here is a link to some screen shots on the configuration and errors.

https://drive.google.com/drive/folders/118Ec2fo85GRDFiKthyNTOPY71gZ_SX49?usp=sharing

My configuration on the Pi is...

pi_zone = MeshChat-3791
local_meshchat_node = AA0Z-2.local.mesh (I've tried AA0Z-2 and AA0Z-2.local with no luck)

 
KD0IOE
I had the same issue
Same issue today - you have to turn off PrivateTmp on Apache. Copy file, modify, reboot pi.

https://www.maxoberberger.net/blog/2017/10/debian-9-private-tmp.html

 
K6CCC
K6CCC's picture
Testing MeshChat

You did not make your Google files public, so we can't see them.
I am also running MeshChat on a RasPi-3b.  As far as I can tell, the best way to make sure that messages are syncing is to connect to your MeshChat and send a message, then connect to another MeshChat (that should be syncing with yours), and send a message.  Both messages should show up on both MeshChat installations.  In the screen capture below, I sent  message from my MeshChat and two minutes later from AJ6GZ.  Both messages appeared on both installations after a few minutes.  Therefore, I knew it was working.  I do this every time I do a firmware update on the hAP that thi Pi is connected to.

 

AA0Z
Sorry for not making the
Sorry for not making the screen shots public.  Looks like after you make a topic post, then on your 2nd post in that same forum, you can upload pictures.  I wasn't able to upload on the initial post, so here are the screen shots.

I have not tried the apache Privatetmp work around yet...I'd like to find a solution where I"m not modifying any apache files on the Pi.

 
Image Attachments: 
KD0IOE
Unfortunately, I couldn't
Unfortunately, I couldn't find a way around fixing that PrivateTmp setting. I was hoping also for a solution that was simpler. The error you're getting, now that I can see it, is EXACTLY what I was seeing on a fresh Pi install (Pi2 with Debian 10/Raspbian Buster).

Be sure to do the copy operation though, that will persist your changes across Apache package updates on the Pi. You are essentially providing an override to the default systemd file for Raspbian.

There is another option, to modify the meshchatconfig.pm file to move the path, but that may be changed in MeshChat package versions.
K6CCC
K6CCC's picture
No changes to Apache needed

I absolutely did not have to make any changes to Apache in order to get MeshChat to work on my Pi.  In fact, I am running a webserver on the Pi in addition to the MeshChat installation.
I can't tell you what that error message is indicating.  I do find it interesting, that MeshChat does not show you as a connected user.
Did you do the two required MeshChat config settings in /usr/lib/cgi-bin/meshchatconfig.pm on the Pi?
 

KD0IOE
I absolutely did not have to

I absolutely did not have to make any changes to Apache in order to get MeshChat to work on my Pi.

If you are running older versions of Raspbian (Stretch I believe) this was not necessary. It is only in the latest Raspbian build that the Apache change becomes necessary.
K6CCC
K6CCC's picture
Stretch vs Buster

If you are running older versions of Raspbian (Stretch I believe) this was not necessary. It is only in the latest Raspbian build that the Apache change becomes necessary.

That must be it.  Yes, I am running Stretch on the Pi-3b that is running MeshChat.  I am running Buster on my Pi-4 - that's not really doing much right now....
 

AA0Z
Did you do the two required

Did you do the two required MeshChat config settings in /usr/lib/cgi-bin/meshchatconfig.pm on the Pi?


Yes, see my screenshot above with my .pm configuration.  

I can confirm on a new build of Raspbian Buster (Sept 2019) if you complete the steps from the following website, it DOES work.

https://www.maxoberberger.net/blog/2017/10/debian-9-private-tmp.html

Instead of restarting the service (which didn't clear up the issue) I rebooted my Pi and everything is working now.

Here are the basic steps while logged in as user pi.

sudo cp /lib/systemd/system/apache2.service /etc/systemd/system/

sudo nano /etc/systemd/system/apache2.service

Change PrivateTmp = true to PrivateTmp = false

Ctrl-X to Exit
Yes to save changes

Reboot (sudo shutdown -r now)


 

KD0IOE
Sneaky reason it doesn't work

Sneaky reason it doesn't work on restart of Apache (which I learned the hard way and just rebooted):
You need to run

sudo systemctl daemon-reload

​Which will cause systemd to look at it's files again and accept the changes. A full reboot effectively does this.
Hopefully this all can be integrated or worked around in the next release of MeshChat.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer