Disk is too full, resizing is not helping or taking effect [Google Compute Engine] - google-compute-engine

I am using Google Compute engine and I got what is commonly known issue cannot connect via ssh or any means due to Disk is too full. I have resized disk multiple times and even x10 but changes are visible within compute engine but ssh still won't connect and logs still says disk is full.
Is there any other ways to solve this, I have important data/mongodb in that engine ?
resized incrementally few times, didn't help
added additional disks, didn't help
tried to delete some files via startup-script, didn't help
Some part of error messages...
Traceback (most recent call last):
File "/usr/bin/cloud-init", line 618, in <module>
sys.exit(main())
File "/usr/bin/cloud-init", line 614, in main
get_uptime=True, func=functor, args=(name, args))
File "/usr/lib/python2.7/dist-packages/cloudinit/util.py", line 1900, in log_time
ret = func(*args, **kwargs)
File "/usr/bin/cloud-init", line 489, in status_wrapper
atomic_write_json(status_path, status)
File "/usr/bin/cloud-init", line 434, in atomic_write_json
raise e
IOError: [Errno 28] No space left on device
Aug 5 04:46:15 backend google: startup script found in metadata.
/usr/share/google/fetch_script: line 30: echo: write error: No space left on device
Aug 5 04:46:15 backend startupscript: Running startup script /var/run/google.startup.script
Aug 5 04:46:15 backend startupscript: Finished running startup script /var/run/google.startup.script
...
accounts-from-metadata: WARNING Could not update /home/ubuntu/.ssh/authorized_keys due to Disk is too full

After few different attempts I was able to fix issue by:
creating snapshot of the disk and creating new instance with increased persistent storage, data is there and size of disk is increased, all set.

Related

Unable to create instance from CLI

I've installed the single DevStack and been able to create a compute instance through the WUI, but if I try and perform the same task from the CLI I receive the following error
Traceback (most recent call last): File "/opt/stack/nova/nova/conductor/manager.py", line 703, in build_instances raise exception.MaxRetriesExceeded(reason=msg) nova.exception.MaxRetriesExceeded: Exceeded maximum number of retries. Exhausted all hosts available for retrying build failures for instance 1a5e912b-dac4-4633-834d-3a49800edd74.
Looking at that line in the code it would appear to suggest it's unable to schedule the build; though why would it work through the WUI?
Thanks.

I am getting attribute Error while running train.py in YOLOV5. Can anyone help me with this?

