Thursday, July 29, 2021
Eclipse issue: Could not write metadata for '/RemoteSystemsTempFiles' ... (Access is denied)
Thursday, July 22, 2021
Eclipse: JSF: schema_reference.4: Failed to read schema document 'platform:/plugin/org.eclipse.xsd/cache/www.w3.org/2001/xml.xsd'
>PROBLEM
Eclipse returns on face-config.xml file the following message:
schema_reference.4: Failed to read schema document 'platform:/plugin/org.eclipse.xsd/cache/www.w3.org/2001/xml.xsd'
>SOLUTION
>ENV
Friday, July 16, 2021
Git - Fix Corrupted Object Issue - Simple solution for: error: object file .git/objects ... fatal: loose object ...is corrupt
>PROBLEM
Git pull command fails returning error message of corrupted file:
git pull
error: object file .git/objects/dd/4b0b1a777609ba3f787823e566bfc989905319 is empty
fatal: loose object dd4b0b1a777609ba3f787823e566bfc989905319 (stored in .git/objects/dd/4b0b1a777609ba3f787823e566bfc989905319) is corrupt
>SOLUTION
1.. Copy the corrupted file from another local repository.
If there isn't another, you may clone one.
2. Issue the pull command again.
>ENV
Wednesday, March 31, 2021
Maven: [ERROR] Child module..does not exist @
>PROBLEM
mvn archetype:generate -DarchetypeGroupId=org.codehaus.mojo.archetypes -DarchetypeArtifactId=ejb-javaee7
Returns:
[ERROR] Child module..does not exist @
>SOLUTION
Check your pom.xml.
Also, check the mirror's configuration in the maven's settings.xml file.
Example:
C:\Users\MYLOGIN\.m2\settings.xml
<mirrors>
<mirror>
<id>client-repo</id>
<mirrorOf>*</mirrorOf>
<url>http://xyz.core.cliente:8099/nexus/content/groups/my-group/</url>
</mirror>
</mirrors>
Comment, or remove the mirror that is not providing connection.
If it is a project mandatory resource, then report.
>ENV
Windows10
(Same for *nix or apple except the paths)
Friday, March 12, 2021
JavaScript: error NG8002: Can't bind to 'ngModel' since it isn't a known property of 'input'
>PROBLEM
After adding an implementation to bind using ngModel , for instance:
<p>
<label for="example-ngModel">[(ngModel)]:</label>
<input [(ngModel)]="currentItem.name" id="example-ngModel">
</p>
Return the error message:
error NG8002: Can't bind to 'ngModel' since it isn't a known property of 'input'
>SOLUTION
@SEE: this issue may also be caused by other factors, check:
angular-ngform-error-ng8002-cant-bind.html
Make sure that the app.module.ts has the following configuration:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms'; // <--- JavaScript import from Angular
@NgModule({
declarations: [
AppComponent,
// ...
],
imports: [
BrowserModule,
FormsModule,
AppRoutingModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
In the app.component.ts (or whatever) file, check the import and make sure the constructor() and ngOnInit() are both declared:
import { Component, OnInit } from '@angular/core'; // minimal
//import { Component, OnInit, Output, Input, EventEmitter } from '@angular/core'; // usual
constructor() { }
ngOnInit(): void {
}
>MORE
>ENV
node.js 14.x.x
windows
Tuesday, March 9, 2021
JavaScript: TypeScript: This condition will always return 'true' since the types 'string' and 'EventEmitter' have no overlap.ts(2367)
>PROBLEM
The code below returns the error message:
This condition will always return 'true' since the types 'string' and 'EventEmitter<string>' have no overlap.ts(2367)
*** BAD
crossOffItem(event: EventEmitter<string>): void {
const ritems = this.items.filter( it => it !== event);
this.items = ritems;
}
>SOLUTION
TypeScript complains that the types are not explicitly equivalent or comparable.
*** OK
crossOffItem(event: EventEmitter<string>): void {
const ritems = this.items.filter( it => it !== event.toString());
this.items = ritems;
}
POOR SOLUTION
crossOffItem(event: EventEmitter<string>): void {
const val = event.toString();
const ritems = this.items.filter( it => it !== val);
this.items = ritems;
}
>ENV
Wednesday, March 3, 2021
Oracle Cloud: Linux VM denies access returning "oracle cloud public key WARNING: UNPROTECTED PRIVATE KEY FILE" message
>PROBLEM
>SOLUTION
>ENV
Windows 10
Debian 10/VMware
Tuesday, March 2, 2021
legacy: Netbeans v.6.7.1 Installation - JDK not found issue
>PROBLEM
>SOLUTION
Saturday, February 20, 2021
Git: FAILURE DUE TO CORRUPTED FILE: remote: error: inflate: data stream error ... remote: error: unable to unpack ... remote: fatal: loose object ... error: remote unpack failed:
>PROBLEM
>SOLUTION
After some research, the best documentation to fix this was "Recovering from repository corruption" but also comments that against corruption the best alternative is a backup.
Although having backups, it didn't help in this case because the backups also had exactly the same issue since a backup is a copy. Because it is not an incremental copy, the backup was useless.
SAVING THE PAST
Faster than trying to fix it for the sake of time saving, the corrupted remote repository was renamed from "code" to "code_corrupted_200220" and saved its copy.
This backup may be used to get some previous commit, or even an attempt to fix it if really necessary just because it is required an old version of a file. Since "clone" command was able to clone to local repository although the warning, this corrupted remote repository is still useful to recover old stuff.
GOING AHEAD WITH THE FUTURE
mkdir clone
cd clone
The old one is preserved in the backup mentioned above, just in case.
The procedure was usual except that it is required to set upstream, resembling the procedure when a remote repository is switched (git remote remove origin, git remote add origin new_path).
git commit -am "MACHINE_NAME: corrupted remote repository switching"
git pull origin master
git push --set-upstream origin master
The same procedure was repeated to all local clients.
In such cases it would be useful to have two files in different positions on the disk, in order to recover the information from a particular damaged disk position. This should be really an option because it would double the resources' requirement, but sometimes it is a desirable option if hardware has the power to supply this redundancy without being noticeable and disk space is not a restriction.
The full disk was checked successfully. No errors found, except this occurrence.
>ENV
Monday, February 15, 2021
How to use VS Code with Multiple Configurations with Backup
>PROBLEM
You need to work with different environments and workspaces for different purposes when working with different programming languages or different contexts.
For each context or environment, you've installed the desired extensions.
Also, it is interesting to keep a backup of the environment to save time.
What does happen next?
If you have just one configuration setup and many needs, the VS Code configuration begins growing, eventually getting heavy, slow, and taking too much memory.
Also, the extensions' default shortcuts begin to conflict with each other.
>SOLUTION
There are at least three approaches:
1. Versioning control using branches, or
2. Separate configuration folders, or
3. Option 1 plus option 2.
Versioning control using branches
The VS Code default folder that holds its configuration setup is under
"C:\Users\YOUR_LOGIN\.vscode" folder.
Create a git repository there.
For each kind of environment desired, create a specific branch.
The master branch would aggregate everything, but in this case, there is no use unless you do want to keep a backup of just one setup.
Separate configuration folders
The default folder is at:
%USERPROFILE%\.vscode\extensions
Before creating the symbolic link, move the default extension folder to the new place desired, then create it:
mklink /D %USERPROFILE%\.vscode\extensions "NEW_PATH_DESIRED\extensions"
Ex.:
mklink /D C:\Users\YOUR_USER\.vscode\extensions "D:\ide_home\vscode\Code\extensions"
Option 1 plus option 2
You may combine the two options above, but better if the branches keep a keyword to avoid losing control.
The best of all is that you never lose your env, never need to reconfigure, and may switch fast the environments preserving then VS Code app from getting messed and slow.
ATTEMPT FAILURE NOTE
Wednesday, February 3, 2021
Blue Screen with one of the following messages: windows system error STATUS_WAIT_2 0x80070002 or windows system error STATUS_WAIT_3 0x80070003
>PROBLEM
When rebooting the machine, returned blue screen with the following message:
windows system error STATUS_WAIT_3 0x80070003
Another attempt, returned another message:
windows system error STATUS_WAIT_2 0x80070002
>SCENARIO
The machine was very, very slow, and once in a while appeared "bad clusters". This situation took several weeks. During all this time, the checklist below passed:
HD fragmentation: OK
HD S.M.A.R.T. status and test: OK
Scandisk: no errors, OK
Antivirus: disabled during the tests.
Unexpected processes consuming CPU's resources: none
Internet connection: disabled
All programs closed, just the usual services were turned on.
Hardware temperature: OK
Windows Registry: OK
Suddenly, when a reboot is done, the blue screen with the messages.
All attempts possible were performed — all "Windows Recovery" options failed, returning messages like "not possible", "done but failed", and things like that. Fixing reboot, cloning a new reboot partition from a backup HD, attempt to restore an image or restore the system from a "restore point" and etc. had failed.
>SOLUTION
The HD was removed from the slot and inserted back twice.
An intermittent bad contact caused maybe by slight oxidation, dust, vibration, etc. was causing the unexpected "bad blocks".
In this scenario, the Windows system made an automatic update that was not able to get to the end.
Considering the two problems together plus interrupted update procedure, the mess was complete.
The solution came, after solving the contact issue, let Windows finishes the update. Long and twice, but the issue was solved but the system was inconsistent, missing several DLLs, requiring more one more solution.
This time at least was possible to restore to a previous point before the unlucky Windows update and perform again that required update.
When rare events happen to get together at the same time, just Murphy explains! :-)
Eventually, the system was up and running again!
Well done Windows!!! Wow!!!
>ENV
Saturday, January 23, 2021
Git: Updates were rejected because a pushed branch tip is behind its remote counterpart
>PROBLEM
Git push fails returning "Updates were rejected because a pushed branch tip is behind its remote counterpart...".
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to .. SOME DIR PATH
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
>SOLUTION
Following the hint suggested in the output:
git push --help
The --force option solves:
git push --force origin master
Because it was behind the counterpart, it may cause some side effect on log.
When performed the command, everything was fine, no issues, but another client had to push with --force flag too, but no further issues.
>ENV
Windows 10
Git version 2.19.1.windows.1
Tuesday, January 19, 2021
Slow Machine? Warn Up - Check this before it is too late
>PROBLEM
Also, you have noticed that the system requires HD fixes, leading to scans to fix block references, more frequently than usual.
>SOLUTION
Free: HD Clone, Disk Genius
Paid: DriveClone, EaseUS Partition Master
TIP
If you have split your HD into two partitions, for instance, "C:" for Windows and "D:" for data, you get a better chance to solve this issue and gain more time until the HD replacement by moving your data on "D:" partition to another disk and deleting D:.
In this case, the HD will be less required and the issue may slow down, giving you an extra time before the HD substitution, something that may save you time, money and opportunity.
I've solved recently an issue like this just deleting the data partition. The HD got half work to do, so the situation became bearable. On the remaining free space, I cloned the "C:", getting to "C:" partitions on the same disk, but one of them disable at a time. If the HD's initial boot is preserved, when the active "C:" partition is gone, you may switch to the other just activating it. After you finish your work, you may clone the active "C:" partition to replace the defective one.
This saved me many hours during an urgent work that I couldn't stop for long maintenance and enabled me to deliver the task on time.
Always consider using different partitions for the system and the data, even if working with other S.O. different of Windows.
>ENV
Git rebase fails to continue
>PROBLEM
git pull --rebase
Details here
>SOLUTION
>ENV
Monday, January 18, 2021
git: 'credential-cache' is not a git command. See 'git --help'.
>PROBLEM
git: 'credential-cache' is not a git command. See 'git --help'.
>SOLUTION
Edit .git\config fille and remove:
[credential]
helper = cache
>ENV
Windows 10
Tuesday, December 15, 2020
MariaDB: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
>PROBLEM
This procedure resets the MariaDB root password when it is not possible to access the database returning:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
>SOLUTION
- Stop database:
sudo systemctl stop mariadb
- Test:
sudo systemctl status mariadb
You shall get;
Status: "MariaDB server is down"
To return to console, use Ctrl+C
- This command shall return empty:
sudo pgrep mysqld
- Starting the database using safe mode:
sudo mysqld_safe --skip-grant-tables --skip-networking &
or
sudo mysqld_safe --skip-grant-tables &
"Enter" to return to prompt.
USING A TEMPORARY PASSWORD
mysql -u root
use mysql;
flush privileges;
update user SET PASSWORD=PASSWORD('secret') WHERE USER='root';
GRANT ALL PRIVILEGES ON root.* TO 'root'@'localhost' WITH GRANT OPTION;
flush privileges;
quit
- kill all mysqld processes
sudo pgrep mysqld
- Kill by the PID numbers returned, for example:
sudo kill -9 1234
sudo kill -9 4567
- Start the database:
sudo systemctl start mariadb
WHEN THE DATABASE FAILS TO START
- To check:
TESTING AND SWITCHING TO DEFINITIVE PASSWORD
- Access the database again to test the "secret" temporary password and also to change to the definitive password:
mysql -u root -p
pass: secret
use mysql;
flush privileges;
UPDATE mysql.user SET authentication_string = PASSWORD('MY_DEFINITIVE_PASSWORD') WHERE User = 'root' AND Host = 'localhost';
GRANT ALL PRIVILEGES ON root.* TO 'root'@'localhost' WITH GRANT OPTION;
GRANT RELOAD ON *.* TO 'root'@'localhost';
flush privileges;
quit
- Access the database again to test the definitive password:
mysql -u root -p
pass: MY_DEFINITIVE_PASSWORD
***NOTE:
If after switching to the definitive password, the problem comes back denying access, it is because the characters used in the password caused the issue.
Avoid password like this:
Abc1234#-_ (the -_ didn't work during my attempts)
For sure, use a password with just numbers and letters.
To get confidence, repeat the procedure.
If you desire to use special chars, you may try after making sure that you got success at least once, that way you may discover which special char to avoid in your password.
>ENV
debian 10/9
10.x , 10.3.27-MariaDB
DIFFERENT BEHAVIORS DUE TO ENVIRONMENT DIFFERENCES
This procedure was executed several times successfully, but you may get some issue with some command shown above.
Below, there are some alternatives, not all of them of course, that you may try if some command fails.
set password for 'root'@'localhost' = password('secret');
- or
ALTER USER 'root'@'localhost' IDENTIFIED BY 'secret';
ADDITIONAL SOURCES
www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password
robbinespu.github.io/eng/2018/03/29/Reset_mariadb_root_password.html
ALTERNATIVE SITE
alsdias.blogspot.com/2020/12/mariadb-error-1045-28000-access-denied.html
@SYSREF:
y;reset root password<memo<mariadb;.
Monday, December 14, 2020
Wi-Fi modem/router fails to connect via wi-fi or RJ-45
>PROBLEM
The "ZTE MF253L LTE Wireless" Wi-Fi modem/router sometimes fails to accept Wi-Fi connections and comes with issues when using RJ-45.
A very odd defect that occurred after some years of usage.
>SOLUTION
ZTE MF253L has not a wide signal range but works well.
Instead of buying another modem/router, I decided to use a tp-link Wireless N 450Mbps router, model TL-WR940N, connected to the ZTE's internet output, using the RJ-45 cable.
The TL-WR940N model has a good signal range.
Now, I connect the notebooks direct to the tp-link router, instead of to the ZTE's, solving the connection issues. No more problems, at all.
Sometimes, when the ZTE's direct connection is not failing, it is possible to use it without the tp-link, but it is not an advantage at all, but remains as an alternative in case of a casual tp-link failure.
When the provider's connection fails, the Window's wi-fi connections keeps the tp-link router active waiting and as soon as the connection is on again and nothing is changed on the notebooks connected to the tp-link.
This saves time when the failures are short.
If not, you may connect to the tp-link another modem/router using another number, a second option when you have it, without changing clients' configurations. If you have many machines, it helps a lot.
For some reason, sometimes Windows fails to reconnect the Wi-Fi, forcing to do a reboot.
This workaround also avoids this reboot.
Thursday, November 26, 2020
Git: ! [remote rejected] master -> master (unable to migrate objects to permanent storage) error: failed to push some refs to 'ssh://REPOSITORY_PATH_HERE'
>PROBLEM
git push
! [remote rejected] master -> master (unable to migrate objects to permanent storage)
error: failed to push some refs to 'ssh://REPOSITORY_PATH_HERE'
>SOLUTION
For instance, supposing:
/home/git/myProject
>ENV
Windows (client)
Sunday, September 27, 2020
Online Tool to Convert Text to HTML with Pre-defined Tags And Selectors
>PROBLEM
You want to copy a code snippet and paste into an HTML page that has its own CSS selectors.
For example, you are working on Eclipse, VSCode, Atom, Sublime, etc. and you wish to copy and paste the snippet below to your post in HTML.
server { server_name marketing.example.com marketing.example.org marketing. example.net; rewrite ^ http://www.example.com/marketing/application.do permanent; } server { server_name communication.example.com communication.example.org communication.example.net; rewrite ^ http://www.example.com/comms/index.cgi permanent; } server { server_name www.example.org www.example.net; rewrite ^ http://www.example.com$request_uri permanent; }
>SOLUTION
You may try ultering.com/it4us/converter, a free online tool, that offers fast shortcuts. For instance, paste the text in the box and try CTRL+.
Saturday, September 26, 2020
nginx install: debian: Job for nginx.service failed because the control process exited with error code
>PROBLEM
Returns:
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details. invoke-rc.d: initscript nginx, action "start" failed. ● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sat 2020-09-26 22:49:18 UTC; 7ms ago Docs: man:nginx(8) Process: 21405 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE) Process: 21404 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Sep 26 22:49:17 mind4y.com nginx[21405]: nginx: [emerg] listen() to [::]:80, backlog 511 failed (98: Address already in use) Sep 26 22:49:17 mind4y.com nginx[21405]: nginx: [emerg] listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use) Sep 26 22:49:17 mind4y.com nginx[21405]: nginx: [emerg] listen() to [::]:80, backlog 511 failed (98: Address already in use) Sep 26 22:49:18 mind4y.com nginx[21405]: nginx: [emerg] listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use) Sep 26 22:49:18 mind4y.com nginx[21405]: nginx: [emerg] listen() to [::]:80, backlog 511 failed (98: Address already in use) Sep 26 22:49:18 mind4y.com nginx[21405]: nginx: [emerg] still could not bind() Sep 26 22:49:18 mind4y.com systemd[1]: nginx.service: Control process exited, code=exited status=1 Sep 26 22:49:18 mind4y.com systemd[1]: Failed to start A high performance web server and a reverse proxy server. Sep 26 22:49:18 mind4y.com systemd[1]: nginx.service: Unit entered failed state. Sep 26 22:49:18 mind4y.com systemd[1]: nginx.service: Failed with result 'exit-code'. dpkg: error processing package nginx-full (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of nginx: nginx depends on nginx-full (<< 1.10.3-1+deb9u4.1~) | nginx-light (<< 1.10.3-1+deb9u4.1~) | nginx-extras (<< 1.10.3-1+deb9u4.1~); however: Package nginx-full is not configured yet. Package nginx-light is not installed. Package nginx-extras is not installed. nginx depends on nginx-full (>= 1.10.3-1+deb9u4) | nginx-light (>= 1.10.3-1+deb9u4) | nginx-extras (>= 1.10.3-1+deb9u4); however: Package nginx-full is not configured yet. Package nginx-light is not installed. Package nginx-extras is not installed. dpkg: error processing package nginx (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: nginx-full nginx E: Sub-process /usr/bin/dpkg returned an error code (1)
>SOLUTION
nginx[21405]: nginx: [emerg] listen() to 0.0.0.0:80
Switch Nginx or Apache to another port.
In this case, Nginx is switched to port 81.
1. Edit:
/etc/nginx/sites-enabled/default
Switch from:
server {
listen 80 default_server;
listen [::]:80 default_server;
To:
server {
listen 81 default_server;
listen [::]:81 default_server;
2. Start nginx
>EXTRA
apt update
apt autoremove
- verifying dependencies:
apt -f install
>ENV
Sunday, September 6, 2020
Clients fail to Connect Debian on VMWare Virtual Machine
>PROBLEM
VMWare has ping to host but host has not ping to the VMWare running Debian.
>SOLUTION
First, you must make sure that the VMWare network interface configuration is correct.
Summarizing: it is required two interfaces at least.
One for the Internet that it is mapped to NAT, and a second to access a local network, for instance, that shall be mapped to the local interface on your host. If Windows, you may access the network interfaces using the command: ncpa.cpl.
Map in the network interfaces using the same order.
For instance, if the guest is a Debian and has eth0 (Internet) and eth1(local), map the network adapters in VMWare's settings using the same order.
https://appuals.com/fix-vmware-bridged-network-not-working/
service network-manager restart
Try to ping your VM:
ping 10.0.0.XX
IMPORTANT NOTE
Sometimes the VPN impedes the access.
Test disconnecting the VPN.
>ENV
VMWare 8 running Debian 7 or 10
VMWare 15.5 running Debian 7 or 10
Thursday, August 13, 2020
When you type a command and opens Windows Store or another
>PROBLEM
For instance, on console, you type python and opens instead Windows Store panel or another program.
>SOLUTION
- Go to:
C:\Users\your_user_login_here\AppData\Local\Microsoft\WindowsApps
- Possibly, there is an equivalent command shadowing the one you really wish.
Delete it or rename it.
That's it.
Saturday, July 11, 2020
Angular: fallbackLoader option has been deprecated
>PROBLEM
ng serve
...
fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
...
webpack: Compiled successfully.
>SOLUTION
If using angular-cli, do:
npm uninstall -g angular-cli
npm install -g @angular/cli
If desired to perform just local changes, take out the "-g" option.
Sometimes, when a project is recently created using deprecated packages, it is faster to recreate the project using the new env, up to date.
>env
node.js
angular
Sunday, June 7, 2020
GPG error: ... The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8C718D3B5072E1F5
>PROBLEM
>SOLUTION
apt-get update
apt-get update
>ENV
eclipse: java: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" or Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
>PROBLEM Using Eclipse, you try to run a simple logging test using "org.slf4j.Logger" like the sample below: package Test; im...
-
>PROBLEM Using JSF, Primefaces and p:growl the messages return duplicated (twice). This kind of issue may have alternative reasons. On ...
-
>PROBLEM An attempt to update the local repository using pull and push fails returning the following message: ... ! [remote rejected] m...