Delphi Windows Subsystem Linux Debugging not working - linux

I am facing a problem debugging Delphi Linux application on WSL.
I have a machine running Ubuntu 20.04 and WSL Ubuntu 20.04 on my PC.
I create a basic console application.
Real Machine , Debug OK , Run OK , Cmd line OK
WSL , Debug fail , Run OK , Cmd line OK
When i try to debug on WSL delphi deploy application with success but debugger is not started ,There is no message !!
What am i missing ?
I have followed the exactly same installation procedure for paserver on both systems
Delphi 10.4.2.
Windows 10 Professional
Thanks for your help

After update to WSL2 everything works fine .
I had to edit the batch running the GUI with x410 ( /public )
and the code to get server address export DISPLAY=$(route.exe print | grep 0.0.0.0 | head -1 | awk '{print $4}'):0.0
Thank you very much #Brian
start /B x410.exe /desktop /public
Ubuntu2004.exe run "if [ -z \"$(pidof xfce4-session)\" ]; then export DISPLAY=$(route.exe print | grep 0.0.0.0 | head -1 | awk '{print $4}'):0.0; xfce4-session; pkill '(gpg|ssh)-agent'; fi;"

Related

child_process is not executing on ec2 nodejs server

I have node server which is on an ec2 instance running Ubuntu.
I maintain code on Gitlab and push updates there.
The manual updating process is to simply pull the changes and restart the server which I want to automate and for that I am using Gitlab webhook and created a simple endpoint which executes:
childProcess.exec('git pull && bash deploy.sh',{ cwd: '/home/ubuntu/someXyzFolder' }, function(err, stdout, stderr){
if (err) {
return res.status(500).send(err);
}
res.status(200).send("OK");
});
So childProcess is not able to execute these commands as its sending 500 status with this error:
{"killed":false,"code":1,"signal":null,"cmd":"git pull && bash deploy.sh"}
several people have suffered from this problem and solved it by creating a swap due to low memory
I ran free command on my server which replied back
ubuntu#ip-xxx-xxx-xxx-xxx:/var/somefolder/somefolder$ free
total used free shared buff/cache available
Mem: 1007532 404276 381512 772 221744 452944
Swap: 0 0 0
According to this, I should be having enough ram right?
I am not sure whether Linux oom is killing it or something else.
Do let me know your thoughts on it.
-Thanks
EDIT: here is my deploy.sh
git pull
npm install
gulp build
sudo killall forever
sudo killall node
rm /removeTheSymlinkOfTheCurrentBuildFolder
ln -s /makeaNewFolderWithCurrentTimeStamp/`ls -ltr /some | tail -n 1 | awk {' print $9 '}` /andMakeItCurrent
sudo forever /currentBuildFolder/server.js &
So, I finally fixed the issue.
The ssh was generated with when I logged in as the user ubuntu and then stored in Gitlab.
I was opening my 2nd server ( which would kill and restart my main server ) using sudo which was creating the issue.
Now everything seems to be working fine.

issues running Powershell script on Linux

