fabric: Stacktrace on error? - stack-trace

If a fabric command fails, we get the below output.
But it would be very good for debugging to get a stacktrace.
I looked at fab --help and could not find an answer.
Here is our current output:
[remote-host] out:
Fatal error: run() received nonzero return code 1 while executing!
Requested: ...
Executed: /bin/bash -l -c "source /localhome/foo_eins_dtg/bin/activate && ...
Aborting.
Disconnecting from foo_eins_dtg#remote-host... done.
Disconnecting from root#remote-host... done.
How to get a stacktrace if the fabric command failes?

Up to now it is not possible. I asked on the mailing list.
bitprophet (the author) opened a ticket for the feature request:
https://github.com/fabric/fabric/issues/1200

Related

Error: 'kethrow' isn't a type. kethrow _ClientSocketException(error, request.url);

Building flutter application is giving an error.When i try to build my application the error is occured.
The error is:
**/C:/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.13.5/lib/src/io_client.dart:88:7: Error: 'kethrow' isn't a type.
kethrow _ClientSocketException(error, request.url);
^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.13.5/lib/src/io_client.dart:88:15: Error: Expected ';' after this.
kethrow _ClientSocketException(error, request.url);
^^^^^^^^^^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.13.5/lib/src/io_client.dart:88:43: Error: Expected ')' before this.
kethrow _ClientSocketException(error, request.url);
^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.13.5/lib/src/io_client.dart:48:30: Error: A non-null value must be returned since the return type 'IOStreamedResponse' doesn't allow null.
- 'IOStreamedResponse' is from 'package:http/src/io_streamed_response.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.13.5/lib/src/io_streamed_response.dart').
package:http/src/io_streamed_response.dart:1
Future<IOStreamedResponse> send(BaseRequest request) async {
^
3
FAILURE: Build failed with an exception.
* Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1156
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 5m 45s
Exception: Gradle task assembleDebug failed with exit code 1**
How to fix this error.Thanks in advance.
I ran into this error a few days ago. It is strangely from the dart file. Mine was 'heethrow'. I corrected it by following the link to the file: /C:/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.13.5/lib/src/io_client.dart.
How to go about it:
Open location /C:/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.13.5/lib/src/ in Visual Studio Code
inside the src folder, open io_client.dart
(make sure you're in the io_client.dart inside the src folder)
Once you're in io_client.dart, locate the place with the error: in your case, it says 88:7 that is, line 88 column 7. Scroll to line number 88 and change 'kethrow' to 'throw'
the errors in the other places as marked in the image below should be corrected and your io_client.dart should be error free.
Note: other files outside io_client.dart might mark red indicating errors but never mind. Just save your changes in the io_client.dart file and close the file. Once closed
Open your project again and run flutter clean in the terminal.
next run flutter pub get
next run flutter pub upgrade
run your app again, everything should work fine.
But I'd advise you don't always go into those files to edit anything. I did that because I've tried every possible solution and needed to deliver my work. I even installed Visual Studio for Windows as suggested by flutter doctor, but that was not the solution.

ERROR: Command errored out with exit status 128

I'm trying to download internal Git on Google Colab for running ML models; however, at first, I download like this
!pip install git+https://dev.azure.com/xxxxx/xxxxxx
It shown error so I found out in this website https://qdmana.com/2022/02/202202190011230865.html, showing that replace https with git like this may help.
!pip install git+git://dev.azure.com/xxxxx/xxxxxx
Nevertheless, it still shown the error as below,
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Collecting git+git://dev.azure.com/xxx/xxx
Cloning git://dev.azure.com/xxx/xxx to /tmp/pip-req-build-mmz02x7l
Running command git clone -q git://dev.azure.com/xxx/xxx /tmp/pip-req-build-mmz02x7l
fatal: unable to connect to dev.azure.com:
dev.azure.com[0: 13.107.42.20]: errno=Connection timed out
dev.azure.com[1: 2620:1ec:21::20]: errno=Cannot assign requested address
WARNING: Discarding git+git://dev.azure.com/xxx/xxx Command errored out with exit status 128: git clone -q git://dev.azure.com/xxx/xxx /tmp/pip-req-build-mmz02x7l Check the logs for full command output.
ERROR: Command errored out with exit status 128: git clone -q git://dev.azure.com/xxx/xxx /tmp/pip-req-build-mmz02x7l Check the logs for full command output.
How do we address this issue?
Use codes below instead:
git clone https://{your username}:{your password}#dev.azure.com/xxxxxxx

Continue after a failing command in appveyor

In appveyor I use the statement:
- initexmf --admin --force --mklinks
but due to a problem it gives the message:
initexmf --admin --force --mklinks
Sorry, but "MiKTeX Configuration Utility" did not succeed for the following reason:
Script configuration file not found.
The log file hopefully contains the information to get MiKTeX going again:
C:\ProgramData\MiKTeX\2.9\miktex\log\initexmf_admin.log
The system cannot find the path specified.
Command exited with code 1
due to the error code the process terminates and I cannot type the C:\ProgramData\MiKTeX\2.9\miktex\log\initexmf_admin.log anymore, so a bit hard to debug ...
questions:
How to continue after an error
How to stop after the outputting the file (exit 1 ?)
To run a script on failure use on_failure section, for example to push initexmf_admin.log to artifacts:
on_failure:
- appveyor PushArtifact C:\ProgramData\MiKTeX\2.9\miktex\log\initexmf_admin.log

How to debug program compilation when Perl module fails

I'm trying to compile Slic3r 1.2.9 (Git 65a23b) on Raspbian, and running sudo perl Build.PL --verbose fails while building the Perl module Time-HiRes-1.9754:
...
--> Working on Time::HiRes
Fetching http://www.cpan.org/authors/id/J/JH/JHI/Time-HiRes-1.9754.tar.gz ... OK
Configuring Time-HiRes-1.9754 ... FAIL
! Timed out (> 60s). Use --verbose to retry.
! Configure failed for Time-HiRes-1.9754. See /root/.cpanm/work/1520227993.988/build.log for details.
The log file shows a little more information, but I've never worked with Perl and I don't know where to start debugging:
$ tail /root/.cpanm/work/1520234788.2186/build.log
Looking for clock_getres()... found.
Looking for clock_nanosleep()... found.
Looking for clock()... found.
Looking for working futimens()... found.
Looking for working utimensat()... found.
You seem to have subsecond timestamp setting.
Looking for stat() subsecond timestamps...
Trying struct stat st_atimespec.tv_nsec...-> FAIL Timed out (> 60s). Use --verbose to retry.
-> N/A
-> FAIL Configure failed for Time-HiRes-1.9754. See /root/.cpanm/work/1520234788.2186/build.log for details.
I've posted an issue with Slic3r on GitHub, but I haven't had any suggestions yet - presumably it's not actually a problem with Slic3r itself.
What should I do next to work out what's going wrong?

nagios/icinga logwarn plugin

I'm using Icinga and logworn for finding "ERROR" in the tomcat logs. The problam is that when it founds an error it marks it as warnning and not error.
I followed this tutorial. I get this message: Log errors: 13:31:47,092 ERROR [LoggingAspect] Unhandled exception caught: com.xxx.filter.AuthenticationProvider authenticat
Can I change it to return an error?
If there are log errors matched, the plugin returns WARNING to Nagios. If you want it to return ERROR just edit the last line of the script. (change to STATE_CRITICAL='2')
I recommend labs.consol.de/nagios/check_logfiles/
check_logfiles --criticalpattern "ERROR" --logfile .../tomcat.log