当我浏览http://localhost:8082/openhab.app?sitemap=demo
我得到以下错误(即使在清除了完整的历史缓存和cookies之后):
Could not connect: Connection Refused.
ls -l
显示-rwxrwxrwx root root
文件夹中demo.sitemap
文件的sitemaps
。因此,当我执行
openhab
时,没有显示任何内容,但收到以下错误:FAILED [email protected]:8082:java.net.BindException: Address Already in use.
我使用了整个openhab文件夹中使用
sudo netstat -tulpn | grep 8082
的任何地方。你知道怎么解决吗?
同时
8082
还显示以下内容:pi@raspberrypi:~ $ sudo lsof -i :8080
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 756 openhab 128u IPv6 12383 0t0 TCP *:http-alt (LISTEN)
当:
pi@raspberrypi:~ $ sudo lsof -i :8082
pi@raspberrypi:~ $
我有点困惑,因为我想在端口
8080
而不是端口sudo lsof -i :8080
上运行openHAB。我已将以下文件中的
8082
更改为8080
。如果那是错的,请告诉我?pi@raspberrypi:/opt/openhab $ grep -irn 8082 *
configurations/openhab_default.cfg:10:myopenhab:localPort=8082
configurations/sitemaps/demo.sitemap:63: Image url="http://localhost:8082/images/splash-ipad-h.png" label="openHAB" {
configurations/openhab.cfg:10:myopenhab:localPort=8082
hs_err_pid850.log:210: 0x64cab800 JavaThread "qtp22705751-37 Acceptor1 [email protected]:8082" [_thread_in_native, id=891, stack(0x63080000,0x630d0000)]
hs_err_pid850.log:212: 0x64ca8c00 JavaThread "qtp22705751-35 Acceptor0 [email protected]:8082" [_thread_blocked, id=889, stack(0x63120000,0x63170000)]
hs_err_pid850.log:899:jvm_args: -Dosgi.clean=true -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Djetty.port=8082 -Djetty.port.ssl=8443 -Djetty.home=. -Dlogback.configurationFile=configurations/logback.xml -Dfelix.fileinstall.dir=addons -Dfelix.fileinstall.filter=.*.jar -Djava.library.path=lib -Djava.security.auth.login.config=./etc/login.conf -Dorg.quartz.properties=./etc/quartz.properties -Dequinox.ds.block_timeout=240000 -Dequinox.scr.waitTimeOnBlock=60000 -Dfelix.fileinstall.active.level=4 -Djava.awt.headless=true
logs/openhab.log:57:2016-03-21 00:00:02.501 [INFO ] [.myopenhab.internal.MyOHClient] - Disconnected from my.openHAB service (UUID = 9519133a-991a-49e3-bd0c-829cc285444d, local base URL = http://localhost:8082)
logs/openhab.log:2666:2016-03-21 04:00:02.768 [INFO ] [.myopenhab.internal.MyOHClient] - Disconnected from my.openHAB service (UUID = 9519133a-991a-49e3-bd0c-829cc285444d, local base URL = http://localhost:8082)
logs/openhab.log:5288:2016-03-21 08:00:02.530 [INFO ] [.myopenhab.internal.MyOHClient] - Disconnected from my.openHAB service (UUID = 9519133a-991a-49e3-bd0c-829cc285444d, local base URL = http://localhost:8082)
logs/openhab.log:7893:2016-03-21 12:00:02.422 [INFO ] [.myopenhab.internal.MyOHClient] - Disconnected from my.openHAB service (UUID = 9519133a-991a-49e3-bd0c-829cc285444d, local base URL = http://localhost:8082)
logs/openhab.log:9577:2016-03-21 14:37:10.712 [INFO ] [.myopenhab.internal.MyOHClient] - Disconnected from my.openHAB service (UUID = 9519133a-991a-49e3-bd0c-829cc285444d, local base URL = http://localhost:8082)
logs/openhab.log:9957:2016-03-21 15:12:42.574 [INFO ] [.myopenhab.internal.MyOHClient] - Disconnected from my.openHAB service (UUID = 9519133a-991a-49e3-bd0c-829cc285444d, local base URL = http://localhost:8082)
logs/openhab.log:11910:2016-03-21 18:12:32.480 [INFO ] [.myopenhab.internal.MyOHClient] - Disconnected from my.openHAB service (UUID = 9519133a-991a-49e3-bd0c-829cc285444d, local base URL = http://localhost:8082)
logs/openhab.log:13106:2016-03-21 20:00:02.255 [INFO ] [.myopenhab.internal.MyOHClient] - Disconnected from my.openHAB service (UUID = 9519133a-991a-49e3-bd0c-829cc285444d, local base URL = http://localhost:8082)
logs/openhab.log:14823:2016-03-21 22:38:22.039 [WARN ] [.u.component.AbstractLifeCycle] - FAILED [email protected]:8082: java.net.BindException: Address already in use
logs/openhab.log:17638:2016-03-21 23:31:24.496 [INFO ] [.myopenhab.internal.MyOHClient] - Disconnected from my.openHAB service (UUID = 9519133a-991a-49e3-bd0c-829cc285444d, local base URL = http://localhost:8082)
logs/openhab.log:19789:2016-03-22 00:00:03.276 [INFO ] [.myopenhab.internal.MyOHClient] - Disconnected from my.openHAB service (UUID = 9519133a-991a-49e3-bd0c-829cc285444d, local base URL = http://localhost:8082)
Binary file server/configuration/org.eclipse.osgi/bundles/94/data/store/org.openhab.myopenhab.pid.1 matches
Binary file server/configuration/org.eclipse.osgi/bundles/94/data/store/org.openhab.myopenhab.pid.2 matches
server/eclipse.ini:6:-Dorg.osgi.service.http.port=8082
start_debug.sh:9:HTTP_PORT=8082
start.sh:9:HTTP_PORT=8082
我有以下几点:
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.1.18-v7+ #846 SMP Thu Feb 25 14:22:53 GMT 2016 armv7l GNU/Linux
pi@raspberrypi:~ $ cd /opt/openhab/
pi@raspberrypi:/opt/openhab $ ls
addons configurations etc LICENSE.TXT README.TXT sounds start_debug.bat start.sh webapps
addons_bk contexts hs_err_pid850.log logs server start.bat start_debug.sh test workspace
这是文件的权限:
pi@raspberrypi:/opt/openhab $ ls -l /opt/openhab/
total 164
drwxrwxrwx 2 root root 20480 Mar 22 19:39 addons
drwxr-xr-x 3 pi pi 4096 Mar 22 19:31 addons_bk
drwxrwxrwx 8 root root 4096 Mar 22 20:24 configurations
drwxrwxrwx 2 root root 4096 Feb 1 10:51 contexts
drwxrwxrwx 5 root root 4096 Mar 10 01:09 etc
-rwxrwxrwx 1 root root 70135 Mar 10 01:09 hs_err_pid850.log
-rwxrwxrwx 1 root root 11232 Feb 1 10:51 LICENSE.TXT
drwxrwxrwx 2 root root 4096 Mar 22 00:00 logs
-rwxrwxrwx 1 root root 874 Feb 1 10:51 README.TXT
drwxrwxrwx 6 root root 4096 Mar 22 21:14 server
drwxrwxrwx 2 root root 4096 Feb 1 10:51 sounds
-rwxrwxrwx 1 root root 996 Feb 1 10:51 start.bat
-rwxrwxrwx 1 root root 1146 Feb 1 10:51 start_debug.bat
-rwxrwxrwx 1 root root 1132 Mar 22 20:26 start_debug.sh
-rwxrwxrwx 1 root root 969 Mar 22 20:24 start.sh
-rwxrwxrwx 1 root root 0 Mar 15 00:56 test
drwxrwxrwx 4 root root 4096 Mar 21 23:02 webapps
drwxrwxrwx 3 root root 4096 Mar 9 04:52 workspace
我正在使用
8080
最佳答案
更改HTTP_PORT
或start.sh
中的start_debug.sh
变量就足够了。使用8082
而不是8080
也可以工作,我可以打开UI。
要确定的是:您在url中使用的是localhost
,但是openhab是在一个树莓Pi上运行的。这是否意味着您正在使用Pi本身的浏览器?