I’m struggling to fire up jupyterhub, running with limited sudo rights, without root privileges. If I understand correctly, this makes it possible to run notebook servers as real system users on a shared system without running the Hub itself as root. I followed the following steps, but for someone reaso…
Tag: linux
Sending to a Datagram socket, without blocking indefinitely
We have some code to send metrics to a SOCK_DGRAM where another daemon listens and aggregates/proxies these messages. Opening the socket looks like: And at the moment we write to it like: I want to ensure the call above doesn’t block for very long (or at the very least doesn’t block indefinitely),…
How to restart if NodeJS API service failed?
I’ve the similar NodeJS code: cluster.js As you can see in the above code I’m using NodeJS Manual cluster method instead of PM2 cluster, because I need to monitor my API via Prometheus. I’m usually starting the cluster.js via pm2 start cluster.js, however due to some DB connection our app.js…
C Threaded Sockets – tcp with TLS, Can’t get ip/ether packet headers
thanks for reading this question. Have been working for a while on C sockets – specifically c threaded tcp sockets with tls. Using the Openssl API. I have been facing an issue for some time now where I can get the source IP and Port – e.g printf(“Connection: %s:%dn”,inet_ntoa(d->add…
Connect Python to Remote DB2 Server
Using Python’s DB2 API, ibm_db, I am attempting to connect to a remote DB2 server (at IP address 10.0.0.001 which I can successfully ssh into). Both client and server machines are Linux / Ubuntu 16.0 LTS. In all my attempts and solutions, I continually run into the regular SQL1639N error. Python 3.5 (at…
having an issue with my bash script
im writing a script that allows the user to create a backup of a file they choose by allowing them to input the file name. the file will then have backup followed by being date stamped at the end of it’s name and saved on the home drive. but whenever i try to run it i get an error: cp:
what is “synchronising point” in multi threading?
I need to decide on how many counting semaphores needs to be used for one of the multi threaded application. I came to know, if we know synchronising points then we can decide the number of semaphores to be used. What are synchronising points? Answer A synchronization point is a place in the flow of execution…
Mac equivalent for find -printf
Is there a MacOS terminal equivalent to Mainly, I want to replicate the -printf behaviour on a Mac. Answer The unix command line tools Apple ships are terribly outdated; sometimes 12 or 15 years old. You can install find from Macports: That version of find has the -printf option.
‘Housekeeping’ script to create folder and move files
I have been trying to investigate how to automate a script (shell or other) that periodically (once an hour for example) moves files with a constant naming convention to a folder (which is automatically created if not already there). The files are like this: Camera1_01_20171213221830928.jpg Camera1_01_2017121…
How to fix MongoError: unsupporter server version?
I am trying to run a Node.js server with MongoDB. I followed the tutorials closely. Here is my app.js file: ` When I try to run it, however, I get the following error: How can I fix this? My package.json file says I am using version ^3.0.0-rc0. I cant seem to find a solution anywhere online. Answer Upgrade to…