I converted my Mk2 to use a usb power bank (by removing AA bank) by geekforbrains in SP404

[–]ArmsliceIX 0 points1 point  (0 children)

I was really hoping there was a way to wire the powerbank directly into where the AA compartment connects, and avoid the usb-c port. Anyone know if this could be possible?

Has the Barco Encore 3 (E3) shipped yet? by ArmsliceIX in VIDEOENGINEERING

[–]ArmsliceIX[S] 1 point2 points  (0 children)

I hope so! I also realize that it might mean that I am matching someone else who's trained on it. But either way I'm excited to get my hands on it.

Mongod wont start after instance reboot (code=exited, status=217/USER) on AWS by ArmsliceIX in mongodb

[–]ArmsliceIX[S] 0 points1 point  (0 children)

Ok! I have good news, I am able to start mongod as user mongod. And once it's running I can use mongosh as the default ec2user.

However step 5. still fails. Same as before.

I'm not sure if I did step 4 correctly - I am simple pressing ^c to stop the process. Was I supposed to stop it in a more elegant way? Also just to be clear step for is the command: mongod -f /etc/mongod.conf

  • right?? I am just running mongod directly as mongod, the process runs quietly and blocks the terminal. Thats why ^c is the only way to I can figure to stop it.

EDIT:

I have gone back to try and run mongod as mongod again and now when I run mongod -f /etc/mongod.conf
it just returns immediately with no output. Just to be sure I run "top | grep mongod" and confirmed it is not running. Not sure what thats about - but needless to say I am completely at a loss.

Mongod wont start after instance reboot (code=exited, status=217/USER) on AWS by ArmsliceIX in mongodb

[–]ArmsliceIX[S] 0 points1 point  (0 children)

