Closed Bond246 closed 5 months ago
Can you run the following command on the host machine and supply the output please
curl -v http://localhost:1880/
Also have you enabled httpAdminAuth
in the settings.js
?
And what is the output of docker ps
? Does the container show as healthy in that list?
Hello hardillb,
curl-output:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<!--
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<title>Node-RED</title>
<link rel="icon" type="image/png" href="favicon.ico">
<link rel="mask-icon" href="red/images/node-red-icon-black.svg" color="#8f0000">
<link rel="stylesheet" href="vendor/jquery/css/base/jquery-ui.min.css?v=">
<link rel="stylesheet" href="vendor/font-awesome/css/font-awesome.min.css?v=">
<link rel="stylesheet" href="red/style.min.css?v=">
<link rel="stylesheet" href="vendor/monaco/style.css?v=">
</head>
<body spellcheck="false">
<div id="red-ui-editor"></div>
<script src="vendor/vendor.js?v="></script>
<script src="vendor/monaco/monaco-bootstrap.js?v="></script>
<script src="red/red.min.js?v="></script>
<script src="red/main.min.js?v="></script>
</body>
</html>
settings.js adminAuth:
adminAuth: {
type: "credentials",
users: [{
username: "admin",
password: "key",
permissions: "*"
}],
default: {
permissions: "read"
}
},
httpAdminAuth ist not defined in my settings.js.
docker ps output:
docker ps | grep Node-RED
710725be73f5 nodered/node-red:latest-18 "./entrypoint.sh" 27 minutes ago Up 27 minutes (unhealthy) 0.0.0.0:1880->1880/tcp, :::1880->1880/tcp
Node-RED
Thanks, but I need the full output of the curl -v
command please (I need the headers as well as the output)
hmm, i'm wondering why it hasn't been copied to my exported file. Sorry.
* Trying 127.0.0.1:1880...
* Connected to localhost (127.0.0.1) port 1880 (#0)
> GET / HTTP/1.1
> Host: localhost:1880
> User-Agent: curl/7.81.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Access-Control-Allow-Origin: *
< Content-Type: text/html; charset=utf-8
< Content-Length: 1670
< ETag: W/"686-xRT8RtOh8fuWOY7Y8PpX4OnwZro"
< Date: Wed, 24 Jan 2024 14:17:39 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
<
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<!--
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<title>Node-RED</title>
<link rel="icon" type="image/png" href="favicon.ico">
<link rel="mask-icon" href="red/images/node-red-icon-black.svg" color="#8f0000">
<link rel="stylesheet" href="vendor/jquery/css/base/jquery-ui.min.css?v=">
<link rel="stylesheet" href="vendor/font-awesome/css/font-awesome.min.css?v=">
<link rel="stylesheet" href="red/style.min.css?v=">
<link rel="stylesheet" href="vendor/monaco/style.css?v=">
</head>
<body spellcheck="false">
<div id="red-ui-editor"></div>
<script src="vendor/vendor.js?v="></script>
<script src="vendor/monaco/monaco-bootstrap.js?v="></script>
<script src="red/red.min.js?v="></script>
<script src="red/main.min.js?v="></script>
</body>
</html>
* Connection #0 to host localhost left intact
Also can you try the following:
docker exec -it Node-RED /bin/bash
vi /healthcheck.js
//
from before the console.log
linesnode /healthcheck.js
I wonder if this is a IPv6 thing in the healthcheck script.
~ docker exec -it -u root Node-RED /bin/bash
a5023417dca6:/usr/src/node-red# vi /healthcheck.js
a5023417dca6:/usr/src/node-red# vi /healthcheck.js
a5023417dca6:/usr/src/node-red# node /healthcheck.js
ERROR Error: connect ECONNREFUSED ::1:1880
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 1880
}
a5023417dca6:/usr/src/node-red#
Yep, that's it
A quick fix is to edit that file again and replace localhost
with 127.0.0.1
(you can comment the console.log
out agian)
I'll update the script for the next release
That was fast :) It's heathy again now.
Big Thanks!
Hello,
i'm usind Node-RED in Docker an most of the time in latest version. Since v3.0 i'm using the latest image for node.js 18 so my docker-run command is this:
docker run -d -p 1880:1880 -e TZ=Europe/Berlin -v Node-RED_data:/data --name Node-RED nodered/node-red:latest-18
And since i've upgrade to v3.0.0 (and now 3.1.3) with nodejs v18 i get in portainer only an unhealthy state.
My Node-RED Log looks like that:
And some basics in addition:
[ ] Platform/OS: Ubuntu 22.04.3 LTS
[ ] Browser: Firefox
Portainer Details:![grafik](https://github.com/node-red/node-red-docker/assets/8534418/ebcfe1e3-c266-4884-bccb-d9c5dad5c8a6)
node-red.log
Thanks for helping!
Florian