Firebase Emulator crashes when exporting on exit (usually) - firebase-tools

I am using firebase v10.1.0 on Win 11
I start the emulator with this command
firebase emulators:start --import=fssave --export-on-exit
i emulators: Starting emulators: auth, firestore, storage
! emulators: It seems that you are running multiple instances of the emulator suite for project winetrak-fs-81ade. This may result in unexpected behavior.
The emulator functions normally
and when I shutdown with Ctrl/C I usually get
i emulators: Received SIGINT (Ctrl-C) for the first time. Starting a clean shutdown.
i emulators: Please wait for a clean shutdown or send the SIGINT (Ctrl-C) signal again to stop right now.
i Automatically exporting data using --export-on-exit "fssave" please wait for the export to finish...
Terminate batch job (Y/N)?
Error: Storage Emulator Rules runtime exited unexpectedly.
i Found running emulator hub for project winetrak-fs-81ade at http://localhost:4400
i Exporting data to: C:\Dev\React\winetrak-fs-3\fssave
i emulators: Received export request. Exporting data to C:\Dev\React\winetrak-fs-3\fssave.
When it fails a new directory is created in my project root firebase-export-1642926986972SzSRxD
WARNING: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.io.IOException: An existing connection was forcibly closed by the remote host
at java.base/sun.nio.ch.SocketDispatcher.read0(Native Method)
at java.base/sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276)
at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:233)
at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:223)
at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:358)
at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:253)
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1133)
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
Occasionally this works fine

I had the same issue. Fixed it by switching to Java JDK 18. Found the solution in an open issue comment https://github.com/firebase/firebase-tools/issues/3799#issuecomment-1219730810
I'm on the firebase-tools version 11.16.1.

Related

Detect network error and retry running task in Azure

Running bash script in Azure pipeline. I am trying to rerun the npm publish step x-times if there is any network error is detected.
Is there any way to detect a network error specifically and rerun the whole task again?
I've found this document (https://learn.microsoft.com/en-us/azure/devops/release-notes/2021/sprint-195-update#automatic-retries-for-a-task) but I believe this reruns the process regardless of the error type.

ApacheDS - default service fails to start on Windows

I have been trying to start ApacheDS service on windows for a while, but failed.
I want to connect to LDAP but the ApacheDS service can't start.
I tried to check my wrapper log file and found the error -
Unable to load the Wrapper's native library 'wrapper.dll'.
However, I am running a 64-bits JVM and my computer has 64-bits as well. How can I find the wrapper.dll file of 64-bits, if it is the cause to the error?
I hope if this error gets fixed, I will be able to connect LDAP without error: [LDAP result code 52 - unavailable] Proxy operation retry failed.
Thank you for your assistance.
wrapper log file

Composer-Rest-Server not connecting

I am testing a a business network I created, I ran the Composer-rest-server and all worked fine, then shut the server as suggested in the developers guide , then I proceeded use the yo hyperledger composer to create the skeleton of the angular app, however, now the angular app is showing in the local browser, however, the composer-rest- server is not.
Expected Behavior:
I should start the composer-rest- server in localhost:3000 and the angular app as well
Actual Behavior:
I get this message;
scovering types from business network definition ...
Connection fails: Error: Error trying to ping. Error: Error trying to query chaincode. Error: Connect Failed
It will be retried for the next request.
Exception: Error: Error trying to ping. Error: Error trying to query chaincode. Error: Connect Failed
Error: Error trying to ping. Error: Error trying to query chaincode. Error: Connect Failed
at _checkRuntimeVersions.then.catch (/home/node/.nvm/versions/node/v6.11.2/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:696:34)
Your Environment
composer-cli#0.11.3
generator-hyperledger-composer#0.11.3
composer-rest-server#0.11.3
Docker version 17.06.0-ce, build 02c1d87
docker-compose version 1.13.0, build 1719ceb
The Problem
If you kill your fabric instance using ./stopFabric that you started using the ./startFabric command then all the containers that were apart of the business network were killed as well and therefore you need to reinstall the .bna and start the network again. (the development flow provided is purposely volatile for rapid development)
The Solution
1.) Type docker ps to see all of your running containers. You should see none if you are getting that error because your peer is not responding to pings
2.) Open a separate terminal and navigate to where you have fabric-dev-servers in the terminal and run ./fabricStart. This will start all the containers like your network Certificate Authority, the peer, the orderer, etc.
3.) Return to your project in another terminal. Do Step 1 & 2 found at the developer tutorial (you likely won't need to do step 3 since you likely already imported the network administrator identity going through the tutorial)
4.) Run composer network ping --card admin#tutorial-network. The ping should go through.
5.) Run docker ps. You should see 4 containers running
6.) Run composer-rest-server and follow the steps from the tutorial.
7.) Run cd tutorial-network-app to switch to where your angular application is (or wherever you generated it with the yo command)
8.) Navigate to http://localhost:3000 and everything should work.
Any other questions or problems just reply here and I can help.
The expected behaviour is that the REST server is already running (the the generator uses Loopback to spin up a REST server already (that's why you shut down the previous REST server)). Its described here https://hyperledger.github.io/composer/unstable/tutorials/developer-guide.html under 'Generate your Skeleton Web Application'.
After you created the application - following completion of the yo hyperledger-composer questions (and after providing the answers) you run your application using npm start from within the generated application directory. Your app is accessible at http://localhost:4200.

How to run jenkins slave on windows 2012 r2 x64?

We want to use jenkins to build some specific software on Windows 2012 R2 x64.
But when I trying to run it, master node fails whis this error:
Connecting to 192.168.1.27
Checking if Java exists
C:\Program Files\Java\jdk1.6.0_30\bin\java.exe -version returned 1.6.0.
Installing the Jenkins slave service
ERROR: Message not found for errorCode: 0xC00000AC
org.jinterop.dcom.common.JIException: Message not found for errorCode: 0xC00000AC
at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKLM(JIWinRegStub.java:102)
at hudson.util.jna.DotNet.isInstalled(DotNet.java:77)
at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:292)
at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:222)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
Caused by: jcifs.smb.SmbException: All pipe instances are busy.
at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:563)
at jcifs.smb.SmbTransport.send(SmbTransport.java:664)
at jcifs.smb.SmbSession.send(SmbSession.java:238)
at jcifs.smb.SmbTree.send(SmbTree.java:119)
at jcifs.smb.SmbFile.send(SmbFile.java:775)
at jcifs.smb.SmbFile.open0(SmbFile.java:989)
at jcifs.smb.SmbFile.open(SmbFile.java:1006)
at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:142)
at jcifs.smb.TransactNamedPipeOutputStream.<init>(TransactNamedPipeOutputStream.java:32)
at jcifs.smb.SmbNamedPipe.getNamedPipeOutputStream(SmbNamedPipe.java:187)
at rpc.ncacn_np.RpcTransport.attach(RpcTransport.java:91)
at rpc.Stub.attach(Stub.java:104)
at rpc.Stub.call(Stub.java:109)
at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKLM(JIWinRegStub.java:100)
and I don't know what is wrong.
Yes, I've read this carefully.
upd. ok. I removed server from domain. Now jenkins says:
Connecting to 192.168.1.27
Checking if Java exists
C:\Program Files\Java\jdk1.6.0_30\bin\java.exe -version returned 1.6.0.
Installing the Jenkins slave service
Copying jenkins-slave.exe
Copying slave.jar
Copying jenkins-slave.xml
Registering the service
Starting the service
Waiting for the service to become ready
ERROR: The service did not respond. Perhaps it failed to launch?
In EventViewer I see:
Service cannot be started. System.ComponentModel.Win32Exception: The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at winsw.WrapperService.StartProcess(Process process, String arguments, String executable)
at winsw.WrapperService.OnStart(String[] _)
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
I had the same issue on on Windows 2012 R2 x64:
Installing the Jenkins slave service
ERROR: Message not found for errorCode: 0xC00000AC
org.jinterop.dcom.common.JIException: Message not found for errorCode: 0xC00000AC
at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKLM(JIWinRegStub.java:102)
at hudson.util.jna.DotNet.isInstalled(DotNet.java:77)
at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:292)
at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:228)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: jcifs.smb.SmbException: All pipe instances are busy.
at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:563)
at jcifs.smb.SmbTransport.send(SmbTransport.java:664)
at jcifs.smb.SmbSession.send(SmbSession.java:238)
at jcifs.smb.SmbTree.send(SmbTree.java:119)
at jcifs.smb.SmbFile.send(SmbFile.java:775)
at jcifs.smb.SmbFile.open0(SmbFile.java:989)
at jcifs.smb.SmbFile.open(SmbFile.java:1006)
at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:142)
at jcifs.smb.TransactNamedPipeOutputStream.<init>(TransactNamedPipeOutputStream.java:32)
at jcifs.smb.SmbNamedPipe.getNamedPipeOutputStream(SmbNamedPipe.java:187)
at rpc.ncacn_np.RpcTransport.attach(RpcTransport.java:91)
at rpc.Stub.attach(Stub.java:104)
at rpc.Stub.call(Stub.java:109)
at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKLM(JIWinRegStub.java:100)
... 7 more
and have found out, that jenkins slave to be run as a service requires to have .net 3.x installed (which is not by default on win2012 servers).
After having the 3.5 .net framework installed jenkins slave service got installed without issues (and the server remained in domain).
To not loose time in case you'd hit problems while installing 3.5 framework as I did, refer to this SO answer: Offline installer for .Net 3.5 SP1 not working (disabling the WSUS helped me to get the installation through)
I had this issue:
Service cannot be started. System.ComponentModel.Win32Exception: The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at winsw.WrapperService.StartProcess(Process process, String arguments, String executable)
at winsw.WrapperService.OnStart(String[] _)
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
And the problem went away when i changed Path to java executable from :
C:\ProgramData\Oracle\Java\javapath\javaw
to
C:\ProgramData\Oracle\Java\javapath\java
I think 'w' is appended by JENKINS anyway.
I have a Windows 8 slave, which does work. Fair chance the Java path is incorrect, mine is set to C:\Program Files (x86)\Java\jre7\bin\java (yes, no .exe or anything, adjust just the Program (x86) Files part if you want to use x64 version) in Jenkins. I also have remote root set (to C:\jenkins) and I have an environment variable HOME set to C:\jenkins\ (yes, one is with \ and the other without), but that's only to make it easy to find the files after installation.
My slave works, appears online and then after a while (of idling mostly) will have connection issues. Disconnecting and reconnecting will then sometimes give the 'All pipe instances are busy' error, in that case I just have to do Launch slave agent a couple of times. Found your question when trying to solve that particular issue...
First thing, you can Go to the slave machine, Go to Jenkins -> Manage -> Manage Nodes and select the Slave and launch via java web start.
by doing this you will download a .jnlp file and launch it using java configured by you.
Make sure you have configured path to javaws.exe in system variable "PATH"(with version 1.6 or higher).
It will launch a window and and display as "Connected".
Now you can click on "File" and install as service.
This fails giving you an exception if the machine does not have .NET 3.x so make sure you have installed it and then try it again.
This works pretty cleanly without any issues.
Hope this helps.
For me this issue was resolved by uninstalling old java.
I encountered a similar issue, when trying to run the slave(agent) from master(jenkins), after making one configuration change as below it worked fine,
the below settings needs to added in the agent node->configure.
JVM option -Djsse.enableSNIExtension=false
At Jenkins->Agent node, for a windows server 2012 slave configuration

Impossible to run web application in debug mode with intelliJ on ubuntu with glassfish server

In intelliJ 12.0 on ubuntu 12.04 with glassfish 3.1.2.2, I'm trying to launch my web application in debug mode but I've got this error message:
Error starting domain domain1.
The server exited prematurely with exit code 134.
Before it died, it produced the following output:
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:741]
I try to change the port 9009 in the domain.xml by another one but it was unsuccessful.
Could you help me to fix this problem?
Thank you
I had this same problem too a few weeks ago. I dont remember 100% what I changed but I know it has to do with the file $GLASSFISH_HOME/glassfish/domains/domain1/config/domain.xml. If I recall I think I changed the following line:
<java-config debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=n,suspend=y,address=9009" system-classpath="" classpath-suffix="">
In particular server and suspend flags. When I set them like this the error you described above went away.
I had the same problem, and was because the debug port 9009 had beeen occupied by the DbVisualizer application. DbVisualizer uses some random ports, and at this time, it chosed the 9009. In my case, I only had to close DbVisualizer and GlassFish started up in debug mode fine.
So, check out no processes have occupied your Glassfish debug port.
Another possible solution is to change this port, or use shared memory.
Regards
In recent versions of IntelliJ the application is aware of invalid settings for debug mode. If this is the case, when you open the Run/Debug configuration of your Java EE server, in the bottom you will see a warning message:
Just press the fix button and you will fix your 'domain.xml' configuration file.
This is also explained in this tutorial: https://www.jetbrains.com/help/idea/2016.1/developing-a-java-ee-application.html
For the future poor soul that has the same issue as me:
One of the tools that comes with Gigabyte mainboards (gCloud I believe) registers a Windows service on port 9009. This port then shows up in netstat -ano as being in use by PID 4 (Windows system something).

Resources