Remote-SSH Vscode - problem - "tput: No value for $TERM and no -T specified" - c++

Situation:
I'm unable to connect to remote machnie via vscode + remote-SSH.
I CAN though connect to that machine using SSH from any shell.
Before the problem when I shut down my machine there was mandatory Windows update...
First error I get in terminal just after "You are connected to: [company-servername]" is:
After this there is never-ending error log whit most errors are similar to:
What I have already tried:
reinstalling Remote-ssh
killing vscode remote-server
making additional space on remote
running without any extensions except remote-ssh
reinstalling vscode
deleting all vscode config files and reinstalling
deleting vscode config files on remote in my home
I'm a bit stuck here, and our foreign 'Support' isn't very supportive...
maybe anyone had similar problem or has any idea?

FYI I managed to fix the problem which was really trivial...
Some facts:
Problem was with REMOTE SERVER not VSCODE
As "tput: no value for $TERM" suggested something 'with terminal'
So what I did was clean my .bashrc to some generic sample. And it worked.
After investigation I figured that in my .bashrc I have
source /somepath/myAliases
which causes the problem. So what in that file was wrong?
In 'myAliases' there was broken alias where I used invalid quotation:
alias name='some commands' #OK
alias name="some commands" #OK
alias name=`some commands` # <-- this caused error shown above.
I hope this explanation may be of some use to any of you.
BR

Related

Unable to start process C:\Program Files\dotnet\dotnet.exe. The web server request failed with status code 502. Error in Visual Studio 2017

I am facing a strange issue while building a solution which has web projects. I get the error below. Any solution or thought on it.
Fixed by adding forwardWindowsAuthToken="false" in the web.config file.
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" forwardWindowsAuthToken="false" stdoutLogEnabled="false" />
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/aspnet-core-module
I faced the same issue here
How I fix
(1) Open Event Log. I noticed that there is a warning: 'Static compression is being disabled'.
(2) Follow the 2 links to fix this issue
https://forums.iis.net/t/1195656.aspx?The+directory+specified+for+caching+compressed+content+is+invalid+Static+compression+is+being+disabled+
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc735199(v=ws.10)
(3) Open TOOLS -> Options -> Projects and Solutions
Enable 'Use the 64 bit version of IIS Express for web sites and projects' (My system is 64 bit)
I am not very sure what happen exactly. But this helps me to fix this issue. Hope it can help you as well.
Turned out that my web.config file got changed. It had configurations set for deployment which were not available to me. Restoring the web.config file fixed this issue.
Deleting the .vs folder has fixed the problem for me.
It looks like an old question and most of the answers look ok. To resolve the similar issue, I added AllowedServerVariables in vs -> ->config ->applicationhost.config file as below
if you have dotnet core >=2.2 just add the following to your project
<PropertyGroup>
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
</PropertyGroup>
You possibly have a url reservation configured for that particular endpoint that could be conflicting. You can see the list of these by running the following command at an elevated cmd prompt:
netsh http show urlacl
You can delete the offending one like so:
netsh http delete urlacl http://+:59090/

Virtualbox “Callee RC: REGDB_E_CLASSNOTREG” (0x80040154)?

I was getting the Virtualbox problem
Callee RC: REGDB_E_CLASSNOTREG” (0x80040154)
all of a sudden. Problem started on VirtualBox 4.3 (I think). I upgraded to version 5 hoping to fix it but had no luck at that point.
My solution:
Check your directory C:\Users\yourname\.VirtualBox\ (yourname is in fact your username.)
On my PC there was a VirtualBox.xml with size of 0 Kb.
Also there was a VirtualBox.xml-prev with a size of 3 Kb.
Dates where somewhere around the time the problem started...
Renaming the VirtualBox.xml-prev one to the VirtualBox.xml SOLVED my issue.
For those without an xml file, here is my xml file, hopefully it helps .....
<?xml version="1.0"?>
<!-- ** DO NOT EDIT THIS FILE. ** If you make changes to this file while any VirtualBox related application ** is running, your changes will be overwritten later, without taking effect. ** Use VBoxManage or the VirtualBox Manager GUI to make changes. -->
-<VirtualBox version="1.12-windows" xmlns="http://www.innotek.de/VirtualBox-settings">
-<Global>
-<ExtraData>
<ExtraDataItem value="general,system,previewClosed,display,storage,audio,network,usb,sharedFolders,description" name="GUI/DetailsPageBoxes"/>
<ExtraDataItem value="m=59397901-1440-48ea-8781-6f86d06c7fbb" name="GUI/GroupDefinitions/"/>
<ExtraDataItem value="m=Sharepoint" name="GUI/LastItemSelected"/>
<ExtraDataItem value="415,153,770,550,max" name="GUI/LastWindowPosition"/>
<ExtraDataItem value="D:/virtualbox" name="GUI/RecentFolderHD"/>
<ExtraDataItem value="D:\virtualbox\Sharepoint.vdi;" name="GUI/RecentListHD"/>
<ExtraDataItem value="334,1261" name="GUI/SplitterSizes"/>
<ExtraDataItem value=",confirmGoingScale,remindAboutAutoCapture,remindAboutMouseIntegration,showRuntimeError.warning.HostAudioNotResponding,confirmInputCapture,warnAboutInaccessibleMedia" name="GUI/SuppressMessages"/>
<ExtraDataItem value="53" name="GUI/UpdateCheckCount"/>
<ExtraDataItem value="1 d, 2015-08-19, stable, 5.0.0" name="GUI/UpdateDate"/>
</ExtraData>
-<MachineRegistry>
<MachineEntry src="D:/virtualbox/Sharepoint/Sharepoint.vbox" uuid="{59397901-1440-48ea-8781-6f86d06c7fbb}"/>
</MachineRegistry>
-<MediaRegistry>
<HardDisks/>
<DVDImages/>
<FloppyImages/>
</MediaRegistry>
-<NetserviceRegistry>
-<DHCPServers>
<DHCPServer enabled="1" upperIP="192.168.56.254" lowerIP="192.168.56.101" networkMask="255.255.255.0" IPAddress="192.168.56.100" networkName="HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter"/>
</DHCPServers>
</NetserviceRegistry>
<SystemProperties exclusiveHwVirt="false" LogHistoryCount="3" webServiceAuthLibrary="VBoxAuth" VRDEAuthLibrary="VBoxAuth" defaultHardDiskFormat="VDI" defaultMachineFolder="C:\Users\yourname\VirtualBox VMs"/>
<USBDeviceFilters/>
</Global>
</VirtualBox>
I had the error...
Failed to create the VirtualBoxClient COM object.
The application will now terminate.
Callee RC: REGDB_E_CLASSNOTREG (0x80040154)
...when starting VirtualBox as normal user. Starting as administrator
worked on the other hand.
System: Windows 8, VirtualBox 5
Actually, the issue "suddenly" appeared after I played around with raw disk accesses. During these test, I re-installed VirtualBox as administrator.
What people not always know is that the registry has also an access right management, like files. Right-click on a folder to access the Autorisations window to display them.
When I re-installed as administrator, the registry keys where created with an admin level access. By this, I wasn't able anymore to start VirtualBox as non-admin.
Re-installing as normal user did not solve the problem. Probably because some admin-level keys could not be deleted.
Solution that worked for me:
Back-up .VirtualBox (optional, as all backups are :-)
Uninstall VirtualBox
Open Registry Editor regedit.exe as administrator.
Delete all remaining VirtualBox keys (especially the .NET, driver registrations, Compatibility Manager settings)
Reinstall VirtualBox using a user account.
Notes:
I did not test escalating the VirtualBox uninstaller process to administrator level with sysinternals. That might work as well.
Be careful with regedit. The GUI is quite '90s. Good to know: CTRL+F searches below the currently selected key, so be sure to go to the top when start searching.
I had one key for an USB driver that I wasn't able to delete due to access rights problems. Finally, this was not needed anyway.
Please don't forget to change access rights on VirtualBox disk files when they have been created with VirtualBox running as administrator.
Renaming the VirtualBox.xml-prev one to the VirtualBox.xml solved my issue.
After you upgrade to VirtualBox-5.0.8-103449 started getting error: Virtualbox "Callee RC: REGDB_E_CLASSNOTREG" (0x80040154)
No advice on the Internet did not help.
It helped only delete the entire contents of the folder "C:\Users\"user"\. VirtualBox" and then restart Oracle VM VirtualBox shortcut on the desktop.
Apparently when you remove the previous version of Virtualbox folder
"C:\Users\"user"\.VirtualBox" is removed.
As the contents of the folder should be removed manually after reinstalling VirtualBox, as well as in case of damage VirtualBox, for example due to lack of space on the hard disk.
Not to be confused with the folder "C:\Users\"user"\VirtualBox VMs"
This folder appears later, only after the establishment has a particular virtual machine.
sorry for machine translation.
In my case this error was caused by a zero-byte truncated VirtualBox.xml in the user's .VirtualBox folder. I found out after downgrading to 4.x and getting a more descriptive error message regarding a missing < tag.
As I already suggested on superuser, as of today (09/09/2015).
Upgrade to the new version that was released.You can find it here
There have been some changes concerning the Windows 10 Problems.
The solution is in the last paragraph.
I happened to have a different cause for the same error message under VirtualBox 5.0.20.
So I temporarily installed VirtualBox 5.1.10 which tries to analyse the situation and gives more info about probable culprit.
In my case the error message from VB 5.1.10 looked like following:
Failed to instantiate CLSID_VirtualBox w/ IVirtualBox, but CLSID_VirtualBox w/ IUnknown works.
PSDispatch looks broken by the 'xxx' ({11B6009E-3F04-4478-A807-30FBD579FC07}) program, suspecting that it features the broken oleaut32.msm module as component {997FA962-E067-11D1-9396-00A0C90F27F9}.
We suggest you try uninstall 'xxx'.
See also https://support.microsoft.com/en-us/kb/316911 .
Result Code:
E_NOINTERFACE (0x80004002)
Component:
VirtualBoxClientWrap
Interface:
IVirtualBoxClient {d2937a8e-cb8d-4382-90ba-b7da78a74573}
Where 'xxx' is here a placeholder name for a specific program name it mentions and suggests to uninstall. (The specific name in my case is not important here).
So I did uninstall the specific program the new VirtualBox version accused, and after that VB started working again. Then I reinstalled the old VB version 5.0.20 I needed to continue using and all was well.
After some researching I found this thread with the step:
find C:\Program Files\Oracle\VirtualBox\drivers\vboxdrv\VBoxDrv.inf right click and select Install
I had this same issue, I believe something corrupted whilst shutting down without correctly closing connections and I couldn't boot VB.
Tried all of the solutions above but none of them worked.
Without Uninstalling I went to the virtual box website and grabbed the most recent version and installed over the top and VB jumped into life.
Version 6.0.14 From 6.0.10

QDesktopServices::openUrl() fails if path contains spaces (after "apt-get upgrade")

I recently saw this error on programs which used to work fine. I think that the error started appearing after I did a sudo apt-get upgrade, which might have upgraded the Qt libraries on my machine.
I've reproduced this error for newly created project containing this code:
QDesktopServices::openUrl(QUrl("/home/sashoalm/Has Spaces.txt"));
QDesktopServices::openUrl(QUrl::fromLocalFile("/home/sashoalm/Has Spaces.txt"));
This produces 2 message boxes saying the same - /home/sashoalm/Has%20Spaces.txt: No such file or directory. But the file exists - I've verified that, xdg-open "/home/sashoalm/Has Spaces.txt" works fine, for example.
Any workarounds? When did this bug happen? My OS is Debian Wheezy.
Edit: I checked Qt4's source code, and the relevant code is this (from qdesktopservices_x11.cpp):
return (QProcess::startDetached(client + QLatin1Char(' ') + QString::fromLatin1(url.toEncoded().constData())));
QUrl::toEncoded() returns the percent-encoded path as file:///home/sashoalm/Has%20Spaces.txt. What is strange is that there were no changes in that file save updating the copyright notices since at before 2011. So it can't be a change in Qt. But the command issued by QDesktopServices::openUrl() is xdg-open file:///home/sashoalm/Has%20Spaces.txt, and that doesn't work on my computer. Perhaps it used to work before, and an update to xdg-open itself broke it? Does anyone know if xdg-open should handle file:/// with percent encoding?
on Qt5
QDesktopServices::openUrl(QUrl::fromLocalFile("/home/sashoalm/Has Spaces.txt"));
worked just fine. I was having the same problem when loading the file purely from a QUrl like the first line
QDesktopServices::openUrl(QUrl("/home/sashoalm/Has Spaces.txt"));
but when used the QUrl::fromLocalFile it just did the thing
Either escape the space with \
QUrl("/home/sashoalm/Has\ Spaces.txt")
or add quotes to the path: -
QUrl("\"/home/sashoalm/Has Spaces\"")

Child_info_fork error running code on cygwin [duplicate]

I recently reinstalled Cygwin on my computer in order to get access to several command line elements that I was missing. I have never had previous difficulty with Cygwin, but after this reinstallation, an error message continues to appear after (almost) each command entered. For instance:
-bash-4.1$ wc m1.txt
3 [main] bash 2216 child_info_fork::abort: data segment start: parent(0x26D000) != child(0x38D000)
-bash: fork: retry: Resource temporarily unavailable
2013930 4027950 74968256 m1.txt
Generally, the command still runs (as seen above), but not always. Occasionally, the 'error' message occurs several times in a row (the initial number "3" will then change to a "4" or "2", notably if I start a second Cygwin window.
Also, as soon as I start up Cygwin, I get the following message before the prompt:
3 [main] bash 6140 child_info_fork::abort: data segment start: parent(0x26D000) != child(0x36D000)
-bash: fork: retry: Resource temporarily unavailable
-bash: fork: Resource temporarily unavailable
-bash-4.1$
At the moment, I am debating whether to uninstall/reinstall Cygwin again or just live with the error messages, but I was curious if there might be an issue that I am unaware of.
(assuming Cygwin is installed at C:\Cygwin):
Open Task Manager and close any processes that look to be Cygwin related.
Open C:\Cygwin\bin in Windows Explorer
Verify that dash.exe, ash.exe, rebase.exe, and rebaseall exist in this folder
If any of them are missing, re-run Cygwin setup and select the dash, ash, and rebase packages
right-click your C:\Cygwin folder, uncheck Read-only (if its checked), and press OK.
When an error about not being able to switch some files comes up, select "Ignore All". Wait for this process to complete.
Browse to C:\Cygwin\bin in Windows Explorer
Right click dash.exe and click "Run as Administrator". A command Prompt should appear with nothing but a $
Type /usr/bin/rebaseall -v, hit enter, and wait for the process to complete.
If you get errors about Cygwin processes running, try Step 1 again. If that still doesn't work, Restart your computer into safe mode and try these steps again.
A commenter noted that, depending on your settings, you may have to type cd /usr/bin && ./rebaseall -v instead.
Try opening Cygwin again.
This process worked for me. I hope it works for you guys too.
Source: http://cygwin.wikia.com/wiki/Rebaseall
I would like to add the following to the above answers, as it is what I had to do after reinstalling Cygwin:
Navigate to the "/usr/bin" directory (usually, C:\cygwin\bin) and right click, Run as Administrator the file: dash.exe
Then, at the $ prompt type the following, hitting enter after each line:
cd /usr/bin/
/usr/bin/peflags * -d 1
/usr/bin/rebaseall -v
What it does is, it marks the dll's as "rebase-able," and then rebases them. You have to have peflags.exe in addition to the above files (in previous answers). You may have to restart windows after doing this and you will definitely need to make sure that there are no processes nor services belonging to cygwin running. (Use task manager, kill any related processes, and then under the services tab look for any service starting with CYG and stop it.)
After doing this, I was able to get cygwin to run without any errors about dll's being loaded to the wrong addresses aka fork errors, etc.
I hope that this helps others, as it was a pain to find.
SOURCE: http://www.cygwin.com/faq.html#faq.using.fixing-fork-failures
and the rebase README file.
To add on to other answers here, we ran into the same issue but could not run the rebase command from the ash or dash shell. However, when launching the command from the Windows cmd shell, the following worked.
cmd /c "C:\cygwin64\bin\ash.exe /usr/rebaseall -v"
-v is to get verbose output
I found another information here :
http://cygwin.com/ml/cygwin/2014-02/msg00531.html
You have to delete the database at
/etc/rebase.db* and do in a "ash" windows :
peflags * -d 1
rebaseall
It works for me on 2 servers.
I solved this problem by restarting my computer. Probably installed a driver update and kept using sleep instead of shutting down.
Experienced the same issue when loading Cygwin with cygiconv-2.dll forking and not loading successfully in the Cygwin terminal, but after turning off my AntiVirus (it was specifically Ad-aware), the issue resolved, and Cygwin worked properly.
In case you are using babun's Cygwin, after rebaseall, try launching Cygwin by executing .babun\cygwin\cygwin.bat in a Windows command prompt or Windows explorer.
This works for me (while launching babun's default console - mintty results in fork error).
I had the error on win10 and i was trying to rebase to c: before install.
then i saw that the installer was installing it instead to c:/Users/myuser
so i was coping all files from c:/Users/myuser to c:.badun
and then restart plus open badun.bat
not shure if this was wise its now duplicated XD... but then it worked again.
Rebaseing didn't help in my case. In addition to what other people suggested, I noticed that reducing the length of PATH environment variable fixed the issue for me (and for other people as well as can be seen from this answer).
This issue is intermittent in nature & I found this issue when there is network is too slow to connect to remote machine on AWS.... I have Shell script that runs through Gitbash shell & it connects to AWS EC2 instance with ssh..... Most of the time, it ran correctly but 2 out 100 times it get into this issue bash: fork: retry: Resource temporarily unavailable .... Killing the MSYS2 terminal from task manager helps to overcome with this issue....
Negative side is you need to run the scripts from the beginning...
I had the same issue on Windows 10 and the mobaxterm app (which uses cygwin) and I tried all of answers listed here however for me, the solution was to simply delete the "CryptoPro CSP" application.
I started facing this problem after upgrading to windows 10. As of now I do not see that any of the above method working.
What I am noticing is that if you start cygwin with admin right (right click and say "run as admin") then it works fine.
Or you open cmd as administrator and then launch cygwin from there, then also it runs fine.
Just reinstall cygwin and select TCL and activate EXPECT

Connect to MS SQL Server through ODBC

I have a Qt 4 application that is trying to connect to an MS SQL Server 2008 database using the Qt ODBC driver. The application runs fine when it is running in Windows; however, the target OS for the application is to have it run in GNU/Linux. When the application runs in GNU/Linux I get the following error:
QSqlError(0, "QODBC3: Unable to connect", " [unixODBC][Driver Manager]Data source name not found, and no default driver specified")
Is there something I need to configure on the SQL server or application side to get the connection to work?
I don't really know much about unixODBC, but have a look here:
unixodbc.org/doc/
For connecting to MSSQL, the following might be useful:
http://www.unixodbc.org/doc/FreeTDS.html
or .../FreeTDS2.html
Try to copy the odbc.ini file in ~/.odbc.ini . If not working again, try to copy the same file into /etc/odbc.ini. If this is not working, as these directories are different for different Unix systems, find all files: *odbc*\.ini and see if some of them are empty. If so, replace them with the correct .ini file.
I had the same problem and this solved it. But it's a really stupid solution, so I'm looking for a better one. Hope that helped (: