Java Mail Hangs (after suspend?) - jakarta-mail

I am using java mail 1.6 on Kubuntu Linux 18.04. It all works beautifully. I am connecting to an IMAP server, getting email, etc.
But there is one thing that is causing me grief.
After I close my laptop for a short period of time (so the laptop is probably sleeping), and then open it up, java mail keeps working just fine.
However after I close my laptop for a long period of time (overnight, so the laptop has probably suspended), and then I open it open it up, two things happen:
idle stops working (I have coded this with both IdleManager and
folder.idle, and get the same issue)
when I close a Store or a Folder javamail simpy hangs.
I am guessing that somehow the TCP connection to the IMAP server has died, or maybe I have some timeout set wrong.
I would post code but its buried in a large application, and I am hoping someone has seen this issue before and it has a simple fix.
gym

Related

ipmi-console: SOL connection idle on dell servers

I'm working with server automation tools on some Dell C2100 and C1100 servers. What I intend to do is connecting via Serial Over Lan using ipmi.
A few weeks ago, I was able to connect to one of my servers using ipmi-console (from freeipmi), like this:
ipmi-console -h IPADDRESS -u USER -P
This started up a SOL connection, and this way I was able to automate some interactions with the server's BIOS settings and other stuff.
However, a few days later, the same script didn't work anymore. It just says "[SOL established]", and that's it: the SOL connection never shows any feedback, and it stays idle until I close the connection.
My question is: what could possibly have changed that the SOL connection is not working anymore.
I obviously checked for anything related to SOL and IPMI, both in BIOS settings and using BMC web GUI. But everything looks normal, and I didn't recall to have changed anything there between the time the connections worked and then they stopped working. IDK what else to check, and it just fails w/o errors anywhere.
Perhaps this is a common thing with IPMI and/or SOL, but I frankly don't understand it. So, any pointer would be nice.
Thanks in advance.
FreeIPMI maintainer here. When no data is being output, it is typically a configuration problem. Assuming none of that changed, one idea.
On some motherboards, I've seen the BMC internally "lose its connection" to the serial chip, thus it doesn't get any serial data and thus doesn't have anything to send out. Unfortunately a hard power reset is often needed to solve this (b/c the BMC always is "on" via standby power, it must be a hard reset to reset it). Hard resetting the BMC directly might work as well, you can do this in FreeIPMI via bmc-device --cold-reset.
Finally, I've found what was going on.
It happened that somehow a value DID change on the BIOS settings, most likely my own mistake: remote connection ability was disabled. That means, it seems, that SOL works, but it doesn't redirect anything. Given that I was able to connect through SOL, it seemed obvious that remote connection ability was enabled.
Once enabled that BIOS setting, everything was back to normal.
BTW: freeipmi is awesome. Thanks for maintaining it Albert.

My Personal Communication iSeries Access for Windows gets disconnected

Whenever I call a specific RPG program my Personal Communication client gets disconnected. It was working fine last day but today it has strange behavior rest of the AS400 system is working fine. What could be the reason?
Thanks
This was happening due to some network slow response. As the program which I was calling was eating up network resources that's why my Personal Communication client was disconnecting continuously. One that day overall network was slower. It didn't happen afterwards.

Trouble proxying into computer

I am trying read traffic from a couple of test mobile devices, iphones, androids etc. I've done this for over a year using primarily Fiddler but also Charles. I did it up until yesterday without any issue. But today the devices do not appear to be connecting to my computer. I have confirmed that everything is configured right eg. device is set to use my computer as a proxy after I put in my computers IP address that I got by doing a simple ipconfig, sorry if this all sounds redundant but just letting you know my steps, better to have more information than less. I also turned off my firewall no change.
I thought perhaps something was done to our network, but I installed Fiddler on a coworkers computer and was able to proxy into that computer without any issue. Confirmed all drivers are up to date and really there was no change between yesterday and today except a deep scan with Malwarebites. Frankly sort of at a loss for what it might be, I have reinstalled Fiddler on my computer (the primary one I use, didn't reinstall Charles cause I don't want to deal with license issue right now) but at same time what are the chances that both stopped working at same time.
There's a high likelihood that your PC's firewall is blocking the inbound connection. You should check your firewall configuration to see if it's configured to allow inbound connections to Fiddler.
On your Fiddler-running PC, ensure Tools > Fiddler Options > Connections > Allow Remote Computers to connect is checked (if not, check it and restart).
From your co-worker's PC, try visiting http://<FiddlerPCName>:8888/ in the browser. Does the traffic appear in Fiddler?