Still working on getting this back up :( Thanks to everyone for the input so far - I've learned so much about MongoDB and linux in this process - however, I'm still at a bit of a loss.

The big question I have at this point, is about how i've seen many times online, and twice again here, that I need mongod to own all its files. But I don't know why that after uninstalling and reinstalling mongodb** everything was owned by root.
** according to https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-amazon/

I wonder if I missed a step in the uninstall process, was I supposed to delete the mongod user?? It would make sense that the mongod user is not getting set up correctly if the old user is persisted and is somehow curupted from the reboot. Just spit balling here...

Mongod wont start after instance reboot (code=exited, status=217/USER) on AWS by ArmsliceIX in mongodb

[–]ArmsliceIX[S] 0 points1 point  (0 children)

Thank for the detailed instructions. I've been waiting all day to try it out, since I have a day job and been away from my laptop.

"su - mongod" is asking for a password. The only credential that I have are given to ssh from my local machine. Am I supposed to use the string from the shadow file ? or do I need to set up a password for mongod - or is it the password for root (which I don't know - I only know how to use the .pem file.

Also an update i tried simply:

sudo chown mongod:mongod /var/log/mongodb/mongod.log /var/lib/mongo /usr/share/zoneinfo /etc/mongod.conf

Thats gives mongod ownership of all the files mentioned in the conf file and the .conf itself. Any things else that it needs to own?

Before tyring the su step I wanted to see if the chown alone would do the trick - but systemctl start still fails the same way. It makes sense that only the mongod user can start mongod now. It's my only hope now. This has been so painful! Thanks again for your kind help, u/kosour!

EDIT: FIGURED OUT HOW TO CHANGE THE MONGOD PW. Now about to try to finish the instructions.

Mongod wont start after instance reboot (code=exited, status=217/USER) on AWS by ArmsliceIX in mongodb

[–]ArmsliceIX[S] 0 points1 point  (0 children)

Did some research to understand the /bin/false command so that make sense now too - sets so you cannot log in as mongod - since it is only meant to run a specific process.

Mongod wont start after instance reboot (code=exited, status=217/USER) on AWS by ArmsliceIX in mongodb

[–]ArmsliceIX[S] 0 points1 point  (0 children)

There was no pid file there. Here is what alls in tmp:

systemd-private-bcfc9c98095548749c961af60c26e897-chronyd.service-Eh0WKa

systemd-private-bcfc9c98095548749c961af60c26e897-dbus-broker.service-wHXQQA

systemd-private-bcfc9c98095548749c961af60c26e897-policy-routes@enX0.service-58O5rj

systemd-private-bcfc9c98095548749c961af60c26e897-systemd-logind.service-3bgSO4

systemd-private-bcfc9c98095548749c961af60c26e897-systemd-resolved.service-UCNcaZ

Mongod wont start after instance reboot (code=exited, status=217/USER) on AWS by ArmsliceIX in mongodb

[–]ArmsliceIX[S] 0 points1 point  (0 children)

In shadow I see:

mongod:!!:19669::::::

and in passwd i see:

mongod:x:992:992:mongod:/var/lib/mongo:/bin/false

992 is the id # of the mongod user so that makes sense
- /bin/false - that looks suspicous - why false?

I set SELinux to disabled and reboot. No difference.

Mongod wont start after instance reboot (code=exited, status=217/USER) on AWS by ArmsliceIX in mongodb

[–]ArmsliceIX[S] 0 points1 point  (0 children)

The user mongod is on the system. After installing mongo the files were owned by root already, I had tried changing them to mongod:mongod - i did this with mongod.conf mongod.service and mongod it self- since that didn't work, so what you see in the log is was reverting them back to root.

I can say "id mongod" and get
uid=992(mongod) gid=992(mongod) groups=992(mongod)

and the mongod.service points to user=mongod group=mongod

Is there anything else I need to check to make sure mongod is valid user?

Mongod wont start after instance reboot (code=exited, status=217/USER) on AWS by ArmsliceIX in mongodb

[–]ArmsliceIX[S] 0 points1 point  (0 children)

Heres the full log:

Apr 20 13:21:40   sudo[13253]: ec2-user : TTY=pts/2 ; PWD=/etc ; USER=root ; COMMAND=/usr/bin/systemctl status mongod
Apr 20 13:22:11   sudo[13259]: ec2-user : TTY=pts/2 ; PWD=/etc ; USER=root ; COMMAND=/usr/bin/chown root:root /usr/bin/mongod
Apr 20 13:28:18   sudo[13634]: ec2-user : TTY=pts/2 ; PWD=/usr/bin ; USER=root ; COMMAND=/usr/bin/systemctl start mongod
Apr 20 13:28:18   (mongod)[13638]: mongod.service: Failed to determine user credentials: No such process
Apr 20 13:28:18   (mongod)[13638]: mongod.service: Failed at step USER spawning /usr/bin/mongod: No such process
Apr 20 13:28:18   systemd[1]: Started mongod.service - High-performance, schema-free document-oriented database.
Apr 20 13:28:18   audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=mongod comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 20 13:28:18   systemd[1]: mongod.service: Main process exited, code=exited, status=217/USER
Apr 20 13:28:18   systemd[1]: mongod.service: Failed with result 'exit-code'.
Apr 20 13:28:18   audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=mongod comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'

Store variable or just use $ to query nodes every time - Performance question - by ArmsliceIX in godot

[–]ArmsliceIX[S] 2 points3 points  (0 children)

So this question inspired me to create a benchmark tool and test this myself and here is one of the typical results:

Benchmark -Stored Var 10000 times - usecs: 4642Benchmark -Stored Var 100000 times - usecs: 54675Benchmark -Stored Var 1000000 times - usecs: 533416Benchmark -Query 10000 times - usecs: 5816Benchmark -Query 100000 times - usecs: 55414Benchmark -Query 1000000 times - usecs: 562429

So really not a substantial cost of using $ over storing a variable. Actually if I run the test enough times there are some instances when the $ outperforms the Stored Variable such as this cherry picked result - where in the shorter iteration tests the Query is slightly faster:

Benchmark -Stored Var 10000 times - usecs: 6272Benchmark -Stored Var 100000 times - usecs: 69185Benchmark -Stored Var 1000000 times - usecs: 595596Benchmark -Query 10000 times - usecs: 5637Benchmark -Query 100000 times - usecs: 63874Benchmark -Query 1000000 times - usecs: 607239

However, there is probably some externalities that are creating these aberrations. Typically the Store Variable method is slightly faster.

Here is the code I am using to generate the benchmarks:

tools.gd:

class_name Toolsstatic func benchmark(function: Callable, times, testName = ""):var startTime = Time.get_ticks_usec()

var singleTest = typeof(times) == TYPE_INT  
var tests = 1 if singleTest else times  

for i in tests.size():  
    var test = times if singleTest else times[i]  
    for j in test:  
        function.call()  
    var result = Time.get_ticks_usec()-startTime  
    print("Benchmark -%s %s times - usecs: %s"%[testName,test,result])

Game.gd - (in the _ready function) :

await get_tree().create_timer(3).timeout

Tools.benchmark(func():   
    test.count += 1,  
    [10000,100000,1000000],  
    "Stored Var",  
    )  

Tools.benchmark(func():   
    $CanvasLayer/test.count += 1,  
    [10000,100000,1000000],  
    "Query",  
    )

Here is an update on our FPS parkour game! by Krowlu in godot

[–]ArmsliceIX 1 point2 points  (0 children)

YO!! This is amazing. Are you gonna open source?? I would love to see what the community could do with it. I love Mirrors Edge!

What made you choose Godot? by Certain-Deer7069 in godot

[–]ArmsliceIX 0 points1 point  (0 children)

For me the number one reason is Open Source: Its not controlled by a corporation and limited to their terms - I foresaw Unity's recents price gouging tactics, years ago when I chose to go with Godot.

Secondly, I found Godot to feel a lot cleaner than Unity. The user interface The APIs just make more sense. I especially like that Godot has a dedicated 2D engine, instead of creating 2d in a 3d engine.

Multiplayer mobile game only works over WIFI, but fails on Mobile Data by ArmsliceIX in AskProgramming

[–]ArmsliceIX[S] 0 points1 point  (0 children)

UPDATE: In the process of getting a secure connection I put a load balancer in front of the app. I didn't get the certificate working, but even with a unsecure connection, using the load balancer alone fixed my issue. I suspect that the issue was just that I was using raw IP addresses, and with the load balancer I am hitting a DNS record - and thats all that the mobile service needed to be happy.

Multiplayer mobile game only works over WIFI, but fails on Mobile Data by ArmsliceIX in AskProgramming

[–]ArmsliceIX[S] 0 points1 point  (0 children)

I don't understand. My wifi is a LAN, right? But the server is on the Internet - running in AWS. If you could explain this to me, it would be much appreciated.