When I run python train.py --img 640 --batch 4 --epochs 5 --data training/dataset.yaml --cfg training/yolov5l.yaml --weights yolov5l.pt for YOLO V5 in my system I get the following nd why is it:
Traceback (most recent call last):
File "train.py", line 544, in
train(hyp, opt, device, tb_writer)
File "train.py", line 72, in train
wandb_logger = WandbLogger(opt, save_dir.stem, run_id, data_dict)
File "D:\sandra\ai.projects\yolo\yolov5\utils\wandb_logging\wandb_utils.py", line 108, in init
self.data_dict = self.setup_training(opt, data_dict)
File "D:\sandra\ai.projects\yolo\yolov5\utils\wandb_logging\wandb_utils.py", line 139, in setup_training
self.train_artifact_path, self.train_artifact = self.download_dataset_artifact(data_dict.get('train'),
AttributeError: 'str' object has no attribute 'get'
wandb: Waiting for W&B process to finish, PID 22204
wandb: Program failed with code 1.
wandb: Find user logs for this run at: D:\sandra\ai.projects\yolo\yolov5\wandb\offline-run-20210427_130128-jr2z73rr\logs\debug.log
wandb: Find internal logs for this run at: D:\sandra\ai.projects\yolo\yolov5\wandb\offline-run-20210427_130128-jr2z73rr\logs\debug-internal.log
wandb: You can sync this run to the cloud by running:
wandb: wandb sync D:\sandra\ai.projects\yolo\yolov5\wandb\offline-run-20210427_130128-jr2z73rr
Looking at the error traceback, it seems that your dataset configuration file has some missing info, or most likely in the wrong format. The file should contain both training and validation set paths. Here's an example:
train: path/to/train # Notice the spaces
val: path/to/val
...

How do you overcome the "RuntimeError: Gamma ramp size is reported as 0." without changing the window type when using psychopy?

I have developed a program to play videos in psychopy using a machine with Ubuntu 16.04, a NVIDIA GPU and associated driver. The program works perfectly fine on this machine. The program is rather large but of note, it uses visual.Window(fullscr=True) which as default uses the pyglet backend and also uses visual.MovieStim3. I am now trying to run this program on a different machine with Ubuntu 18.04.1 LTS and integrated intel graphics (HD Graphics 620 (Kaby Lake GT2)) and am having problems.
new machine driver info below:
*-display
description: VGA compatible controller
product: Intel Corporation
vendor: Intel Corporation
physical id: 2
bus info: pci#0000:00:02.0
version: 02
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:128 memory:ee000000-eeffffff memory:d0000000-dfffffff ioport:f000(size=64) memory:c0000-dffff
Here is the traceback when I run the program:
Traceback (most recent call last):
File "/home/adf/mxj719/experiments/video_sorting/video_sorting.py", line 456, in <module>
start_sorting(av_original_csv, user, usr_csv, bonus, last_video)
File "/home/adf/mxj719/experiments/video_sorting/video_sorting.py", line 357, in start_sorting
win = visual.Window(fullscr=True)
File "/home/adf/mxj719/.conda/envs/conda_psychopy/lib/python2.7/site-packages/psychopy/visual/window.py", line 375, in __init__
self.backend = backends.getBackend(win=self, *args, **kwargs)
File "/home/adf/mxj719/.conda/envs/conda_psychopy/lib/python2.7/site-packages/psychopy/visual/backends/__init__.py", line 32, in getBackend
return Backend(win, *args, **kwargs)
File "/home/adf/mxj719/.conda/envs/conda_psychopy/lib/python2.7/site-packages/psychopy/visual/backends/pygletbackend.py", line 227, in __init__
self._origGammaRamp = self.getGammaRamp()
File "/home/adf/mxj719/.conda/envs/conda_psychopy/lib/python2.7/site-packages/psychopy/visual/backends/pygletbackend.py", line 326, in getGammaRamp
return getGammaRamp(self.screenID, self.xDisplay)
File "/home/adf/mxj719/.conda/envs/conda_psychopy/lib/python2.7/site-packages/psychopy/visual/backends/gamma.py", line 120, in getGammaRamp
rampSize = getGammaRampSize(screenID, xDisplay=xDisplay)
File "/home/adf/mxj719/.conda/envs/conda_psychopy/lib/python2.7/site-packages/psychopy/visual/backends/gamma.py", line 285, in getGammaRampSize
raise RuntimeError("Gamma ramp size is reported as 0.")
RuntimeError: Gamma ramp size is reported as 0.
Segmentation fault
This is a common problem it seems:
https://discourse.psychopy.org/t/gamma-problem-in-v1-90-2/4549
But each solution involves either switching the visual.Window type to pygame (which is now archaic for psychopy) or glfw (which is not a simple setup and is very new and not well documented). I would like a solution that allows me to continue using pyglet.
Another solution given involves ensuring that xf86-video-intel is installed to give a sensible LUT size, I have tried this and it seems that this driver is installed as default on Ubuntu 18, so this does not work for me.
Someone else mentions that I could comment out the RuntimeError in the source code but I could not find those lines of code where they pointed it out. (/usr/lib/python2.7/dist-packages/psychopy/visual/backends/gamma.py).
Please also note that I have tried both the python2.7 and python3.5 psychopy install instructions with anaconda as outlined here:
http://psychopy.org/installation.html
Another solution given involves ensuring that xf86-video-intel is installed to give a sensible LUT size, I have tried this and it seems that this driver is installed as default on Ubuntu 18, so this does not work for me.
You might need to set the driver in a configuration file. To do this, edit your /etc/X11/xorg.conf.d/20-intel.conf file (or create it if it does not exist) to contain the following lines:
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
EndSection

mysql.connector+mysql hangs on fetching

I have a database that is accessed from python3 script using mysql.connector. Mysql version is 5.5.58-0ubuntu0.14.04.1, tested on Linux Mint 17 x64 and a few other Linux machines. The script requests a chunk of data (from tens to about five thousand records) and then sends about ten times as many single-row requests. After that, the connection is closed and a new one opens to do the same. Alternatively, several connections are run in parallel. The entire script is available at github
It works fine for ~5 to ~50 times (per process, if launched in multiprocessing pool), then hangs. The python3 process is sleeping, mysql shows a single sleeping connection per process. If the script is killed, the traceback is following:
Traceback (most recent call last):
File "/home/morozov/tools/phylome/process_outers.py", line 116, in <module>
r = wrapper(fasta)
File "/home/morozov/tools/phylome/process_outers.py", line 108, in wrapper
password=args.p, database=args.d)
File "/home/morozov/tools/phylome/process_outers.py", line 43, in process_fasta
result = cursor.fetchall()
File "/usr/local/lib/python3.4/dist-packages/mysql/connector/cursor.py", line 825, in fetchall
(rows, eof) = self._connection.get_rows()
File "/usr/local/lib/python3.4/dist-packages/mysql/connector/connection.py", line 671, in get_rows
rows = self._protocol.read_text_result(self._socket, count)
File "/usr/local/lib/python3.4/dist-packages/mysql/connector/protocol.py", line 309, in read_text_result
packet = sock.recv()
File "/usr/local/lib/python3.4/dist-packages/mysql/connector/network.py", line 245, in recv_plain
read = self.sock.recv_into(packet_view, rest)
KeyboardInterrupt
After restarting the script, the file it hang on is processed alright and it hangs on some other one down the line. What should I fix to keep it running?
Still not the slightest idea what was wrong, but using pymysql instead of mysql.connector fixed it.

Stanford Tagger in nltk not working due to JVM parameters

I am having a wired error while running following example code snippet
st = StanfordTagger('bidirectional-distsim-wsj-0-18.tagger')
st.tag('What is the airspeed of an unladen swallow ?'.split())
The first line worked properly but second line is giving following error.
Could not create the Java virtual machine.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.6/dist-packages/nltk-2.0.1rc1- py2.6.egg/nltk/tag/stanford.py", line 51, in tag
return self.batch_tag([tokens])[0]
File "/usr/local/lib/python2.6/dist-packages/nltk-2.0.1rc1-py2.6.egg/nltk/tag/stanford.py", line 77, in batch_tag
stdout=PIPE, stderr=PIPE)
File "/usr/local/lib/python2.6/dist-packages/nltk-2.0.1rc1-py2.6.egg/nltk/internals.py", line 166, in java
raise OSError('Java command failed!')
OSError: Java command failed!
I have tried adding .usr/lib/jvm into path but still not working
It wasn't working for me either. So I tried the following and its working perfectly.
st = POSTagger('path-to/stanford-postagger-full-2012-07-09/models/wsj-0-18-left3words.tagger','path-to/stanford-postagger-full-2012-07-09/stanford-postagger.jar')
and use nltk's tokenize method instead of Python's split()
taggedSentence= st.tag(nltk.word_tokenize(sentence))
I see that question is very outdated, but this days I got same error for unknown reason. It gives me a lot of headache. But I found solution.
First, I installed Oracle Java (here is instructions: How To Manually Install Oracle Java on a Debian or Ubuntu VPS)
Now, my python script told me more information on error. It outputs something like:
Forking JVM: error=12, Cannot allocate memory or error=12, Not enough space
Here you can read more about such problem: Forking the JVM
And to avoid that annoying error I need to edit /etc/sysctl.conf and add the following:
vm.overcommit_memory = 1
Then restart system for the change to take effect.