You are here

meshcat file storage problem

12 posts / 0 new
Last post
TA1IN
meshcat file storage problem
I installed MeshChat on Raspberry Pi. The file size appears to be 0. I couldn't find this setting in the configuration file. How can I increase the size of this file?


My config:
our $lock_fh;
our $meshchat_path              = "/var/www/html/meshchat/tmp/meshchat";
our $max_messages_db_size       = 500;
our $max_file_storage           = 2 * 1024 * 1024;
our $lock_file                  = $meshchat_path . '/lock';
our $messages_db_file           = '/var/www/html/meshchat/db/messages';
our $messages_db_file_orig      = '/var/www/html/meshchat/db/messages';
our $action_log_file            = '/var/www/html/meshchat/db/action.log';
our $action_error_log_file      = '/var/www/html/meshchat/db/action_error.log';
our $action_messages_log_file   = '/var/www/html/meshchat/db/action_messages.log';
our $sync_status_file           = $meshchat_path . '/sync_status';
our $local_users_status_file    = $meshchat_path . '/users_local';
our $remote_users_status_file   = $meshchat_path . '/users_remote';
our $remote_files_file          = $meshchat_path . '/files_remote';
our $messages_version_file      = $meshchat_path . '/messages_version';
our $pi_nodes_file              = $meshchat_path . '/pi';
our $local_files_dir            = '/var/www/html/meshchat/tmp/web/upload';
our $tmp_upload_dir             = '/tmp/web/upload';
our $poll_interval              = 10;
our $non_meshchat_poll_interval = 600;
our $connect_timeout            = 5;
our $platform                   = 'pi';
our $debug                      = 0;
our $extra_nodes                = [];
our $action_conf_file           = '/etc/meshchat_actions.conf';





 
nc8q
nc8q's picture
How can I increase the size of this file?
My meshchatconfig.pm file is different than yours.
gelmce@nc8q-meshchat:~ $ diff your.pm /usr/lib/cgi-bin/meshchatconfig.pm
2c2
< our $meshchat_path              = "/var/www/html/meshchat/tmp/meshchat";
---
> our $meshchat_path              = "/tmp/meshchat";
17c17
< our $local_files_dir            = '/var/www/html/meshchat/tmp/web/upload'; does this exist and does meshchat have r/w permission?
---
> our $local_files_dir            = '/var/www/html/meshchat/files';
25a26,30
>
> our $pi_zone                    = 'MVMchat'; this is missing from your .pm
> our $local_meshchat_node        = 'localnode'; this is missing from your .pm
>
> 1;

73, Chuck


 
Image Attachments: 
TA1IN
It was due to permission,
It was due to permission, fixed. thank you
TA1IN
It shows the remaining space
I encountered a new problem. It says the file has been uploaded, but the file does not appear. haha. new murphy.
nc8q
nc8q's picture
So that, in the future, others can find help with this issue:
Please edit the original post with the correct spelling of meshchat.
73, Chuck

 
K7EOK
Meshchat is a very small
Meshchat is a very small piece of code and resides easily on an actual AREDN device.  I don't know why people want to host it on other devices but there you go.

File sharing is best done with a program like FileGator ... you have better control and can make folders, keep things organized etc.  Using MeshChat for file sharing means that anyone can delete the file, clog up the node, and the files can only be deleted by accessing meshchat thru the node that they were originally uploaded to. 

I'd leave meshchat for chat and put a file server on the pi.

Ed
 
kf7yrs
Yes,but…
The thing about meshchat is that it is sooo easy to use to transfer files.   Even people who are computer phobic have success.  That's why I keep it on the mesh.
WT0F
Not directly related, but the
Not directly related, but the file sharing capabilities in MeshChat came up as an issue just prior to me taking over as the maintainer for MeshChat. I captured the issue before the old repo had the issues turned off and one can find the discussion here https://github.com/hickey/meshchat/issues/7.

I personally like the idea of separating out the file sharing code from MeshChat to simplify the MeshChat code base and allowing MeshChat to focus on one thing and do it well (better). I can foresee maybe a better solution being a couple of plugins that allow MeshChat to interact with what ever file service there is  to allow users to reference the files easily.

In any event if you have any options or thoughts, please feel free to add them to the issue referenced above.

73
Gerard, WTØF
 
K7EOK
I looked at the link, and I
I looked at the link, and I can tell you 100% I do NOT want the nodes actively sharing files.  Not every node has the same amount of file storage available, and this would make worse the issue that we are having now and then with just the messages themselves not syncing correctly.

Talk about mission creep.  The best is the enemy of the better.  I thought you were going to ask if file storage on meshchat was a good idea or not.  I had no idea folks were talking about even more sync.  Not for me.  Please just keep it simple and reliable.  Ya gotta know when to say no.

Ed
 
TA1IN
As a result, I could not
As a result, I could not solve the problem. Do you have any suggestions?
kf7yrs
"our $max_file_storage = 2 * 1024 * 1024;" sets storage size
I have meshchat on a RPi 3B+ connected to a Mikrotik hAP running the Meshchat api program.   This line in your first post   "our $max_file_storage           = 2 * 1024 * 1024;"     sets the file storage.  See the end of this discussion   MeshChat 2.9 would not re-install after 3.23.12.0 | Amateur Radio Emergency Data Network (arednmesh.org)    where KT0F told me how to set the size.    I think the numbers you have in that line are about 2MB.   I used the numbers KT0F recommended.   I used Raspian,  "2023-12-05-raspios-bookworm-armhf-full.img.xz" , it is for 32 bit machines.  I used Trevor's instructions to load the program and dependencies etc, and everything seemed fine.  The meshchat interface would show up but nothing would save, and I got an error about "not getting a lock".   I followed the excellent advice from post #60 on this Forum page (https://www.arednmesh.org/content/pi-meshchat-error-sending-message?page=1) and it worked!... Everything worked!   Good luck!
Lee

 
nc8q
nc8q's picture
MeshChat: file upload, files list
I assume #10 is following #4.
Did the file actually up load?
Is meshchat File display folder the same as the upload folder?
73, Chuck

 

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer