Giter Site home page Giter Site logo

Segmentation fault on MacOS about meshagent HOT 6 OPEN

ylianst avatar ylianst commented on June 8, 2024
Segmentation fault on MacOS

from meshagent.

Comments (6)

luckydonald avatar luckydonald commented on June 8, 2024

Edit: "Unable to open database" might be related to #9?

from meshagent.

krayon007 avatar krayon007 commented on June 8, 2024

The other thread, he got unable to open databsase because he tried to run another instance of the agent from the same folder, while the service was still running...

Did you copy the executable into a .bak file? The agent appends .db to the end of the executable path, and uses that for the db location, so I'm not sure why it would say unable to open database. I just tried that on my system, and it just says there is no .msh file.

On a side note, I'll look at the uninstall script to make sure it actually stops the service. If you want to manually stop the service, use the command: launchctl stop meshagent

Either way, I'll see what happens on MacOS, when I run two overlapping instances (which will force the db error), and see if I can get it to crash, because it's not supposed to crash when that happens, it's supposed to just give up and exit.

from meshagent.

luckydonald avatar luckydonald commented on June 8, 2024

Can I somehow send you a crash report to help?

I duplicated it to .bak so I'd still have it after the the uninstall script ran.
Yeah, the uninstall script stopped the original service (/bin/launchctl unload /Library/LaunchDaemons/meshagent_osx64_LaunchDaemon.plist, and deleted a bunch of files.

So what I did after a normal install:

$ cp /usr/local/mesh_services/meshagent/meshagent_osx64 /usr/local/mesh_services/meshagent/meshagent_osx64.bak
$ ~/Downloads/MeshAgent.mpkg/Uninstall.command
# now the above

from meshagent.

luckydonald avatar luckydonald commented on June 8, 2024

Tried running that command now, the uninstaller seem to have been thorough enough:

mac:~ luckydonald$ launchctl stop meshagent
launchctl stop error: No such process
mac:~ luckydonald$ sudo launchctl stop meshagent
Password:
launchctl stop error: No such process
mac:~ luckydonald$

from meshagent.

luckydonald avatar luckydonald commented on June 8, 2024

Turns out I needed to run sudo as apparently the .db file is not accessable otherwise.

mac:~ luckydonald$ sudo mv /usr/local/mesh_services/meshagent/meshagent_osx64.bak /usr/local/mesh_services/meshagent/meshagent_osx64
mac:~ luckydonald$ /usr/local/mesh_services/meshagent/meshagent_osx64
MeshCentral2 Agent
Unable to open database (1/10)...
Segmentation fault: 11
mac:~ luckydonald$ sudo /usr/local/mesh_services/meshagent/meshagent_osx64
MeshCentral2 Agent
Connecting to: ws://meshcentral.example.com:80/agent.ashx
Protocol Error encountered...
Protocol Error encountered...
Mesh Server Connection Error
AutoRetry Connect in 1925 milliseconds
Connecting to: ws://meshcentral.example.com:80/agent.ashx
Protocol Error encountered...
Protocol Error encountered...
Mesh Server Connection Error
AutoRetry Connect in 2675 milliseconds

The Websocket stuff might be related to a misconfiguration of my nginx reverse proxy, and is out of scope of this issue, I'll open another one if I get problems with resolving that.

However, I keep the ticket open because of the segmentation fault. If that is solved, a permission check on the required files would help users what is going wrong.

from meshagent.

luckydonald avatar luckydonald commented on June 8, 2024

I had to also do

sudo nano /usr/local/mesh_services/meshagent/meshagent_osx64.msh

and change

- ws://example.com:80/agent.ashx
+ wss://example.com:443/agent.ashx

for it to finally work.

from meshagent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.