Realm browser is not opening because of another process - swift

I am getting this error message when I want to start up the Realm browser:
'Realm file is currently open in another process which cannot share access with this process. All processes sharing a single file must be the same architecture. For sharing files between the Realm Browser and an iOS simulator, this means that you must use a 64-bit simulator.'
I closed all applications and even re-started the computer, so which process is this that is running there? It's been working all fine before.

You can check which process is using a file. On MacOS and Linux you can do it this way (replace myfilename with your actual database name):
lsof | grep myfilename.realm
You can kill the process using the file if needed.
If no process is running and the error still appears, you can safely delete the myfilename.realm.lock file.

I was able to open the file after stopping the app running on simulator/device.

Related

how do I delete weblogic portal domain directory

I am working on setup scripts for a weblogic portal domain. This requires me to create the domain / delete / try again many times. However I have found that when I start the server and kill it I can not delete the folder where the domain is saved (C:\portal-10.3.7\user_projects\domains\myDomain). There are some .DAT files which are used as part of some persistent file store and they keep getting created even when I kill the servers (C:\portal-10.3.7\user_projects\domains\myDomain\servers\AdminServer\data\store). Only way I can delete them is if I restart my computer. Ive tried killing processes from task manager and shutting down services but I cant seem to figure out what keeps generating these files. Other developers using the domain setup scripts have the same complaint.
Edit:
I found using a tool called "Process Explorer" that there is a process that is holding the file.
Process explorer mentions that PID #4 is using the file
When I run tasklist I can see that PID #4 has:
Image Name=System
Session=Services
I looked around and found this PID #4 is 'NT Kernel & system' so I cant kill it or the whole system will go down. Not sure if there is a specific dll I can kill or find which dll holds the file and just shut that down
I went so far as to download systinternals handle tool (microsofts own tool). Able to find the handle identifier but microsofts own tool is not able to release the handle. Infuriating how much time I have wasted.
edit ...
Last thing to mention and I officially give up. When I start the server I can see the servers java process owns the handle. When I shut down the server (using either the shutdown script or by killing the java process) I can see the system processes with PID 4 takes over the handle to the file.

LocalDeployer: app working directory

I have an app that creates a file temporarily, does not delete it. I was hopping to see the contents of the file while running.
The app is deployed using the local deployer, does any body knows where would it create the file??
I tried the temp path, and also the working directory where the out and error logs are... nothing, the app does seem to be erroring, that would be on my normal console log.
Running on unix, temp is at /tmp.
thanks
You can control this location via the local deployer property workingDirectoriesRoot and deleteFilesOnExit.
For more information, you can refer this doc:
https://docs.spring.io/spring-cloud-dataflow/docs/current/reference/htmlsingle/#configuration-deployer
Actually looking at the code of the local deployer, it seems the location it defaults to is the system temp path (System.getProperty(“java.io.tmpdir”)) and adds the stream id, plus the app id, etc. It is the same folder where the console and error streams write to.
thanks!

how to run swift server single process

I'm trying to run a swift based web server using Kitura on Ubuntu.
This is following command to start hello word server.
.build/debug/helloworld
I can launch standalone process using .build/debug/helloworld &
but launching with that creates multiple process if execute again.
Or I've to kill old process then start new If I want to run only single process.
I've followed following tutorial to get server up running. But don't want to use Bluemix to deploy application. Instead I want to launch it on AWS ubuntu.
http://www.kitura.io/en/starter/gettingstarted.html
I assume there must be more easy and proper way to do this.
As you can see I'm almost newbie for servers.
You have to kill the Kitura process in order to stop a Kitura Server app - there is no other way to stop it.
If you just want to test your server you can run it inside a screen session. Screen is an essential utility for managing remote servers via ssh.
If you want to run it properly as a service/daemon you should look into systemd.

cloudfoundry error pushing to bluemix

I am working my way through an online course from IBM on getting to know Bluemix. The exercise shows how to push an application to Bluemix.
I am running:
cf version 6.18.1+a1103f0-2016-05-24 on a Mac running OS X El Capitan
10.11.5 (15F34)
This is the command I entered:
cf push leonardbMyFirstDeploy3 -c "node app.js" -m 128M --no-manifest --no-start
This is the error I am getting (I have substituted my user name and digits on Mobile Documents folder name).
*FAILED
Error processing app files in '/Users/myname': read
/Users/myname/Library/Mobile
Documents.###########/com~apple~TextInput/Dictionaries/.baseline/UserDictionary/SAlQVUhF7208e6_gvZx_zdKx1U1AzKGem3HO2pLKjgY=/baseline.zip:
bad file descriptor*
I checked the file and yes the file seems to be corrupted. As I understand, this directory is my local location for iCloud sharing on my local disk. I don't know how this dictionary file got there and probably don't need it.
But my questions are these:
For the cloud foundry push command is there a way to generate a trace to get more information?
Why would the push be even looking at or using the file that is giving it problems? This seems like a significant overreach to even be anywhere this this folder. So does anyone know why?
Can anyone advise how to fix this?
I did try to configure a .cfignore using the Mobile Documents.########## directory but this did not seem to change the outcome any as the error recurred.
If the push command gives you OK on certain steps are there any cleanup or rollback commands that need to be executed before running again?
When you run cf push without the -p option, it will recursively push everything in the current directory and under it. So if you were running in /Users/myname when you ran the push, it will have pushed everything underneath it. Try creating a separate directory which contains just your app files and push from there instead.
If you run the cf command without any arguments it will dump a bunch of usage info, including the following environment variable to control debug tracing:
CF_TRACE=true Print API request diagnostics to stdout
Finally you do not have to clean anything up explicitly. If you do as I suggested above and move just your application files into their own directory and run the push from there, it will simply overwrite what you did before.

Remote debugging, creating a server

I'm following some WinDbg instructions from the CodeProject tutorial.
To start a server, I can get this to work from the command line fine:
WinDbg –server npipe:pipe=pipename
(note: multiple clients can connect).
Where do I enter this from the windbg UI? I tried the command browser window, but that didn't seem to do anything:
.server npipe:pipe=pipename
(note: single client can connect)
This question is related to creating the server from WinDbg UI, not connecting from the client.
I am assuming that you are referring to usermode debugging here, so I will respond with that in mind.
From windbg attached to your program that you want to remote:
If you want to use symbols that are cached on the target, then run:
from the Command Window's prompt type .server npipe:pipe=YourPipeName
If you have another machine with with a larger symbol cache, then on the target run:
dbgsrv -t tcp:port=4000
This sets up a thin debug client (a.k.a. remote stub)
Then on the machine running the debugger, open Windbg > File > Connect to remote stub
tcp:server= machine_running_dbgsrv ,port=4000
Now hit F6 and attach to the process you want to debug.
Note: the versions of windbg have to be the same on the machine running dbgsrv and the one running windbg. If they don't match, when you get to part where you hit F6, you end up with no processes in the process list.
Jason
File -> Connect to remote session. Or just use CTRL-R.