Stable HTTP server w/ Arduino WiFi Shield?

I'm building my first Arduino project. You can see the basics of what I've done, here: http://lostechies.com/derickbailey/2013/04/10/a-first-look-at-my-arduino-bbq-thermometer/ - it's a network enabled BBQ thermometer, to tell me when my meat is done cooking on the grill.
I've got this set up with a basic HTTP server to produce a JSON document when an HTTP request is made. All of the HTTP handing code that I'm using comes from the samples that are built in to the Arduino IDE software.
The Ethernet Shield version of this code seems to work great. It seems to run for as long as I let the thing stay plugged in / turned on. But when I switch over to my Arduino WiFi shield, and upload the WiFi version of my code - which is also based on the samples in the WiFi libraries demos - it stops responding to requests after about 10 minutes or so.
I'm using an Arduino Undo R3, with the latest Arduino WiFi shield. I've got Arduino IDE v1.0 on my Mac. Everything compiles fine, and seems to run fine for a while.
The HTTP server code very quickly starts having problems. If I put up a simple web page with jQuery.ajax calls to hit the http server every 3 seconds, approximately 1 in 3 requests will fail, almost immediately. Once it moves beyond 10+ minutes, the HTTP server code on the Arduino just stops responding entirely.
It's as if I have a resource leak on HTTP clients, and they aren't being cleaned up... but this is a total guess.
For the gist of what I'm doing, see the code found here: https://github.com/arduino/wifishield/tree/master/libraries/WiFi/examples/WifiWebServer
I've literally just copy & pasted this code, turned it on, and then it starts erroring out. I don't even have to modify the code anymore than setting the right SSID and password, and setting a CORS: * header in the HTTP response. Once I upload it to my Arduino, it starts bombing requests frequently, and a few minutes later, it stops responding entirely.
Has anyone seen this problem before, with the WiFi shield? Does anyone have better HTTP request handling code for the Arduino WiFi shield?
I can provide more information, my actual code, or whatever else is needed, as well.

Send a message to a machine that is powered off

I would like to send a message, or something can be an advise from a pc to an another pc (only one, or at the most 2), the latter is powered off.
The pc which should send the message is a windows server 2003 os, instead the pc which should receive the message is a windows xp os.
The two machines are in the same domain and they work together through an ingres database.
The message will be sent at night, because there is an ingres database back up procedure that runs at night when my pc will be powered off, but when in the morning i will be at work I would like to read this message as a net send message, or something like
Unfortunately the net send command is disabled in our network, so I can't use it, but i'm looking a way for sending this message.
Have you any suggestion? thank you
Use age-old simple file based messaging.
Store a message in a specific file in the server and write a simple application which runs on startup on your machine to read it and display it.
And this is apart from rerun's great suggestion :)
There is breaking new technology available called email.
Is the machine powered off or in standby?
If if is in standby, then I will defer to someone who may have a better idea of how to get wake the machine to wake up programatically(sp?).
If it is powered off then read on...
If you have access to the machines bios settings, then I would suggest scheduling a power on event in the range of the time before the backup normally completes.
Then it is a matter of receiving the message and optionally shutting back down afterward?
If you are unable to change the bios settings, then does the machine "power on after power loss?" If so, get a programmable timer from the nearest retail store and power off before leaving at night and have the timer set to power on before the time the backup could reasonably be completed.
This is not really a software solution per se, but your problem does seem to be mostly hardware related (with the power off requirement and all...)

Resources