Hudson-ci refuses to launch screen on OSX - hudson

I have a very intermittent issue (and now constant failure) launching gnu-screen on OSX from hudson. I have a shell script that does just this:
#!/bin/bash
screen -dm -S foobar
From the command-line as the hudson user this works just fine, and this screen session show up with screen -ls. From the hudson task this does not work. It used to work for a few hours and I have no idea why it does not work any more.
What I've tried so far:
Put the screen command into a separate bash script. Eg. /tmp/foo.sh
Put path prefixes in case the screen command is not found. But screen -ls works just fine, so that's not it
Run screen in non-detached mode, just as a test. This fails as expected with "Must be connected to a terminal.". So this means that screen at least is thinking of doing the right thing.
Run screen as a LaunchDaemon that i start with a launchctl (create the plist file as OnDemand). Same problem.
Is there some way I can debug what's going on? I can't think of how to figure out why things are not working and I'm completely out of ideas. And I don't see any logs that might help either.
My System is: OSX 10.6.5; screen ver. 4.00.03
Update:
I just thought to look in /var/log/system.log and I see:
Feb 24 23:19:00 macmini2 com.apple.launchd[1] (0x1037c0.anonymous.screen[57291]): Switching sessions is not allowed in the system Mach bootstrap.
Feb 24 23:19:00 macmini2 com.apple.launchd[1] (0x1037c0.anonymous.screen[57291]): _vprocmgr_switch_to_session(): kr = 0x44c
I'm going to have to research this further it seems, but I don't want to go down the path suggested in my first couple of searches for this error, which are to install fink version of screen, or to build screen from source. I'd rather keep the machine as is if at all possible (though I'm not against compiling screen from source if that's the only solution).

I've found a solution to my problem, and I suspect it's bad protocol to answer my own question, but for the sake of others who may have this issue, here's how I got around this ..
The easiest/only solution seems to be to build screen from source. Steps are very simple and straight-forward:
git clone git://git.savannah.gnu.org/screen.git
cd screen/ && ./mktar.pl && tar xfz screen-4.1.0.tar.gz
cd screen-4.1.0
./autogen.sh && ./configure && make
sudo cp screen /usr/local/bin/
/usr/local/bin/screen --version
Using this new screen for all daemons or background processes (eg. Hudson's shell launcher, cron'ed tasks that try to use screen, etc.) works very smoothly. This also keeps the system screen (/usr/bin/screen) unaltered.
References:
This apple forum thread is what gave me the idea to build from source.
I just found this stackoverflow solution. It's basically the same solution, so I've voted it up.

Related

QEMU Monitor on Windows 10

