You are here

Meshchat Replication on Another Server

4 posts / 0 new
Last post
K3GX
Meshchat Replication on Another Server

I'm trying to install meshchat 1.0 on another RPi attached to the same node where I have an existing RPi and meshchat installation. I would like to replicate the meshchat installation on the new RPi and remove the installation on the previous RPi.

In order to do the database transfer, I thought that all I would need to do is install meshchat on the new RPi and make sure the $pi_zone and $local_meshcat_node were the same. They were set up as 'LARKMeshChat' and 'localnode' respectively. I also set up a DHCP address reservation in the node for both RPi units and created a link to both, with one called LARKMeshChat and the other LARKMeshChat2. I found that I could get into both meshchat applications just fine from the node. However, the new installation never recognized that the old installation was on the mesh and never synchronized the database.  When I tried to post a new message on the new RPi, I got the error "Error sending message: Could not get lock."

The new RPi is hard wired to the LAN port of the mesh node with the following configuration:
Eth0: inet 10.165.55.75 net mask 255.255.255.248 broadcast 10.165.55.79
wlan0: inet 10.0.0.15 netmask 255.255.255.0 broadcast 10.0.0.255

While Eth0 is connected to the mesh, wlan0 is connected to my home network. This seems to work, even with both ip addresses in the 10.x.x.x space. Could this be the problem.

Just for kicks, I copied the /var/www/meshchat/db/messages.LARKMeshChat database over to the new RPi. Stil didn't work.  I also copied an image in the /var/www/meshchat/files over to the new RPi. The file didn't show up under "Files" in the new meshchat.  I then re-installed meshchat and found that it didn't touch the copied database other than to change its ownership from pi to meshchat. Still didn't work.

Any ideas?

Thanks,
Dave K3GX

 

AJ6GZ
Versions

"Error sending message: Could not get lock." is indicative of running MeshChat on Raspbian version Stretch. Search the forums for the fix for that, I think it was file permissions and some other step. Or downgrade the new pi to Jesse.

Your network setup should be ok. I like to put the actual node name instead of 'localnode' so I'm sure as to where it is going.

The node host names can be LARKMeshChat and LARKMeshChat2 but under 'Advertised Services' both need to be 'LARKMeshChat'. They need to match your pi_zone setting.

Ian

K3GX
Thanks Ian. I searched the

Thanks Ian. I searched the forum and learned how to modify Apache2 in order to get MeshChat to work with Stretch. After rebooting the RPi, all is well.

One note though on your 'Advertised Services.' The AREDN software will not let you create two identically named Advertised Services, even if they are on another server connected to the node. This makes it difficult to migrate the database to a new RPi unless you connect the two RPis to separate nodes. It would be nice if you could bring another RPi up on the same node with the same configuration so the databases could sync, and then take the old one offline.

Dave

AJ6GZ
Yeah I had a feeling it won't

Yeah I had a feeling it won't let you have duplicates. You might be able to configure a "MeshChat2" for the new one and point the first pi instance at that, and just not configure an advertisement for the first one? Else... back to replicating the file system. :)

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer