Firebase database emulator not starting (other emulators are working) - firebase-realtime-database

I'm trying to get the database emulator working.
Running firebase emulators:start --only auth,hosting works fine an give the following output:
i emulators: Starting emulators: auth, hosting
i hosting: Serving hosting files from: dist/spa
✔ hosting: Local server: http://localhost:5000
i ui: Emulator UI logging to ui-debug.log
┌─────────────────────────────────────────────────────────────┐
│ ✔ All emulators ready! It is now safe to connect your app. │
│ i View Emulator UI at http://localhost:4000 │
└─────────────────────────────────────────────────────────────┘
┌────────────────┬────────────────┬────────────────────────────┐
│ Emulator │ Host:Port │ View in Emulator UI │
├────────────────┼────────────────┼────────────────────────────┤
│ Authentication │ localhost:9099 │ http://localhost:4000/auth │
├────────────────┼────────────────┼────────────────────────────┤
│ Hosting │ localhost:5000 │ n/a │
└────────────────┴────────────────┴────────────────────────────┘
Emulator Hub running at localhost:4400
Other reserved ports: 4500
However, as soon as I include emulation of the database the only thing I get is:
i emulators: Starting emulators: auth, database, hosting
i database: Database Emulator logging to database-debug.log
i emulators: Shutting down emulators.
i database: Stopping Database Emulator
i hub: Stopping emulator hub
Error: TIMEOUT: Port 9000 on localhost was not active within 60000ms
Going to http://localhost:9000 does give a response from the database so it seems to be running. But it hangs and does not allow the other emulators or the UI to start and will eventually time out.
This is the contents of the database-debug.log
08:23:16.050 [NamespaceSystem-akka.actor.default-dispatcher-4] INFO akka.event.slf4j.Slf4jLogger - Slf4jLogger started
08:23:16.247 [main] INFO com.firebase.server.forge.App$ - Listening at localhost:9000
08:24:14.144 [Thread-0] INFO com.firebase.server.forge.App$ - Attempting graceful shutdown.
08:24:14.156 [NamespaceSystem-akka.actor.default-dispatcher-4] INFO com.firebase.core.namespace.Terminator$Terminator - 1 actors left to terminate: fake-server
08:24:14.163 [NamespaceSystem-akka.actor.default-dispatcher-5] INFO com.firebase.core.namespace.NamespaceActor - Stopping namespace actor for fake-server
08:24:14.164 [NamespaceSystem-akka.actor.default-dispatcher-5] INFO com.firebase.core.namespace.NamespaceActor - Gauges removed for fake-server
08:24:14.170 [Thread-0] INFO com.firebase.server.forge.App$ - Graceful shutdown complete.
Update
I have:
created a new project using firebase init just to try the emulator and I get the same behaviour.
configured the database emulator to run on a different port. No avail.
upgraded java to openjdk version 18... (initially I had a very old version of java on my mac)