I'm Ronaldo, Newbie of Stackoverflow.
I'm having a problem, On my PC it's running Windows 10 Build 1803, Then I installed QEMU, but not only that, I installed the graphical version which is QtEmu.
Then I wanted to virtualize CentOS 3.1, with Disk 1, Disk 2 and Disk 3. But I don't know how to eject the disk in QtEmu, I tried it in PowerShell and I couldn't, not even in CMD, just the serial0, and the keyboard is not works, only on the PC that works. the Mouse is ok. But QEMU Monitor is out of QtEmu! Is there any way to install QEMU Monitor on Windows, with QtEmu?
Please help me!
QEMU can be started with option "-monitor" so you can send commands to it there. I never used QtEmu so not sure how it starts QEMU. If you figure out how, check out https://qemu.weilnetz.de/w64/2012/2012-08-24/qemu-doc.html#pcsys_005fmonitor.
So basically, you can use "change" command to mount and unmount a CD drive or other storage devices. For example, "change ide1-cd0 /tmp/file.iso" to mount an image file. The device names are not fixed across different VM configurations. "info block" can tell you what name you need to use.
sorry i just discovered QEMU, it's far now, but it can help people in the future.
I dislike QTEmu and others IHM, too much bugs currently (2022)..
With QEMU
default mode: you can directly have an access with the window, go to view and you can switch by clicking on "compat monitor 0" . You can also detach the monitor.
sdl: ctrl+alt 2.
Here:
Identify your devices by "info block"
As you can see here, i ran without anything (it's just to show).
To change/add content of your cd-rom, "Change "
here my device is "ide1-cd0"
Path can be your physical or virtual drive, a disk image, you can always swap according your needs.
As you can see now, i use "R:", a virtual device from a software like daemon tools (an alt).
I think it's better, before to swap, to eject from the guest... But perhaps
it depends of your OS. For the while i used it, the most of time, with win98x.

how to free a localhost port on mac

I have read the posts similar to this but to no avail.
I am in the midst of a comprehensive tutorial for Angular (5). I am on MacOs High Sierra 10.13.3. I am using Chrome Version 64.0.3282.140 (Official Build) (64-bit).
I just completed one project in the tutorial. I am now trying to complete the next project in the tutorial. The project is set to use the default port 4200 on localhost. All of the projects have executed this way.
I have performed my npm install. My npm start script is simple, = "ng serve". I enter npm start and it serves up the project as expected. I then go to my browser and enter the address localhost:4200. The previous project renders. I can't get the current project to render. These are the things I have tried to remedy the situation:
sudo lsof -i tcp:4200
changing the start script to ng serve --port 4300 and then using the address localhost:4300 (tried it with 5000 too)
Actually the first thing I did was look for an active activity on port 4200 in the Activity Monitor
Clear my Chrome browsing history
Restart my computer.
Tried the same process using Firefox as a browser
Tried it using Brave as a browser
In each and every case when I enter localhost:(anything) I get the previous project. Any ideas?
If I could delete this question I would. I discovered the problem.
I only THOUGHT I was pointing to the new project. In reality, I was pointing at the old project. THAT is why the same thing kept coming up and that is why nothing I tried would work.
I am embarrassed. Clearly, I am still a rookie. I hope no one spent any time on this.

Unable to install MySQL on Windows 10 - Installer hangs indefinitely

I am trying to install MySQL on a Windows 10 PC. I downloaded the installer package and followed those steps
Went to https://dev.mysql.com/downloads/windows/
clicked on "MySQL Installer"
Scrolled to Generally Available(GA) Releases section
Clicked on "Windows (x86, 32-bit), MSI Installer" (mysql-installer-community-5.7.21.0.msi) and it started the download.
Once the download was complete, I double clicked on the installer and it gave a usual pop-up for any installation like,"Do you want this app to make changes to your device?" after clicking on "yes" for the answer to this question, it shows "Please wait while Windows configures MySQL-Installer-community" like below screenshot.
And then it keeps showing this installation progress bar for a very long time. Like more than 7-8 hours and the installation never completes
So it seems something is wrong as I don't think MySQL installation needs this long time. I tried to restart my computer and then delete any files related to MySQL from my computer and then started the whole process of installation again. But no luck yet
Anyone has any suggestion on this or did anyone face this kind of issue before? If so, is there a fix or a work around for this?
ok. So finally this is how I resolved my issue. And I found the solution at https://bugs.mysql.com/bug.php?id=82004 . The solution to this problem is to close an open "Windows installer" (the one using 0 memory and CPU) via task manager and the installation should begin running as expected.
Alternative solution: Use an administrator command prompt to run the MySQL installer on Windows 10. Details:
(Note: if you have any problems in the following steps, you can try to restart your computer. Then restart the steps.)
Right-click the Start/Windows icon in the bottom-left corner of Windows.
Click: Windows PowerShell (Admin).
A window asks: Do you want to allow this app to make changes to your device? Click: Yes.
Change to the directory with the MySQL installer. For example, if you downloaded the MySQL installer, type something like:
cd C:\Users\my_username\Downloads\
(Note: To save some typing, you can type a few characters, and then press the tab key, to make Windows show you various auto-completion options.)
Run the MySQL installer. Type something like the following command---make sure to include the period and backslash at the beginning---and press Enter.
.\mysql-installer-community-8.0.11.0.msi
Note: The idea of using an administrator command prompt came from John Geffe, in the link below, which was cited in the answer written by the original poster (user8425592):
https://bugs.mysql.com/bug.php?id=82004
Bug #82004 MySQL Installer freezes during "Please wait while Windows configures..." phase
[6 Feb 3:58] John Geffe
To get past this problem I had to run the .msi installer from an the
Administrator command prompt. Hopefully this helps someone in the
future.
[19 Apr 18:14] Jim McCauley
John Geffe: Thanks! Your note on installing as an administrator seems
to have taken care of the problem.
this did the trick for me: https://ao.ms/mysql-community-server-msi-installer-hangs-on-windows-10/
run cmd (commandline) as Administrator
cd to your location that you downloaded the .MSI to
run the “msiexec” commandline tool with option “/i” as follows:
msiexec /i [replace with file name]
example: msiexec /i mysql-installer-community-5.7.20.0.msi
Another thing that worked for me was running the installer in compatibility mode for previous version of Windows. You can try that as well.
Go to the link you provided (the first one) and try installing MySql Workbench. That is the version that is commonly used, and one that I verified works in Windows 10. Here is the link: https://dev.mysql.com/downloads/workbench/
Obviously, make sure you choose the right architecture, have the correct permissions to install software, and have enough space on your hard drive, or on the machine you are installing to.
Please install "Update for Visual C++ 2013 and Visual C++ Redistributable Package" from Microsoft Site "http://download.microsoft.com/download/0/5/6/056DCDA9-D667-4E27-8001-8A0C6971D6B1/vcredist_x64.exe"
Please look here at https://support.microsoft.com/en-in/help/3179560/update-for-visual-c-2013-and-visual-c-redistributable-package
Yes, I also got the same problem on my Windows 10.
Followed the Powershell solution and it worked.
Just repeat the above:
Click Start on bottom left corner
Scroll down the application list until Windows Powershell
Select Windows Powershell again on sub-menu
Type in cd (to change to your .msi folder)
Type .\xxxxx.msi (this is the installer file name)
All good.
Once you install the above package run the installer again and do the steps. You will be able to install the mysql-installer-community-5.7.21.0 for 64 bit windows 10
closing Windows Installer instances using 0 memory and CPU helps me to get past this problem.
For me on Window-10 machine, there was a problem with the "mysql-connector-net-8.0.11.msi". I was not able to uninstall this and hence all my subsequent efforts to install MySQL were failing. I did the following to overcome this issue.
Re-installed "mysql-connector-net-8.0.11.msi" Get it here and used the 'Repair' option
Installed the "mysql-installer-web-community-8.0.11.0.msi"
These two things solved my problem. Hope this helps.
The reson is your antivirus didn't allow the mysql, so Disable protection(until restart),( in your task bar right side click the arrow and right click to antivirus,to select (Disable protection(until restart)).then restart your computer again install mysql installer it will work.
For this issue just run .msi file in command administration like
E:\mysql-installer-community-8.0.20.0.msi\
follow this link:
https://kb.foxitsoftware.com/hc/en-us/articles/360040660611-How-to-install-MSI-from-command-line-with-administrator
In my case, an upgrade to 5.7.29 on Windows 10 via mysql-installer-web-community-8.0.20.0.msi, the install froze "backing up the database". The log tab showed no activity for 8 minutes. I clicked on cancel, then at the "are you sure" prompt I declined to cancel, and all of a sudden the install was working again. Very strange...
I encountered the same problem, preparing but can never get started. Tried to close other installation programs with no use, but I took the inspiration and proceeded with restart the computer and it worked nicely. So, I think the issue is to get rid of everything that could be in the background running that somehow interferes the installation.
You should run the installer as an administrator but this specific installation may not provide an option for this. Some might have it but it's most likely that it's unavailable for many users. So you should run it in cmd or powershell. And don't forget to run these shells as an administrator coz that's the whole point here. Once there, navigate to the installer's location which usually is in the downloads directory and run it using this command ./name.msi
Make sure no other ongoing installation of this instance. Close it if there exists one and undo the changes made by uninstalling it from the panel. If still facing difficulties, try restarting your machine and repeat this procedure...
Have fun
I had the same Problem, A simple solution is to give access the "SYSTEM" to the msiserver...I know, this is hard to understand what I am saying....You can Simply see this Video and you will definitely find the answer https://www.youtube.com/watch?v=6SdXMjXmnUk, It is a matter of just 3 minutes...
I encountered the same issue of taking too much time to install mysql community installer.I tried 3 times by cancelling the installation and restarting to perform a new installation.But had same issue. I tried 2 things
First to end all tasks associated with installation which I performed for installing mysql using Task Manager
Reinitiated the installation but didn't solved my issue.
Secondly tried to install through Windows Powershell as admin, which solved the problem.
Click on the Windows icon/start on the bottom left corner.
Right click and select the option Windows Powershell (Admin).
A pop up window will ask Do you want to allow this app to make changes to your device?....Click Yes.
Now cd to your downloads folder/wherever you downloaded the .msi file (For example cd C:\Users\MYPC\Downloads).
Once you reach to the folder where the .msi file is kept, run the following command.
.\mysql-installer-web-community-8.0.23.0.msi (Note: this is the version which I have downloaded, modify as your version).

How to restart X Windows System for new desktop `Xfce' to take effect [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I installed Fedora 20 a while ago and now decided to install and test Xfce ui.
I installed Desktop Switched gui utility for switching the ui.
Now when I select xfce in the switcher utility and click apply I get the following message.
Your desktop configuration has successfully been updated, but you must
restart the X Window System for the changes to take effect.
I then restart my system by doing a shutdown however my old ui (which I believe is gnome) still shows up. How do I restart the Xwindows system ?
So as I mentioned in the comments I was unable to reproduce your issue. Here is what I did.
a fresh install of Fedora-Live-Desktop-i686-20-1.iso. I created a user during this process.
then updated it with $ sudo yum groups install "Xfce Desktop".
Then I rebooted
When I got the gdm screen. I was able to click on the little gear icon and select Xfce, and everything worked like a top.
Update ( what fixed the issue ):
MistyD > No I changed the start up from session manager during logging on. The next time I restarted my system my old session option was preselected
So now what? Well in the the spirit of:
teach a man/woman to fish you feed him for a lifetime
Note: This the techniques below are non-vendor specific linux configuration advice.
In general when experience window manager configuration issues like this one: and you have two machines: and one works [ workie-box ] and once does not [ no-workie-box ].
I will go through the following debugging process:
Package installation differences
Package Configuration differences
User configuration differences
1: Package installation differences
this situation can arise for a myriad of reasons, however the most common one is the package updates. ( in this case the yum groupinstall ) occurred at different times or while pointed to different package repositories.
$ ssh root#no-workie-box
$ rpm -qa |sort > all_packages_no_workie_box.txt
Now collect the same information on the workie-box
$ ssh root#workie-box
$ rpm -qa |sort > all_packages_workie.txt
Finally copy those two text files to a different machine and diff them. This little technique has saved my bacon many many times.
To round out this topic: what if someone touched something within the package ... how can I know that? With rpm's verify command.
$ rpm -qV gdm
This can also be a super helpful technique.
2. Package Configuration differences
For your issue specifically this is tricky because you have to first choose a display managers. There are several: for example: cdm, tdm, gdm, kdm, lightdm, lxdm, mdm, xdm, SLiM, etc. Mix in with that the fact that different distros package them up and this can turn into the Wild-Wild-West pretty quickly. However here are some helpful rpm specifics
$ rpm -ql gdm |grep bin
/usr/bin/gdm-screenshot
/usr/bin/gdmflexiserver
/usr/sbin/gdm
$ rpm -qcf /usr/sbin/gdm
/etc/gdm/Init/Default
/etc/gdm/PostLogin/Default.sample
/etc/gdm/PostSession/Default
/etc/gdm/PreSession/Default
/etc/gdm/custom.conf
/etc/pam.d/gdm-autologin
/etc/pam.d/gdm-fingerprint
/etc/pam.d/gdm-password
/etc/pam.d/gdm-pin
/etc/pam.d/gdm-smartcard
You now know the pond you are fishing in, and alto of times that is enough to catch some fish. Combine that knowledge with the little tidbit I pointed out in section 1:
$ rpm -qV gdm
and this will put you on-top of anyone else configuration attempts. ( including yours that you forgot about )
3. User configuration differences
This little technique has saved my bacon numerous times while un-spooling some window manager that is not working properly. So here is the deal, linux stands on the shoulders of unix's multi user environment heritage. Because of tenet's of unix in general related to user configuration, linux will store all sorts of configuration information in your home directory. This can become extremely problamatic on an update. As most package upgrade systems will leave your configuration un-touched. I.E. They treat you as the expert... they assume you know what you are doing.. so the packagemanager wont touch user configurations.
# Logged in as a user
$ ls -a1 |grep ^\\.
.
..
.bash_history
.bash_logout
.bash_profile
.bashrc
.cache
.color
.config
.esd_auth
.gnupg
.ICEauthority
.local
.mozilla
.ssh
Look at all of those dot files and directories... Note: there could be plenty more.
Over the years I have used a few techniques to deal with this issue. However my new favorite one is to create a new user from scratch.
Reboot ( - cringe - )
Then log in as that new user. More often than not that will fix the issue. You know that the problem is something to do with your previous user's configuration.
Finally:
The last part of your question was related to restarting X, to re-read in your configuration.
Note: I put a reboot -- cringe -- in the previous section. You will find that salty sys admins take great pride in the fact that they dont reboot there linux machines. This is usually because they deal with servers all the time. I would go a step further and ask why you are running a gui on your server. But alas for the nerdy....
Here is how to re-start an X window session without rebooting.
Ok so the deal is that most likely the window manager, and thus the X session was started by a display-manager. Therefore when you log out of your window manager you are still running X. To force a restart... So here is what you do... Kill all of the display-manager && X processes. They will re-fire.. and re-read in your X configuration.
1: ctrl alt F2
This will take you to a terminal.
2: $ ps -efw
observe the processes, you are looking for X processes
3: $ ps -efw |grep X
these are your X server processes.
You also need to find your desktop manager processes. ( you could have several different ones )
4: $ ps -efw |grep kdm
$ ps -efw |grep gdm
Now: kill all of the X processes and the display manager processes.
5: $ kill -9 #<pid1> #<pid2> #<pid3> #<pid4>
Note: The system will be configured to restart those DISAPLY manager processes, thus restarting X and re-reading in your configuration.
Or you could just reboot -- grin --

tcl/tk on mac os, Python IDLE won't start and Macport not working properly

I really need someone's help here.
Early, I was playing around with homebrew, macport and active state TCL/TK after I got the new mac pro. But somehow I accidentally deleted the tcl/tclsh folder when I was trying to delete the active state version of tcl.
Now the problem is when I'm trying to install MongoDB with Macport using:
sudo port install mongodb
It give me an error says:
so I guess I delete the wrong file..is there any way I can get it back? I tried install tcl/tk using active state package but didn't work.
Help really needed...!
Thanks
The problem seems to be that you've deleted (at least part of) the system Tcl/Tk pre-installed by Apple.* MacPorts explicitly uses Apple's Tcl (or its own, if you ask it, but not ActiveState's or Homebrew's or any other). That's why it's looking for /usr/bin/tclsh rather than just whatever tclsh is on the PATH.
If you dig inside the Mountain Lion installer package, you may be able to find and run the Tcl/Tk installer manually, but Apple makes that different (and harder) with each release. The easier thing to do is just run the installer and let it repair things for you.
* It's also possible that you first replaced parts of Apple's Tcl with another version, which you shouldn't have done, and then broke that other version. But the solution is the same.