Following this guide:https://b-blog.info/en/monitoring-azure-resources-with-zabbix.html
On Windows getting output from script, but when executing on Zabbix (Centos 7) just getting only "data". No SELinux, no Firewall
pwsh azure.discovery.sql.databases.ps1 rg 111-222-222244-99
{"data":}
Authentication is working because azure.json contains token and it's identical to file on Windows machine
Installed Powerhell 6.0.2 for Linux
Anything missing here ?
Output from Win 10 Lap-top:
.\2.ps1 rg 111111
https://management.azure.com/subscriptions/9111111/resourceGroups/rg/providers/Microsoft.Sql/servers/mojsql/databases?api-version=2014-04-01
{"data":{
"{#RGNAME}": "rg",
"{#ID}": "/subscriptions/111111/resourceGroups/rg/providers/Microsoft.Sql/servers/mojsql/databases/mojabaza",
"{#SERVERNAME}": "mojsql",
"{#DATABASENAME}": "mojabaza"
Zabbix is run on as Hyper-V VM hosted on Windows Lap-top from which i can get output
finally found what was issue:
on my lap-top i had to substitute .content.properties with Value (original script didn't yield any results-i first tested it on windows) and just copied it to Linux.
Then just reverted back (replaced Value with .content.properties) and it started working

Can't Debug App on emulator

I am using Android Studio 2.2.2 and ran the app on emulator Nexus_5_5_API_23
The app runs very well on emulator, but I can't debug it on emulator:
Here is my console log:
$ adb shell am start -n
"mmstart0312.com.webrtc_android/mmstart0312.com.webrtc_android.MainActivity"
-a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D Waiting for application to come online:
mmstart0312.com.webrtc_android.test | mmstart0312.com.webrtc_android
Waiting for application to come online:
mmstart0312.com.webrtc_android.test | mmstart0312.com.webrtc_android
Waiting for application to come online:
mmstart0312.com.webrtc_android.test | mmstart0312.com.webrtc_android
What's wrong?
In Android-Studio : File -> Invalidate Caches / Restart
May The Code Be With You!
solved by attaching debugger to Android process once

Error on neo4j server start on arch linux

I have an arch linux setup and installed neo4j through the arch user repository (yaourt -S neo4j), and I'm able to run the web console fine (sudo neo4j console with seemingly normal output and full functionality), however when trying to start the server (sudo neo4j start), I encounter the following error message:
/usr/share/neo4j/bin/utils: line 345: [: -lt: unary operator expected
Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=/etc/neo4j/neo4j-server.properties -Djava.util.logging.config.file=/etc/neo4j/logging.properties -Dlog4j.configuration=file:/etc/neo4j/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled
Starting Neo4j Server...cat: /run/neo4j/neo4j-service.pid: No such file or directory
process []... waiting for server to be ready. Failed to start within 120 seconds.
Neo4j Server may have failed to start, please check the logs.
rm: cannot remove ‘/run/neo4j/neo4j-service.pid’: No such file or directory
There's no delay before the error message is printed, so it seems to be something other than the timeout. I'm quite new to neo4j (I worked through a fair bit of the user manual using the web console, but no development or server config experience), so I'm not really sure what else might be relevant. I tried looking through the utils script and the error appears to be where it attempts to su neo4j, but it also seems to proceed to attempt to start the server. I also tried changing the port it's starting on as in this question, but no change. The only log I can find just has this over and over (with appropriate timestamps):
Oct 15, 2014 1:33:49 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.9 09/02/2011 11:17 AM'
Any help at all would be appreciated!
EDIT:
The line 345 that it's failing on is the end of this snippet:
if [ $UID == 0 ] ; then
OPEN_FILES=`su $NEO4J_USER -c "ulimit -n"`
else
OPEN_FILES=`ulimit -n`
fi
if [ $OPEN_FILES -lt 40000 ]; then
From doing some echo debugging, it seems that su $NEO4J_USER is failing, probably because $NEO4J_USER is set to neo4j, a user that does not exist on my system. I tried setting that to root in one of the config files, but evidently that's not working properly. Arch is a continual learning experience for me, but I've not had to add a new user before to get software working.
The interesting line here is:
/usr/share/neo4j/bin/utils: line 345: [: -lt: unary operator expected
I assume that is caused by a wrong default shell for the neo4j user. What default is currently set for the neo4j system user? Try to switch that to bash. The startup scripts should work nicely with bash.

can't run vim-ruby-debugger(rails3). any choices to run?

:Rdebugger - running, but server doesn't start automatically
:Rdebugger 'script/rails server' -- E77: Too many file names
tryed just to run :Rserver - failed. I don't have 'rails server -d' working at all- after start rails stops without any errors. In common everything works(from console).
Env - Mac Os X 10.6.6, macvim 7.3, zsh, rvm, ruby 1.8.7(as default)
did you try this?
:Rdebugger 'rails s'
or
:Rdebugger './script/rails server'

Resources