While running firebase emulators:start you might get an output similar to this one 🥹
i emulators: Starting emulators: database, hosting
i database: Database Emulator logging to database-debug.log
i emulators: Shutting down emulators.
i database: Stopping Database Emulator.
i hub: Stopping emulator hub
Error: TIMEOUT: Port 9000 on localhost was not active within 60000ms 😭
Steps to fix the error 👇
Just go through Latest versions of Java, download it from Oracle. ⬇️
Add the "host": "127.0.0.1" entry to the firebase.json file as shown below in the emulators section. 🔗
Copy the given code and add to emulators section. 👀
"emulators": {
"database": {
"port": 9000,
"host": "127.0.0.1"
},
Run firebase emulators:start again! 🤘🏻
Happy Coding 🧑🏻‍💻
Click here to view the Final Out! 🔥

Related

How to start the Web UI of Chirpstack-Application?

OS: Windows 10 Pro
The whole setup for properly starting up the Web UI seems confusing to me.
There’s the source code to the chirpstack-application-server and its finished docker image. Running docker-compose up at the source code directory starts all the necessary backend services, but not the UI. In the source code, there’s a section with the UI inside the /ui directory. Starting this through npm works up until after this console log:
Note that the development build is not optimized. To create a
production build, use npm run build.
After this I get this proxy error:
Proxy error: Could not proxy request /swagger/internal.swagger.json
from localhost:3000 to http ://localhost:8080/. See https:// nodejs.
org/api/errors.html#errors_common_system_errors for more information
(ECONNREFUSED).
Then there’s the chirpstack-appliaction from precompiled binary. I started this one by first creating the config file chirpstack-application-server configfile > chirpstack-application-server.toml and then starting the executable ./chirpstack-application-server.exe. Here I just get a connection error to PostgreSQL:
time=“2020-09-17T11:09:08+02:00” level=warning msg=“storage: ping
PostgreSQL database error, will retry in 2s” error=“dial tcp
[::1]:5432: connectex: No connection could be made because the target
machine actively refused it.”
So what am I missing to get the UI up and running locally?

Unable to see any web transactions of my Vertx application in glowroot

I am working on a vertx application running some apis.
After following instructions mentioned under https://github.com/glowroot/glowroot/wiki/Central-Collector-Installation, I was not able to see any Web transaction data on glowroot central collector, here's what I tried.
I downloaded glowroot-central.jar, and after building the netty plugin from https://github.com/glowroot/glowroot/tree/master/agent/plugins/netty-plugin, placed it under plugins folder containing glowroot-central.jar file.
Next, started glowroot by calling "java -jar glowroot-central.jar"
And then passed in -javaagent:path/to/glowroot.jar to my JVM args of vertx application.
I was also able to confirm that my agent is able to connect to central collector from console output
Here's the output when I start my Vertx application, which confirms that agent is connecting to Central Collector
org.glowroot - Java version: 1.8.0_201 (Oracle Corporation / Mac OS X)
2019-04-05 12:31:43.988 INFO org.glowroot - Java args: -javaagent:/Users/somefolder/glowroot/glowroot.jar
org.glowroot - agent id: "testserver"
org.glowroot - connected to the central collector http://0.0.0.0:8181, version 0.13.2, built 2019-03-27 17:05:44 +0000
I am also able to see my agent's name which is "testserver" on glowroot web UI. However I can not see any web transaction data. I called my API, few hundred times to using an automated tool and waited few min (~30 min), but I don't see anything :(

Realm database: synchronization with server

I'm testing Realm database using test application RealmTasks and found out that synchronization with the server doesn't work. Authentication works well, but sync not. Realm server is installed on CentOS 7 server. Default port 9080 is busy so I changed Realm server config file:
http:
enable: true
listen_address:'0.0.0.0'
listen_port:6666
network:
http:
listen_address:'0.0.0.0'
listen_port:27080
As a result I can connect to 27080 from outside but can not connect to port 6666. All ports are opened for outside connection. Does it possible that such a configuration doesn't allow to synchronize database?
Update
That config file is just wrong - if that's exactly what you have. The yaml is nested wrongly because your first http is not nested.
Experimenting with the Mac Developer Edition, here's a minimal working configuration.yml file:
storage:
root_path: 'root_dir'
auth:
public_key_path: 'keys/token-signature.pub'
private_key_path: 'keys/token-signature.key'
proxy:
http:
listen_address: '::'
listen_port: 9666
Important - it seems port numbers are constrained the [configuration documentation(https://realm.io/docs/realm-object-server/#configuring-the-server) mentions the need to use 1024 or higher as the server doesn't run as root. I am not sure why I could not get 6666 to run although that is supposedly commonly used for IRC. Multiple failure messages appear in the Terminal window of the process launching the server with that port.
Earlier questions
Are you telling the RealmTasks app to connect to that port? (Obvious question but I had to ask.)
Please supply logs from the server or look at the logs, which you can view and adjust the level of in the web dashboard eg at http://localhost:9080/#!/logs

How to set up grid on remote machien and run webdriver test cases?

What I have; I have putty.exe to access a remote ubuntu machine xxx.xx.xxx.xx.
What I want; I want that when I run my test cases on this remote machine using jenkins it would launch a browser that I can see popping up on my windows machine.
What I have tried; I have tried to use firefox with Xvfb(both located on remote machine) but that is headless and I cant see errors, I cant get much help from reports. I want to see whats happening on UI
So I wanted to use remote webdriver. I tried to register on remote machine as;used putty.exe
sudo java -jar selenium-server-standalone-2.35.0.jar -role node -hub http://localhost/xxx.xx.xxx.xx:4444/grid/register
but that gave error :
Sep 27, 2013 9:24:24 AM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a selenium grid node
Sep 27, 2013 9:24:24 AM org.openqa.grid.internal.utils.SelfRegisteringRemote startRemoteServer
WARNING: error getting the parameters from the hub. The node may end up with wrong timeouts.The target server failed to respond
09:24:24.961 INFO - Java: Oracle Corporation 23.7-b01
09:24:24.962 INFO - OS: Linux 3.5.0-21-generic amd64
09:24:24.971 INFO - v2.35.0, with Core v2.35.0. Built from revision c916b9d
09:24:25.111 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:5555/wd/hub
09:24:25.113 INFO - Version Jetty/5.1.x
09:24:25.114 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
09:24:25.115 INFO - Started HttpContext[/selenium-server,/selenium-server]
09:24:25.116 INFO - Started HttpContext[/,/]
09:24:36.415 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#49af0a45
09:24:36.416 INFO - Started HttpContext[/wd,/wd]
09:24:36.423 INFO - Started SocketListener on 0.0.0.0:5555
09:24:36.426 INFO - Started org.openqa.jetty.jetty.Server#1f4a8824
09:24:36.428 INFO - using the json request : {"class":"org.openqa.grid.common.RegistrationRequest","capabilities":[{"platform":"LINUX","seleniumProtocol":"Selenium","browserName":"*firefox","maxInstances":5},{"platform":"LINUX","seleniumProtocol":"Selenium","browserName":"*googlechrome","maxInstances":5},{"platform":"LINUX","seleniumProtocol":"Selenium","browserName":"*iexplore","maxInstances":1},{"platform":"LINUX","seleniumProtocol":"WebDriver","browserName":"firefox","maxInstances":5},{"platform":"LINUX","seleniumProtocol":"WebDriver","browserName":"chrome","maxInstances":5},{"platform":"LINUX","seleniumProtocol":"WebDriver","browserName":"internet explorer","maxInstances":1}],"configuration":{"port":5555,"register":true,"host":"10.158.96.150","proxy":"org.openqa.grid.selenium.proxy.DefaultRemoteProxy","maxSession":5,"role":"node","hubHost":"localhost","registerCycle":5000,"hub":"http://localhost/184.73.224.98:4444/grid/register","hubPort":-1,"url":"http://10.158.96.150:5555","remoteHost":"http://10.158.96.150:5555"}}
09:24:36.430 INFO - Starting auto register thread. Will try to register every 5000 ms.
09:24:36.430 INFO - Registering the node to hub :http://localhost:-1/grid/register
09:24:36.446 INFO - couldn't register this node : Error sending the registration request.
09:24:41.479 INFO - couldn't register this node : Hub is down or not responding: Hub is down or not responding.
I have already tried :
http://rationaleemotions.wordpress.com/2012/01/23/setting-up-grid2-and-working-with-it/
https://code.google.com/p/selenium/wiki/Grid2
Understanding Selenium Grid2 implementation running on EC2
but these failed on initial step when I have to register a node on remote ubuntu machine.
Its not entirely clear what your error is. This might help where you can vnc onto a headless Xvfb box using ssh tunnels
after installing any missing packages on your remote server
Xvfb -screen 0 800x600x16 -ac &
export DISPLAY=:0
xterm &
java -jar selenium-server-standalone-2.35.0.jar -role node -hub http://mywebsiteip:4444/grid/register
then tunnel to your server from your own machine
ssh -l kaltpost -L 5900:localhost:5900 mywebsiteip 'x11vnc -localhost -display :0'
which will wait, so in another terminal
vncviewer localhost&
Which is all taken from here http://gpio.kaltpost.de/?page_id=84
++edit
I just saw you started your selenium server with the ip of the host, this needs to be localhost and then mywebsite id when you connect your tests to it

Not able to start ActiveMQ as a service under Windows Server 2008 R2

We are trying to launch ActiveMQ as a service on a Windows Server 2008 R2 server, but we get a "1067 error" and in the log file we see this:
FATAL | wrapper | 2012/03/12 16:34:54 | Critical error: wait for JVM process failed
STATUS | wrapper | 2012/03/12 16:41:00 | --> Wrapper Started as Service
STATUS | wrapper | 2012/03/12 16:41:00 | Launching a JVM...
FATAL | wrapper | 2012/03/12 16:41:00 | Unable to execute Java command. Accesso negato. (0x5)
FATAL | wrapper | 2012/03/12 16:41:00 | "C:\Program Files (x86)\Java\
"accesso negato" means "access is denied" (Italian). The Java path seems correct. We tried all these combinations:
C:\Program Files (x86)\Java\jre6\bin
C:\Program Files (x86)\Java\jre7\bin
C:\Program Files (x86)\Java\jre7\jdk1.7.0_03\jre\bin
folders in which the java*.exe executables are present (we have installed JRE6, JRE7 and JDK; before trying JRE7/JDK1.7, we had installed just JRE6).
All the access privileges seem to be assigned to the folders and in the property of ActiveMQ service we gave the rights of Administrator (maximum rights). In a forum, we found out to remark the field "jetty" in the configuration file, but it hasn't solved anything.
Is there something wrong with the way in which we installed/launched ActiveMQ or incompatibilities with our environment/operating system?
I just ran into this issue. The issue for me was that RabbitMQ was also running as a service and binding to the same port. Stopping RabbitMQ allowed ActiveMQ to start. I could have also changed ports.
Run Wrapper.exe in a command window to see the error.
If it is a port issue you can run the command netstat -a -b to see what is binding to the port.
Here are answers to how to change your port if needed:
How can I change default port number of Activemq
Try to run the bat file (\bin\win32\activemq.bat) as administrator.
If this works, it means you have not correctly installed the ActiveMQ service to be run under an account that has the administrator privileges.
You need the 64-bit wrapper (by default ActiveMQ comes with 32-bit only).
A few options there:
Download the latest 64-bit wrapper available in the website
Launch the process via jsvc (see this blog post describing the process)
Update to the latest 5.6 ActiveMQ that supports this out of the box (the previous 2 entries were only for releases pre 5.6
You can try the below items:
Check if the port is blocked by other services; you can change the port from ActiveMQ.xml if it is.
Check that JAVA_HOME is available and is accessible to the user
You can delete the Kaha DB folder (activeMQ\data\kahadb) and install again
This worked for me

Resources